Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ 42d4d8b9

History | View | Annotate | Download (474.7 kB)

# Date Author Comment
e4f4896b 09/15/2011 04:40 pm Guido Trotter

Merge branch 'devel-2.5'

  • devel-2.5: (33 commits)
    htools: remove dead code
    hail: don't select the primary as new secondary
    hail: add an extra safety check in relocate
    Fix RAPI documentation for gnt-instance console
    Add SPICE compression and streaming options...
25993e57 08/31/2011 01:58 pm Tsachy Shacham

cmdlib: Support for CPU pinning

Signed-off-by: Tsachy Shacham <>
Reviewed-by: Michael Hanselmann <>

ab5f0e96 08/31/2011 11:42 am Agata Murawska

Fix for auto parameters on import

Signed-off-by: Agata Murawska <>
Reviewed-by: Michael Hanselmann <>

b459a848 08/30/2011 11:24 am Andrea Spadaccini

DeprecationWarning fixes for pylint

In version 0.21, pylint unified all the disable-* (and enable-*)
directives to disable (resp. enable). This leads to a lot of
DeprecationWarning being emitted even if one uses the recommended
version of pylint (0.21.1, as stated in devnotes.rst)....

fe00ccef 08/26/2011 05:33 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5:
    Delete master IPs from mergee master nodes
    Use pep8 utility in “make lint”
    Two more PEP8 fixes
    check-python-code: Give location(s) of lines longer than 80 chars

Signed-off-by: Michael Hanselmann <>...

8e47b5da 08/26/2011 02:57 pm Michael Hanselmann

Two more PEP8 fixes

cmdlib: Avoid wrapping using backslash

gnt_group: Avoid * magic using keyword arguments (the “pep8” tool
doesn't like the inline comment in this case and will complain about
spaces around the “
*” operator)

Signed-off-by: Michael Hanselmann <>...

8913ab40 08/25/2011 02:13 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5: (32 commits)
    PEP8 style fixes
    Wrap a few long lines
    listrunner: Avoid exception if machine is rebooted
    Remove wrong type declaration from option
    Fix wrong method name in cluster-merge
    Fix --skip-stop-instances help message...
e687ec01 08/25/2011 01:53 pm Michael Hanselmann

PEP8 style fixes

Identified using the “pep8” utility.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

e8448672 08/24/2011 05:32 pm Agata Murawska

Allow importing instance with full auto parameters

Signed-off-by: Agata Murawska <>
Reviewed-by: Michael Hanselmann <>

45fe090b 08/24/2011 01:12 pm Michael Hanselmann

Disk template is no longer required when importing instance

… provided that disk_template value is set in the config.ini file.

Signed-off-by: Agata Murawska <>
Signed-off-by: Michael Hanselmann <>
Reviewed-by: Michael Hanselmann <>

b7d7876b 08/19/2011 04:23 pm Agata Murawska

Documentation fix for importing with --src-dir option

Signed-off-by: Agata Murawska <>
Reviewed-by: Michael Hanselmann <>

562468d6 08/17/2011 04:27 pm René Nussbaumer

Get rid of {disk,nic}_count variables

This also fixes an issue if "disk_template = diskless" and no
"disk_count" was specified, while doing an import of said instance
specifications.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

905108ab 08/12/2011 04:43 pm Michael Hanselmann

Small improvements for cluster verify

- Check if BGL is actually owned
- Show group name as feedback

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

ee13764f 08/12/2011 03:52 pm Michael Hanselmann

Allow locking to be used via OpQuery

The original design for query2 specifically excluded locking, but now
it's turned out that it would be a good thing to have in watcher. This
patch adds a new parameter to OpQuery and enables its use in LUQuery. A
missing function is added to LUGroupQuery, a comment clarified in...

f7686867 08/12/2011 03:12 pm Michael Hanselmann

Change OpClusterVerifyConfig's result, verify results

This patch removes the list of node groups (not used anymore since
commit fcad7225e3fc) from OpClusterVerifyConfig's result and adds result
verification to all OpClusterVerify* opcodes.

Signed-off-by: Michael Hanselmann <>...

fcad7225 08/12/2011 12:02 pm Michael Hanselmann

Use LU-generated jobs for verifying cluster

This patch moves the logic for verifying the various node groups in a
cluster into the master daemon. Job dependencies are used to ensure the
configuration, which requires the BGL, is verified first.

