Statistics
| Branch: | Tag: | Revision:

root @ 243cdbcc

# Date Author Comment
243cdbcc 05/07/2008 02:12 pm Michael Hanselmann

Use new ssconf function to check configuration version

Upgrades will be handled in future patches.

Reviewed-by: iustinp

a9369c6e 05/06/2008 01:20 pm Michael Hanselmann

Use dict instead of if/elif map for hypervisor classes

Reviewed-by: iustinp

a2d32034 05/06/2008 01:20 pm Michael Hanselmann

Rename hypervisor code to lowercase filenames

Reviewed-by: iustinp

94f3875d 05/05/2008 06:27 pm Michael Hanselmann

Generate devel/upload during build time from template

- Use variable with prefix instead of grep and sed
- Always run with /bin/bash

Reviewed-by: ultrotter

4337cf1b 05/05/2008 01:03 pm Iustin Pop

Export the number of cpus to iallocator scripts

Now that we have the number of cpus available from the hypervisors, we
can export this to the iallocator scripts.

Reviewed-by: ultrotter

872c949f 05/05/2008 01:02 pm Iustin Pop

Minor doc/help update

This shortens the help output in gnt-node so that the output looks
nicer, and improves the manual page for gnt-instance with the new
'status' field.

Reviewed-by: ultrotter

48c4dfa8 05/05/2008 01:02 pm Iustin Pop

Improve the gnt-* list field selection

This patch allows the '-o' option to the list subcommands to add more
fields to the default list instead of replacing the default list by
prefixing the fields list with '+'.

The patch also moves the listing (in the help output) of the default...

e8a4c138 05/05/2008 01:01 pm Iustin Pop

Add node cpu count to gnt-node list

This patch adds the backend and frontend changes needed for being able
to list the cpu count.

Reviewed-by: ultrotter

9ff994da 05/05/2008 11:49 am Guido Trotter

Wrap exception in _DistributeConfig code

nodelist.remove(X) could potentially raise a ValueError (even if the chance
that the current node is not in the list are pretty scarce, and its absence
should raise a red flag anyway). If this happens let things go on, as that's...

41362e70 05/05/2008 11:15 am Guido Trotter

Simplify target generation in DistributeConfig

Currently we get the list of nodes, and for each one extract all its info, and
just to exclude it if the name matches ours. Since the list of nodes is a list
of names just use .remove() to exclude ourself from it, and use that list...

8498462b 05/02/2008 12:36 pm Guido Trotter

ssconf: update the SetKey docstring

SetKey is used, other than for adding new nodes, in another few cases. Update
the docstring to reflect this, so we don't mislead people reading it.

Reviewed-by: iustinp

310bbdde 05/02/2008 12:36 pm Guido Trotter

Delete hypervisor.py

This completes the changes in r898 by actually getting rid of the old unused
hypervisor.py code which was left in the code tree.

Reviewed-by: iustinp

ce862cd5 05/01/2008 02:15 pm Guido Trotter

ganeti-masterd: Some docstrings work

- Add a docstring to IOServer's constructor
- Add argument description to PoolWorker's and JobRunner's ones

Reviewed-by: iustinp

dcf315e2 05/01/2008 02:15 pm Guido Trotter

locking: remove obsolete comment

Reviewed-by: iustinp

808753d4 04/30/2008 03:51 pm Manuel Franceschini

Remove deprecated disk templates from doc

Since local_raid1 and remote_raid1 are deprecated they are removed
from the docs. This patch removes some old documentation sections
and bumps the documented version from 1.2 to 1.3.

Reviewed-by: iustinp

470e7e06 04/30/2008 12:30 pm Guido Trotter

hooks.sgml: Add cluster-verify hooks information

Reviewed-by: iustinp

d8fff41c 04/30/2008 12:29 pm Guido Trotter

Add cluster-verify hooks

Only post-hooks are run on cluster verify, and then their output is sent back
to the LU, which upon failure displays it to the user and changes the result of
the execution to a failure.

Reviewed-by: iustinp

1fce5219 04/30/2008 12:29 pm Guido Trotter

Add a LU Hooks notification function

Previously LUs could be failed by pre-hooks, and post-hooks just had effects by
themselves. This patch allows a LU to define the HooksCallBack function if it
wants to know about its hooks' results and alter its results in response....

