Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ 909b3a0e

History | View | Annotate | Download (481.1 kB)

# Date Author Comment
5a8648eb 10/05/2011 12:05 pm Andrea Spadaccini

Add cluster netmask parameter

Add the master_netmask cluster parameter, that represents the netmask of
the master IP, encoded as a CIDR suffix.

This parameter can be set via the --master-netmask of gnt-cluster init
and gnt-cluster modify. The default behaviour is to be consistent with...

ea9c753d 10/04/2011 09:34 pm Andrea Spadaccini

Merge branch 'devel-2.5'

  • devel-2.5:
    cluster-merge: log an info message at node readd
    Bump version to 2.5.0~rc1
    Fix issue when verifying cluster files
    Revert "utils.log: Write error messages to stderr"
    Fix adding nodes after commit 64c7b3831dc...
a080bab8 10/04/2011 09:32 pm Andrea Spadaccini

Merge branch 'stable-2.5' into devel-2.5

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: René Nussbaumer <>

170b02b7 10/04/2011 11:33 am Michael Hanselmann

Fix issue when verifying cluster files

If a cluster has any non-master-candidate nodes, those don't contain all
files (e.g. config.data). With commit aef59ae764dc (March 31st, 2011)
the logic was changed and subsequently verifying a cluster with non-mc
nodes would complain....

ca6b16e5 10/03/2011 01:52 pm Michael Hanselmann

Fix adding nodes after commit 64c7b3831dc

Commit 64c7b3831dc changed the RPC call for verifying SSH connections.
Unfortunately this case in adding nodes was missed.

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

64c7b383 09/30/2011 07:04 pm Michael Hanselmann

LUClusterVerifyGroup: Spread SSH checks over more nodes

When verifying a group the code would always check SSH to all nodes in
the same group, as well as the first node for every other group. On big
clusters this can cause issues since many nodes will try to connect to...

3398bff1 09/30/2011 06:23 pm Andrea Spadaccini

Merge branch 'devel-2.5'

  • devel-2.5:
    Use --yes to deactivate master ip in cluster merge
    Use deactivate-master-ip in cluster-merge
    Add gnt-cluster commands to toggle the master IP
    Split starting and stopping master IP and daemons
    listrunner: Don't pass arguments if there are none...
cea3abbd 09/30/2011 05:45 pm Andrea Spadaccini

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    listrunner: Don't pass arguments if there are none
    ssh: Quote strings in error message
    utils.log: Write error messages to stderr
    Add signal handling doc to hbal man page
    Fix handling of cluster verify hooks...
fb44c6db 09/30/2011 03:43 pm Andrea Spadaccini

Add gnt-cluster commands to toggle the master IP

lib/client/gnt_cluster.py:
  • Add activate-master-ip and deactivate-master-ip commands
man/gnt-cluster.rst:
  • Document the new commands
lib/opcodes.py lib/cmdlib.py
  • Add two opcodes and the LU that call the relevant RPCs...
c06e0c83 09/30/2011 03:42 pm Andrea Spadaccini

Split starting and stopping master IP and daemons

lib/backend.py
  • split StartMaster() in ActivateMasterIp() and StartMasterDaemons()
  • split StopMaster() in DeactivateMasterIp() and StopMasterDaemons()
lib/server/noded.py, lib/rpc.py
  • adapt the call chains to the new functions, define new RPCs...
fb926117 09/30/2011 02:06 pm Andrea Spadaccini

Add gnt-cluster commands to toggle the master IP

lib/client/gnt_cluster.py:
  • Add activate-master-ip and deactivate-master-ip commands
man/gnt-cluster.rst:
  • Document the new commands
lib/opcodes.py lib/cmdlib.py
  • Add two opcodes and the LU that call the relevant RPCs...
fb460cf7 09/30/2011 02:05 pm Andrea Spadaccini

Split starting and stopping master IP and daemons

lib/backend.py
  • split StartMaster() in ActivateMasterIp() and StartMasterDaemons()
  • split StopMaster() in DeactivateMasterIp() and StopMasterDaemons()
lib/server/noded.py, lib/rpc.py
  • adapt the call chains to the new functions, define new RPCs...
61643226 09/29/2011 12:41 pm Andrea Spadaccini

Add memory transfer progress info to migration

  • hypervisor/hv_kvm.py
    - parse the memory transfer status
  • cmdlib.py
    - represent memory transfer info, if available

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Michael Hanselmann <>

6a1434d7 09/29/2011 12:41 pm Andrea Spadaccini

Make migration RPC non-blocking

To add status reporting for the KVM migration, the instance_migrate RPC
must be non-blocking. Moreover, there must be a way to represent the
migration status and a way to fetch it.

  • constants.py:
    - add constants representing the migration statuses...
34fbc862 09/28/2011 02:34 pm Andrea Spadaccini

Migration: warn the user about hv version mismatch

  • hv_kvm.py, hv_xen.py
    - return the hypervisor version (if available) from GetNodeInfo
  • cmdlib.py
    - if hypervisor version is available during the migration, and the
    versions differ, warn the user...
3656c889 09/28/2011 02:27 pm Iustin Pop

Fix handling of cluster verify hooks

The change to enforce boolean results for cluster verify group opcode
missed the HooksCallBack, which uses a very ugly 1/0
logic. Furthermore, the logic is wrong, since it unconditionally
resets the verify result to true....

835f8b23 09/28/2011 12:13 pm Iustin Pop

Redistribute the RAPI certificate

This reverts to the old behaviour in Ganeti 2.4 and before.

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

5916e61a 09/20/2011 06:50 pm Andrea Spadaccini

Merge branch 'devel-2.5'

  • devel-2.5:
    Add tls_ciphers and use_vdagent options
    Updated man pages with new SPICE TLS options
    Implementation of TLS-protected SPICE connections
    Added SPICE TLS option and related cert paths
    Fix OS creation's error handling when pausing sync...
fac30cea 09/20/2011 04:35 pm Faidon Liambotis

Fix OS creation's error handling when pausing sync

Commit 41e1e79 introduced a feature in which when wait_for_sync is not
set, DRBD sync is paused during the OS installation.

Doing so, however, broke OS creation's error handling: the result value
from the instance_os_add RPC call was overwritten by the one of the...

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...