With this change it will be possible to expose whole-cluster...

e3a19474 08/08/2011 01:30 pm Iustin Pop

Allow fixing of split instances via relocate

Currently, the IAllocator code requests strictly that the (set of) groups of
the nodes we're relocating from is equal to the set of groups we're
relocating to.

This, however, makes is impossible to fix split instances, since (by...

f5fab862 08/08/2011 12:12 pm Iustin Pop

Further cleanup after multi-evacuate removal

Commit f0edfcf6 removed the parsing of multi-evacuate result, but the
code went from:

if mode in (multi-evac, relocate):

if mode relocate:

to:

if mode  relocate:

if mode == relocate...
2f41ea77 08/08/2011 12:11 pm Iustin Pop

Fix bug in IAllocator parsing of Evacuate result

Commit 342f9172 added stricter checks for the iallocator result in
evacuate mode, but it does this irrespective of the result
status. When the result has failed and (according to the design) the
list of nodes is empty, this code will trigger the following:...

f0edfcf6 08/05/2011 04:48 pm Michael Hanselmann

Remove iallocator's “multi-evacuate” mode

It is no longer used and has been deprecated in 2.5.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

ce4cd929 08/05/2011 04:40 pm Michael Hanselmann

Add docstring to cmdlib.TLReplaceDisks._FindFaultyDisks

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

cb386168 08/05/2011 02:58 pm Michael Hanselmann

LUGroupVerifyDisks: Use _CheckInstanceNodeGroups' result

… instead of getting the list of instances once again from the
configuration.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

b9ff3e15 08/05/2011 02:58 pm Michael Hanselmann

cmdlib: Factorize checking node groups' instances

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

12126847 08/04/2011 05:01 pm Apollon Oikonomopoulos

Remove 15-second sleep from LUInstanceCreate

Remove 15 second sleep when wait_for_sync is not set. LUInstanceCreate already
calls _WaitForSync with oneshot=True, which already performs an internal
wait-loop for disks to start syncing.

Signed-off-by: Apollon Oikonomopoulos <>...

af993a2c 08/04/2011 05:01 pm Iustin Pop

Add a readability alias

lu.glm.list_owned becomes lu.owned_locks, which is clearer for the
reader.

Also rename three variables (which were before named owned_locks) to
make clearer what they track.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

1aef3df8 08/04/2011 04:18 pm Michael Hanselmann

Add opcode to change instance's group

This is quite similar to evacuating a group, but the locking
is different.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

eafa26af 08/04/2011 04:18 pm Michael Hanselmann

Factorize checking instance's node groups

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

de9c12f7 08/04/2011 01:27 pm Michael Hanselmann

Lock potential target nodes for group evacuation

All potential target nodes should be locked while calculating
a group evacuation.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

6e80da8b 08/04/2011 01:27 pm Michael Hanselmann

Small changes in group evacuation

- Use OpPrereqError in CheckPrereq
- Clarify command synopsis

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

a14065ac 08/04/2011 01:26 pm Michael Hanselmann

cmdlib: Factorize getting iallocator

The same logic will be used for changing an instance's group.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

41e1e79e 08/03/2011 07:35 pm Apollon Oikonomopoulos

Pause DRBD sync for OS install if not wait_for_sync

When wait_for_sync is set to False in LUInstanceCreate, Ganeti lets DRBD sync
in the background while performing the rest of the installation steps,
including OS installation.

However, OS installation is a very disk-intensive task that intereferes badly...

71333cb9 08/03/2011 05:41 pm Iustin Pop

Optimise use of repeated/looping GetInstanceInfo

Similar to the previous patch, this adds a helper function to
eliminate repeated calls info ConfigWriter.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

f5eaa3c1 08/03/2011 05:41 pm Iustin Pop

Optimise use of repeated/looping GetNodeInfo

This adds a new ConfigWriter.GetMultiNodeInfo function and replaces
multiple/looping calls to GetNodeInfo with it.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

7c070961 08/02/2011 04:12 pm Iustin Pop

Fix types passed to IAllocator

Iallocator mode reloc, parameter reloc_from takes a list; half of the
code already forced this parameter to list, we add the other two cases
where it is needed.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

fab9573b 08/02/2011 12:08 pm Michael Hanselmann

Add primary/second nodes' group as query fields

These will be very useful for ganeti-watcher as it needs to retrieve
instances by group.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

35007011 07/28/2011 02:08 pm Iustin Pop

Remove requirement for variants on OS API v15+

This removes:

- the check in backend that such OSes have a variants file or if it
exists that is non-empty; in order for this to work, we also rework
the logic in backend._TryOSFromDisk to allow for optional OS files...

f39b695a 07/28/2011 11:16 am Iustin Pop

Fix group verification of offline nodes

Commit aef59ae7 reworked the file verification, but forgot to take
into account offline nodes.

The fact that this was not detected yet is due to the fact that we
don't test clusters with offline nodes in QA :(

Signed-off-by: Iustin Pop <>...

6ba2bdc2 07/27/2011 03:50 pm Iustin Pop

Disallow variants for OSes that don't support them

Otherwise we get no variant checks at all, but the variant is still
recorded.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

9f039737 07/26/2011 02:22 pm Iustin Pop

Add helper for declaring all locks shared

This patch adds a function for abstracting
“dict.fromkeys(locking.LEVELS, 1)”. It also removes a duplicate
assignment for the share_locks in LUInstanceQuerydata.

Additionally, it moves the _SupportsOob function to the helper...

ae1a845c 07/26/2011 01:53 pm Michael Hanselmann

Change OpClusterVerifyDisks to per-group opcodes

Until now verifying disks, which is also used by the watcher,
would lock all nodes and instances. With this patch the opcode
is changed to operate on per nodegroup, requiring fewer locks.

Both “gnt-cluster” and “ganeti-watcher” are changed for the...

c4ff2275 07/26/2011 01:53 pm Michael Hanselmann

cmdlib: Give instance name in error message on group evacuation

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

3ddd94f9 07/26/2011 01:53 pm Michael Hanselmann

cmdlib: Factorize mapping instance LVs to node/volume

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

d0c8c01d 07/25/2011 04:55 pm Iustin Pop

Most boring patch ever

s/'/"/ in (hopefully) the right places.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

f965260c 07/22/2011 02:32 pm Michael Hanselmann

gnt-instance info: Return static info if node offline

Before this patch “gnt-instance info” would fail with the error message
“Error checking node $node: Node is marked offline” if the instance's
primary node is marked offline and the user didn't explicitely request...

3b61ee44 07/22/2011 02:30 pm Michael Hanselmann

Ignore offline primary when failing over

When the source node for a failover is marked offline, there's no need
to require the user to specify “--ignore-consistency”.

To make it work at all, a number of bugs introduced by the merge of
migration and failover are also fixed by this patch....

dbfde874 07/22/2011 12:07 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    gnt-node volumes: Fix instance names

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

4b413e49 07/22/2011 12:00 pm Michael Hanselmann

gnt-node volumes: Fix instance names

Commit 84d7e26b changed “objects.Instance.MapLVsByN” to not just return
the LV name, but to include the volume group name (e.g.
“xenvg/d67e8700….disk0_data”). This in turn broke the mapping of volume
names in LUNodeQueryvols, stopping instance names from displayed in...

463f75a5 07/21/2011 04:25 pm Michael Hanselmann

Fix instance failover (missing argument)

More fallout from commit 323f9095b49d.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

67a315ba 07/21/2011 02:20 pm Michael Hanselmann

Add error state to LUGroupEvacuate's exceptions

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

08f8c82c 07/21/2011 12:39 pm Michael Hanselmann

Add new opcode for evacuating group

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

7bb60c2d 07/21/2011 08:33 am Michael Hanselmann

Fix node evacuation

- Adjust for new iallocator result format
- Split some code into helper functions

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

b795a775 07/11/2011 05:53 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    ht: Add new check for numbers
    Fix off-by-one bug in job serial generation
    Shorten some unbreakable lines in man pages
    Correct some spelling mistakes
    Fix bug in recreate-disks for DRBD instances
    Fix a lint warning...
323f9095 07/08/2011 03:15 pm Stephen Shirley

Add gnt-instance start --pause

Creates the instance, but pauses execution before booting. This combined
with 'gnt-instance console' unpausing instances means that the entire
boot process can be viewed and monitored.

Signed-off-by: Stephen Shirley <>...

21d70642 07/06/2011 12:31 am Michael Hanselmann

Remove old node evacuation opcode

LUNodeEvacStrategy has been replaced with LUNodeEvacuate.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

e1f23243 07/06/2011 12:31 am Michael Hanselmann

Add new opcode to evacuate node

This new opcode will replace LUNodeEvacStrategy, which used to return a
list of instances and new secondary nodes. With the new opcode the
iallocator (if available) is tasked to generate the necessary operations
in the form of opcodes. This moves some logic from the client to the...

d748d9a7 07/01/2011 05:43 pm Iustin Pop

Fix cluster verify for empty node groups

There were some implicit assertions in the code that all node groups
have nodes, which is not necessarily true.

Additionally, the patch does a wrapping change.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

b768099e 06/28/2011 06:02 pm Iustin Pop

Fix bug in recreate-disks for DRBD instances

The new functionality in 2.4.2 for recreate-disks to change nodes is
broken for DRBD instances: it simply changes the nodes without caring
for the DRBD minors mapping, which will lead to conflicts in non-empty...

78ff9e8f 06/28/2011 06:02 pm Iustin Pop

Fix a lint warning

Patch db8e5f1c removed the use of feedback_fn, hence pylint warn
now.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

db8e5f1c 06/27/2011 01:53 pm Iustin Pop

Fix bug in drbd8 replace disks on current nodes

Currently the drbd8 replace-disks on the same node (i.e. -p or -s) has
a bug in that it does modify the instance disk temporarily before
changing it back to the same value. However, we don't need to, and
shouldn't do that: what this operation do is simply change the LVM...

de2b0d1d 06/23/2011 05:47 pm Guido Trotter

Merge branch 'devel-2.4'

  • devel-2.4:
    LUInstanceCreate: use opcodes.RequireFileStorage
    Don't add ",boot=on" to disks on kvm >= 0.14
    KVM: fix per-instance stored UID value

Conflicts:
lib/cmdlib.py
- use RequireSharedFileStorage there

Signed-off-by: Guido Trotter <>...

7afca87f 06/23/2011 04:51 pm Guido Trotter

LUInstanceCreate: use opcodes.RequireFileStorage

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

2492231f 06/17/2011 03:57 pm Guido Trotter

Merge branch 'devel-2.4'

  • devel-2.4:
    Add one forgotten element to the file disk path

Signed-off-by: Guido Trotter <>
Reviewed-by: René Nussbaumer <>

00ca374a 06/17/2011 03:57 pm Guido Trotter

Add one forgotten element to the file disk path

This was left out during the fix/refactoring

Signed-off-by: Guido Trotter <>
Reviewed-by: René Nussbaumer <>

08b000be 06/17/2011 02:36 pm Guido Trotter

Merge branch 'devel-2.4'

  • devel-2.4:
    LUInstanceCreate: fix file storage dir calculation
    Check that filestorage is enabled when requested
    Remove self.op.file_storage_dir isabs check

Conflicts:
lib/cmdlib.py
- use constants.DTS_FILEBASED...

c16915bd 06/17/2011 02:26 pm Guido Trotter

Add DTS_FILEBASED constant

Signed-off-by: Guido Trotter <>
Reviewed-by: René Nussbaumer <>

d2129ac4 06/17/2011 02:26 pm Guido Trotter

LUInstanceCreate: fix file storage dir calculation

- Move the calculation at the beginning of CheckPrereq, since it doesn't
modify any state, but still keeps locks
- Only perform the calculation if the actual disk template is filebased
- Error out if there is no defined file storage dir...

1bb1e297 06/17/2011 02:26 pm Guido Trotter

Check that filestorage is enabled when requested

Signed-off-by: Guido Trotter <>
Reviewed-by: René Nussbaumer <>

2112772e 06/17/2011 02:25 pm Guido Trotter

Remove self.op.file_storage_dir isabs check

As the manpage says, and the code does, self.op.file_storage_dir is an
additional relative path under the cluster file storage dir. As such it
should not be absolute.

Signed-off-by: Guido Trotter <>...

60152bbe 06/15/2011 06:11 pm Michael Hanselmann

Replace iallocator's mreloc w/ change-group and node-evac

This patch removes all occurrences of the “multi-relocate” iallocator
mode. Commit 25ee7fd845 updated the design document and introduced
separate modes, “change-group” and “node-evacuate”. The constants aren't...

fceb01fe 06/08/2011 08:44 am Michael Hanselmann

Fix locking issues in LUClusterVerifyGroup

- Use functions in ConfigWriter instead of custom loops
- Calculate nodes only once instances locks are acquired, removes one
potential race condition
- Don't retrieve lists of all node/instance information without locks...

c5312a10 06/08/2011 08:44 am Michael Hanselmann

cmdlib: Acquire BGL for LUClusterVerifyConfig

LUClusterVerifyConfig verifies a number of configuration settings. For
doing so, it needs a consistent list of nodes, groups and instances. So
far no locks were acquired at all (except for the BGL in shared mode)....

fbb2c636 06/07/2011 03:32 pm Michael Hanselmann

Export/import instance tags

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

0f8810df 06/07/2011 03:31 pm Michael Hanselmann

Fix issue with tags on instance creation

Commit 720f56c85a added the ability to specify tags when creating an
instance. The “tags” attribute of an instance object needs to be a set,
but the patch's code saved it as a list, causing breakage in other parts...

9dfa16fc 06/01/2011 08:24 pm Apollon Oikonomopoulos

Export instance tags to instance hooks

Instance hooks now get an INSTANCE_TAGS environment variable, which contains a
space-delimited list of the affected instance's tags.

Also update the documentation to reflect the change.

Signed-off-by: Apollon Oikonomopoulos <>...

720f56c8 06/01/2011 08:24 pm Apollon Oikonomopoulos

Add tag handling to {Op,LU}InstanceCreate

Add a tag slot to opcodes.OpInstanceCreate. We do not reuse _PTags, as this is
intended for OpTagsSet and thus:

a) is not documented
b) does not carry a default value, making it mandatory