b07a6922 04/30/2008 12:29 pm Guido Trotter

HooksMaster: Make RunPhase return the rpc output

Right now the hooks output is propagated from the nodes all the way up to
HooksMaster.RunPhase, which uses it for debugging PRE hooks, but then silently
discards them. We'll now propagate it up to the Processor.ExecOpCode function,...

10cd4a29 04/30/2008 12:29 pm Guido Trotter

Remove NoHooksLU.BuildHooksEnv

Since NoHooksLU defines HPATH as None, BuildHooksEnv will never be called (as
the LogicalUnit.BuildHooksEnv docstring correctly states). Removing the
function altogether, to avoid having dead code lying around, and to make sure...

8a3fe350 04/30/2008 12:29 pm Guido Trotter

LogicalUnit.BuildHooksEnv, update docstring

The LogicalUnit.BuildHooksEnv docstring used to say that the node list should
not include the master node. This is obviously not the case checking the
relevant code, and double-checking with iustin he confirmed it just document...

7b7857ee 04/30/2008 12:29 pm Guido Trotter

Remove non-existing arguments from some docstrings

A fewdocstrings in the HooksRunner backend class list arguments the relevant
functions do not take. Clean them up.

Reviewed-by: iustinp

495beb42 04/29/2008 06:26 pm Manuel Franceschini

Add file-based options to gnt-instance man-page

Reviewed-by: iustinp

742f39ac 04/29/2008 05:27 pm Michael Hanselmann

Support config version in ssconf

Reviewed-by: iustinp

b74159ee 04/29/2008 10:37 am Iustin Pop

Disable forking in the master daemon

This patch adds a mechanism to disable utils.RunCmd in selected
programs. This is needed in the master daemon unless we confirm
threading doesn't pose any problems.

This makes cluster init fail, but creating new trunk clusters is anyway...

b6023d6c 04/28/2008 06:24 pm Manuel Franceschini

Raise PrereqError when exporting file-based instance

This patch adds a check to LUExportInstance.CheckPrereq to raise an
error when an instance with file disks is exported.

Reviewed-by: ultrotter

93cb65c5 04/28/2008 06:24 pm Manuel Franceschini

Add file backend storage options to ImportInstance

This patch adds the file storage options to gnt-backup import which
would otherwise fail since the values of file_storage_dir and
file_driver are accessed in LUCreateInstance.

Reviewed-by: ultrotter

65a6f9b7 04/28/2008 06:05 pm Michael Hanselmann

Split hypervisor.py into several files

Before it was a huge file with more than 700 lines. No code changes were
made except for changing imports and class names where needed. In the
future, we could even think about only importing the hypervisors we
actually need. The patch finished QA scripts and distcheck successfully....

a4af651e 04/28/2008 04:02 pm Iustin Pop

Move the 'cmd' lock from cli.py to ganeti-masterd

This patch removes the lock and the lock options from cli.py and moves
them to the master.

Later during development we can remove it completely, but for now it's
good to protect any other tool that uses the lock directly....

685ee993 04/28/2008 04:01 pm Iustin Pop

Convert cli.SubmitOpCode to use the master

This patch converts the cli.py SubmitOpCode method to use the unix
protocol and thus execute the opcodes via the master.

The patch allows a partial burnin to work with the master. Currently the
query opcodes, since they are executed via the SubmitOpCode, are...

fd38ef95 04/28/2008 03:15 pm Manuel Franceschini

Add check for major/minor in _FormatBlockDevInfo

bdev.FileStorage does not have major or minor fields, so gnt-instance
info for file backed instances fails with a TypeError. This patch
adds checks to prevent that and print 'N/A' instead.

Reviewed-by: imsnah

01fd6005 04/28/2008 01:42 pm Manuel Franceschini

Make testSignal unittest not depend on default shell

This patch changes the code executed when testing the signal handling
of RunCmd. Since sh does not always point to bash (e.g. on Ubuntu,
where it points to /bin/dash) this test might fail due to the returned...

8d528b7c 04/28/2008 12:47 pm Iustin Pop

Move iallocator script execution to ganeti-noded

Currently the iallocator execution takes place in the master, which is a
violation of the current architecture, and will create problems with a
threaded master daemon.

This patch moves the execution to the backend, similar to the hooks...

768f0a80 04/28/2008 12:47 pm Iustin Pop

Fix iallocator instance info

The commit "IAllocator: some more info exported" broke the instance list
generation due to a wrong index variable. This patch fixes that.

Reviewed-by: ultrotter

70f4497c 04/25/2008 04:37 pm Michael Hanselmann

Extend utils.WriteFile

Add parameters to not check the path for absoluteness, implement a dry
run mode and automatically create a backup if requested. This will be
used by the cfgupgrade utility.

Reviewed-by: schreiberal

6286519f 04/25/2008 03:07 pm Iustin Pop

IAllocator: some more info exported

This patch adds the following information to the exported info:
- hypervisor type (in the main dict)
- total memory used by primary instances (in each node dict) (can be
computed from the node+instance dicts, but it's cheap to compute...

b2662e7f 04/25/2008 03:07 pm Iustin Pop

IAllocator: simplify node info computation

Currently we try to convert the values returned by call_node_info to
ints, and if all succeed, we actually do the conversion. Simplify this
by doing it in one step.

The patch also adds exporting of node memory as 'reserved_memory'....

ddd9bc04 04/25/2008 03:03 pm Iustin Pop

patch 1/4 extended HVM features for 1.2

This patch extends the config objects with the slots to handle
more HVM configuration items.

Author: schreiberal
Reviewed-by: iustinp,imsnah

4febe836 04/25/2008 02:57 pm Michael Hanselmann

Move target creating symlinks in lib/ into Makefile.libcommon

Reviewed-by: iustinp

b2d72ffe 04/25/2008 12:54 pm Iustin Pop

Add iallocator documentation

Reviewed-by: imsnah

66f93869 04/24/2008 06:56 pm Manuel Franceschini

backend.FinalizeExport: safely initialize some vars

This patch initializes nic_count and disk_count with 0. This prevents
some reference errors if the snap_disks block device list is empty.

Reviewed-by: ultrotter

b4de68a9 04/24/2008 05:39 pm Iustin Pop

Style fixes for trunk

This small patch fixes:
- wrong indentation in two places
- use of 'os' variable that hides global scope os module

Reviewed-by: imsnah

b6e82a65 04/24/2008 02:13 pm Iustin Pop

Implement replace secondary via the iallocator

This patch implements secondary replace via the iallocator. The new
opcode parameter 'iallocator' behaves like this: if passed, it will
always compute and assign a new secondary, behaving in effect as if the...

5e767b34 04/24/2008 10:35 am Iustin Pop

Implement memory size option for burnin

This simple patch adds memory size for the burnin instances, which helps
testing allocator algorithm response based on the available node memory
and instance memory size values.

Reviewed-by: ultrotter

29859cb7 04/24/2008 10:29 am Iustin Pop

Fix generalized relocate mode of IAllocator

The patch which generalized the IAllocator was half-true: it actually
put the selection of the node inside the IAllocator, so callers were not
able to specify replace primary node.

This patch does:
- split the arguments to the constructor in three sets: mode and name...

96bb2f71 04/23/2008 06:11 pm Manuel Franceschini

Fix burnin ImportExport CreateInstance opcode

This patch adds the two attributes file_storage_dir and file_driver
to the CreateInstance opcode in the ImportExport method, since
otherwise it will fail with the file storage patches.

Reviewed-by: iustinp

6d54548e 04/23/2008 05:51 pm Guido Trotter

burnin: improve instance create message

When the allocator or a non-mirrored template are used the message shown by
burnin at instance creation time was wrong. Fixing it.

Reviewed-by: iustinp

4a7ff493 04/23/2008 05:51 pm Guido Trotter

burnin: remove created exports

Make burnin remove exports after importing the instance back.

Reviewed-by: iustinp

9ac99fda 04/23/2008 05:51 pm Guido Trotter

Add gnt-backup remove functionality

This patch also fixes the LUExportInstance Prereq docstring.

Reviewed-by: iustinp

054a8696 04/23/2008 03:27 pm Manuel Franceschini

Add instance rename to burnin

This patch adds the possibility to execute instance renaming when
doing a cluster burnin. The optional parameter --rename takes
one 'spare' instance name.
Given this option it renames all given instances to the spare one
and back to their original name....

2a139bb0 04/23/2008 03:05 pm Iustin Pop

Generalize the replace_secondary mode in iallocator

Currently the replace_secondary mode is too restrictive. This patch
changes this to a general 'relocate' mode where the node(s) to be
changed are specified via a new key in the request dict ('nodes') so...

eb0994e7 04/23/2008 02:04 pm Iustin Pop

Implement replace_secondary in the dumb allocator

This patch allows the dumb allocator to perform the replace secondary
request type. This is done simply by not allowing the current instances
nodes as a valid selection, and using the existing instance data instead...

27579978 04/23/2008 02:03 pm Iustin Pop

Send required_nodes field to the iallocator scripts

This patch adds the 'required_nodes' field in the request dict for the
iallocator.

This means that the handmade-checks in the create instance can be
simplified, and that the dumb allocator can be made simple. Therefore...

b91bde14 04/23/2008 02:00 pm Iustin Pop

Allow burnin to use an iallocator in instance creation

This patch adds iallocator support to burnin, currently only in instance
creation. This means that, depending on the external algorithm, not all
nodes might get instances.

The patch also restricts node selection and iallocator options together....

d1c2dd75 04/23/2008 01:57 pm Iustin Pop

Move all iallocator functions into a class

This patch moves all the iallocator function into a separate class that
is then somewhat easier to use. It doesn't bring any new functionality.

The patch also changes the way the iallocator is called - the
OpTestAllocator opcode is no longer needed, and all its parameters...

a424ce50 04/22/2008 05:02 pm Alexander Schreiber

Correctly filter out Domain-0 from domain list if requested.

Reviewed-by: ultrotter

455a3445 04/21/2008 04:22 pm Iustin Pop

Only change instance status if not already so

This patch makes the _SetInstanceStatus only change the status of the
instance (in the config file) if it's not already in the desired state.
This skips the increase of the config serial no without actual data...

6a408fb2 04/21/2008 04:22 pm Iustin Pop

Reuse common code between MarkInstance{Up,Down}

This patch creates a new method ConfigWriter._SetInstanceStatus that
consists of the common code between MarkInstanceUp and MarkInstanceDown.
These two methods become wrappers over the _SetInstanceStatus.

Reviewed-by: ultrotter

8d14b30d 04/21/2008 04:04 pm Iustin Pop

Abstract the json functions into a separate module

This simple patch adds a new module that holds the simplejson functions
for serialization/deserialization. This reduces the amount of redundant
code.

The patch also adds some normalizations to the json output:...

e7c6e02b 04/16/2008 09:22 pm Michael Hanselmann

Add --readd option to “gnt-node add”

This allows us to readd a node after it failed and required a
reinstallation or replacement.

Reviewed-by: iustinp

35a0d128 04/16/2008 05:07 pm Iustin Pop

A pure whitespace change for style compliance

Reviewed-by: amishchenko

538475ca 04/16/2008 04:57 pm Iustin Pop

IAllocator part 3: LUCreateInstance changes

This (final) patch allows the instance's nodes to be selected
automatically based on the passed allocator algorithm.

The patch changes the pnode opcode parameter from required to optional,
now either the pnode or the iallocator must be passed....

901a65c1 04/16/2008 04:56 pm Iustin Pop

Reorder checks in instance create

This patch reorders the checks in the instance create prereq so that all
checks and normalisations that are not node-dependent are done before
the node dependent checks.

This is done so that, after the instance-related opcode parameters are...

298fe380 04/16/2008 04:56 pm Iustin Pop

Implement 'out' direction on allocator tests

This patch adds the paths for searching for instance allocators and
makes the LUTestAllocator code run the allocator and return the results
if the direction specified is 'out'. 'out' means that the opcode will...

d61df03e 04/16/2008 04:56 pm Iustin Pop

Allocator framework, 1st part: allocator input generation

In preparation for the introduction of automatic instance allocator,
this patch adds an allocator simulation opcode, that based on the input
parameters, will return either the input message to the allocator...

b62ddbe5 04/15/2008 07:12 pm Guido Trotter

Fix two pylint uninitialized variable errors

Reviewed-by: iustinp

c09f363f 04/15/2008 05:47 pm Manuel Franceschini

Bugfix: wrong identifier in CheckPrereq message

Reviewed-by: iustinp

2f505cb5 04/15/2008 03:43 pm Manuel Franceschini

Modify burnin to support file storage backend

This patch does two things:
- adjusts burnin to work with the file storage backend patches
- adds the possibilty to do a burnin for file based instances

Reviewed-by: iustinp

e2fe6369 04/15/2008 03:34 pm Iustin Pop

Move the disk size computation to its own function

This is currently hard-coded for the two drive case and will need to be
reworked for multi-disk support.

The patch is needed to support passing the total required size to the
iallocator interface.

Reviewed-by: ultrotter

94285814 04/15/2008 02:54 pm Guido Trotter

SharedLock: restrict assertion condition

When we release a shared lock if there are no exclusive waiter then the number
of shared waiters must be exactly equal to the ones scheduled to pass.

Reviewed-by: iustinp

40dacb4d 04/11/2008 05:54 pm Iustin Pop

Make the init script start the master daemon too

Reviewed-by: ultrotter

e54c4c5e 04/10/2008 08:04 pm Guido Trotter

Verify: make skipping checks possible

Add a general way to skip some checks at cluster-verify time and make the N+1
memory redundancy check optional.

Reviewed-by: iustinp

2b3b6ddd 04/10/2008 08:04 pm Guido Trotter

Verify: add N+1 Memory redundancy verification

For every node we check that we can host all the instances it's currently
secondary for belonging to the same primary. This ensures that if a node fails
all its instances can fit on their secondary node. The code only works when...

26b6af5e 04/10/2008 08:03 pm Guido Trotter

Verify: save instance config

Save the instance config after we queried it in an instance_cfg dict. This can
be used later by any function that wants it, without reloading it from the
configuration module. It will be used for N+1 memory resilience checking....

36e7da50 04/10/2008 08:03 pm Guido Trotter

Verify: add more instance information to node_info

The sisnt-by-pnode field contains all secondary instances of a node, grouped by
their primary node. This information allows us to see quickly if when a node
dies some of its instances cannot be started on their secondary node....

93e4c50b 04/10/2008 08:03 pm Guido Trotter

Verify: add instance information to node_info

With this patch node_info is changed to store information about which primary
and secondary instances are configured on a node. This information is useful to
check memory and disk allocation. A list of non-redundant instances is also...

9c9c7d30 04/10/2008 08:03 pm Guido Trotter

Verify: Add and populate node_info dict

During information gathering we collect information from call_node_info, and
then when we cycle trough the nodes add it into a node_info dict containing a
node's free memory and disk. This will be useful later to verify that the...

1f9430d6 04/10/2008 07:38 pm Iustin Pop

Rework the results of OpDiagnoseOS opcode

Currently, the opcode DiagnoseOS is the only opcode that return a
structure of objects.OS (which is a custom class, and not a simple
python object) and furthermore all the processing of OS validity across
nodes is left to the clients of this opcode....

f1c66d13 04/10/2008 06:56 pm Iustin Pop

Add generic opcode submit functionality to gnt-debug

This patch enhances gnt-debug to be able to submit any opcodes. The
opcodes are input from a json file containing a list of opcodes.

This allows enhanced testing of opcodes until the other gnt-* commands...

b77acb3e 04/10/2008 06:46 pm Iustin Pop

Change client protocol to raise exception on failures

Currently the luxi.client.SubmitJob and Query methods return the unserialized
result without processing it at all. This patch changes this by adding a
'RequestException' error that is raised if the query itself or the...

35049ff2 04/10/2008 06:36 pm Iustin Pop

Add per-opcode results to job processing

This patch changes the definition of a job and introduces per-opcode
results.

First, the result and status fields of a job are condensed into a single
'status' attribute. Then, we introduce an opcode status and one result...

57c177af 04/10/2008 04:41 pm Iustin Pop

Move the OS search code into an abstract function

Based on the previous OS search code changes, we can now move the OS
search code into a generic look-for-file function in utils.py. This
means that the allocator code can use the same function.

Reviewed-by: ultrotter

c34c0cfd 04/10/2008 04:40 pm Iustin Pop

Change backend._OSSearch return values

Currently, the function backend._OSSearch() returns the (first) base dir
in which this OS can be found. Thereafter the full actual path to the OS
dir is built in the backend.OSFromDisk() function.

This patch changes this so that _OSSearch() always returns the full path...

3cdef069 04/10/2008 03:59 pm Iustin Pop

Fix example scripts build dependencies

Currently, the example scripts (the init.d and the cron script) do not
depend on the Makefile, so if configure is rerun with different
parameters these scripts are not rebuild.

The patch adds Makefile as a dependency so changes to installation paths...

ceb76b36 04/10/2008 01:18 pm Guido Trotter

Verify: remove useless check in _VerifyInstance

The list of instances passed to _VerifyInstance is the one coming from
self.cfg.GetInstanceList(). So there's no point, inside that function, in
checking whether the current instance is a member of that list. Moreover...

c5705f58 04/10/2008 01:18 pm Guido Trotter

Verify: instance verification cleanup

The instance configuration is grabbed both in the _VerifyInstance function and
in the loop that calls it. Clean this up by passing the configuration as a
parameter.

Reviewed-by: imsnah

a872dae6 04/10/2008 01:18 pm Guido Trotter

Verify: fix crash when a node is down

Currently if ganeti-noded doesn't respond on a node gnt-cluster verify will die
when verifying primary instances for that node. Fix this by just emitting an
error message if no information about running instances is returned from the...

c840ae6f 04/10/2008 01:18 pm Guido Trotter

Verify: fix ERROR message indentation

All ERROR messages in cluster verify are indented by four spaces, this one is
indented by two. Fixing this skew.

Reviewed-by: imsnah, iustinp

2f6eebee 04/10/2008 01:18 pm Guido Trotter

Fix spelling mistake in constants.py

Of course instance creation don't have any modem, and the comment was just
talking about modes. Sorry to everybody expecting whistles.

Reviewed-by: imsnah

11c05c42 04/10/2008 12:15 pm Manuel Franceschini

Add lvm storage option to gnt-cluster man page

This patch adds the previously introduced lvm storage toggling
info to the gnt-cluster man page. It adds some info the the
gnt-cluster init -g option and adds the gnt-cluster modify command.

Reviewed-by: iustinp

16687b98 04/10/2008 12:12 pm Manuel Franceschini

Small code style fix

Reviewed-by: imsnah

2c313123 04/09/2008 08:45 pm Manuel Franceschini

Bugfix instance create when file-storage-dir None

os.path.join does not like None as argument and fails with
AttributeError: 'NoneType' object has no attribute 'startswith'.

This patch makes sure the passed argument is a string in any case.

Reviewed-by: iustinp

1c6e3627 04/08/2008 07:28 pm Manuel Franceschini

Two small code style fixes

Reviewed-by: imsnah

45873083 04/08/2008 07:01 pm Manuel Franceschini

Modify gnt-instance to support file backend

Reviewed-by: ultrotter

dc936b49 04/08/2008 07:01 pm Manuel Franceschini

Add file_storage_dir,file_driver to OpCreateInstance

Reviewed-by: ultrotter, iustinp

b23c4333 04/08/2008 07:00 pm Manuel Franceschini

Modify LURenameInstance to support file backend

This patch does two things:
- Modify LURenameInstance.Exec to rename directory
when a file-based instance is renamed
- Modify config.RenameInstance() to replace the directory name in
config.data for file devices...

0f1a06e3 04/08/2008 07:00 pm Manuel Franceschini

Modify LUCreateInstance to support file backend

- Modfiy _GenerateDiskTemplate to support file-based disk template
- Modify _CreateDisks to create directory needed for file-based
instances before creating the actual files
- Modify _RemoveDisks to delete directory for file-based instances...

a618b9ee 04/08/2008 06:05 pm Michael Hanselmann

Bump version number to 1.3.0~alpha1

Reviewed-by: iustinp

d5fd92ed 04/08/2008 06:04 pm Michael Hanselmann

Provide more flexible version numbers to the code

Having the individual parts in the code allows us to build version
numbers like "1.2" while leaving "3" out in a clean fashion, that is
without regular expressions or the like. This might be used together...

e994fcba 04/08/2008 05:04 pm Manuel Franceschini

Modify hypervisor to support file backend

The driver in the xen config file needs to be changed when dealing with
files rather then bdevs.

This patch does two things:
- Add _GetConfigFileDiskData to XenHypervisor which returns the correct
disk xen config line. This function checks the logical disk type of...