Also pass the tags to the iallocator during instance creation....

297b0cd3 05/31/2011 12:40 pm Iustin Pop

iallocator: add ht-checking for the request

Currently, we only ht-check the result value from the iallocator, and
we send whatever we happen to check manually in the LUs that call the
iallocator.

This is not good, as we have to duplicate checks in many places, and...

dd47a0f0 05/31/2011 12:40 pm Iustin Pop

iallocator: rename mem_size to memory

Currently, the iallocator in 'allocate' requires mem_size on input
but serialises that as 'memory'. This inconsistency makes it hard to
automatically validate the parameters, hence this patch renames
mem_size.

Signed-off-by: Iustin Pop <>...

36bbf5b0 05/31/2011 12:40 pm Iustin Pop

iallocator: change default for target_groups

Per the design doc, the target_groups request key "if present, it must
either be the empty list, or contain a list of group UUIDs". Currently
it defaults to None/null, which is not valid.

Signed-off-by: Iustin Pop <>...

ea4dc982 05/31/2011 12:40 pm Iustin Pop

iallocator: export the hypervisor value

In 'allocate' mode, the documentation specifies that we export the
hypervisor value (“Allocation needs, in addition: … hypervisor, the
hypervisor of this instance”) and we need that on input, however we
don't actually export it....

509bec87 05/31/2011 12:40 pm Iustin Pop

iallocator: fix incomplete refactoring

Commit fdbe29ee changed the iallocator modes from 'r'/'w' to
'ro'/'rw', but forgot one check in LUTestAllocator. This patch just
completes the replacements.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

b7a1c816 05/30/2011 06:07 pm Michael Hanselmann

gnt-node migrate: Use LU-generated jobs

Until now LUNodeMigrate used multiple tasklets to evacuate all primary
instances on a node. In some cases it would acquire all node locks,
which isn't good on big clusters. With upcoming improvements to the LUs
for instance failover and migration, switching to separate jobs looks...

a9b42993 05/26/2011 03:40 pm Michael Hanselmann

TLReplaceDisks: Move assertion checking locks

Commit 1bee66f3 added assertions for ensuring only the necessary locks
are kept while replacing disks. One of them makes sure locks have been
released during the operation. Unfortunately the commit added the check...

f8fa4175 05/25/2011 05:55 pm Michael Hanselmann

Fix bug in LUNodeMigrate

Commit aac4511a added CheckArguments to LUNodeMigrate with a call to
_CheckIAllocatorOrNode. When no default iallocator is defined,
evacuating a node would always fail:

$ gnt-node migrate node123
Migrate instance(s) '...'?
y/[n]/?: y...

df0d116f 05/24/2011 07:52 pm Michael Hanselmann

Merge branch 'devel-2.4'

  • devel-2.4:
    node evac: don't call IAllocator if no instances

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

cb156a3e 05/24/2011 07:48 pm Iustin Pop

node evac: don't call IAllocator if no instances

Currently we generate an empty list only for the '-n node' invocation,
but for iallocator we still call the iallocator (which needs an RPC
call, etc.). By moving the computation of instances outside of the if...

e0508c86 05/20/2011 06:20 pm Guido Trotter

Fix a couple of style mistakes

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

adfa3b26 05/20/2011 01:37 pm Adeodato Simo

Cluster verify: check for nodes/instances with no group

Previously, all nodes and instances would always be visited/verified. By
driving the verification by node group now, we will miss nodes and
instances that can't be reached from existing node groups, should that rare...

fe870648 05/20/2011 01:37 pm Adeodato Simo

Cluster verify: fix LV checks for split instances

When sharding by group, if a mirrored instance is split (primary and
secondary) between two groups, its volumes will not be properly checked:
the group of the primary will warn about a missing volume in the secondary,...

2dad1652 05/20/2011 01:37 pm Adeodato Simo

Cluster verify: make NV_NODELIST smaller

To cope with increasing cluster sizes, we now make nodes try to contact all
other nodes in their group, and one node from every other group.

Signed-off-by: Adeodato Simo <>
Signed-off-by: Guido Trotter <>...

d23a2a9d 05/20/2011 01:37 pm Adeodato Simo

Cluster verify: verify hypervisor parameters only once

The list of all hypervisor parameters has to be computed in
LUClusterVerifyGroup, since it needs to be passed to nodes as
NV_HVPARAMS. However, it is better only to verify said parameters once,
out of LUClusterVerifyConfig....

bf93ae69 05/20/2011 01:37 pm Adeodato Simo

Split LUClusterVerify into LUClusterVerify{Config,Group}

With this change, LUClusterVerifyConfig becomes a "light" LU that only
verifies the global config and other, master-only settings, and the bulk of
node/instance verification is done by LUClusterVerifyGroup, which only acts...

a5c30dc2 05/20/2011 01:37 pm Adeodato Simo

Cluster verify: factor out error codes and functions

We move all error code definitions, plus the _Error and _ErrorIf helpers,
to a private _VerifyErrors mix-in class that can be later shared by the new
two cluster verify LUs.

(_Error and _ErrorIf code was moved around verbatim, except to disable...

14970c32 05/20/2011 01:37 pm Adeodato Simo

Cluster verify: make "instance runs in wrong node" node-driven

Previously, the "instance should not be running in this node" error was
computed by verifying, for each instance, whether any node other than its
primary was running it. But this is not a well-suited approach if we were...

4e272d8c 05/20/2011 01:37 pm Guido Trotter

Verify an absent vm_capable node for files

If we're not verifying all nodes, adding a node outside the current
group for file checksums helps us making sure checksums are the same in
all of the cluster.

Signed-off-by: Guido Trotter <>...

2f10179b 05/20/2011 01:37 pm Adeodato Simo

Cluster verify: master must be present for _VerifyFiles

This commit prepares the call to _VerifyFiles for the case when the master
node is not one of the nodes that's being verified (which will be the case
for all node groups but one). We fix it by always passing master info and...

cf692cd0 05/20/2011 01:37 pm Adeodato Simo

Cluster verify: don't assume we're verifying all nodes/instances

This commit fixes a few initial simple cases in which it was assumed that
we're always working over the whole cluster. With this change, we
differentiate between "nodes/instances to verify" and "checks that need...

c711d09e 05/20/2011 01:37 pm Adeodato Simo

Cluster verify: gather node/instance list in CheckPrereq

This commit introduces no behavior changes, and is only a minor refactoring
that aids with a cleaner division of future LUClusterVerify work. The
change consists in:

- substitute the {node,instance}{list,info} structures previously created...
6aac5aef 05/20/2011 11:11 am Iustin Pop

Merge remote branch 'origin/devel-2.4'

  • origin/devel-2.4:
    Fix errors in hooks documentation
    Clarify a bit the noded man page
    Note --no-remember in NEWS
    Switch QA over to using instance stop --no-remember
    Implement no_remember at RAPI level
    Implement no_remember at CLI level...
a01225a6 05/19/2011 01:54 pm Michael Hanselmann

iallocator: Stricter check for multi-evac result

Check new secondary nodes' group like it's already done for
multi-relocation requests.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

3d45d304 05/19/2011 01:54 pm Michael Hanselmann

cmdlib: Use ganeti.ht for checking iallocator result

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>