Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ 6ef37395

History | View | Annotate | Download (583.5 kB)

# Date Author Comment
b8028dcf 12/19/2012 06:29 pm Michael Hanselmann

Replace frozenset with compat.UniqueFrozenset

This is not a trivial s/frozenset/compat.UniqueFrozenset/, but rather
only replaces “frozenset” where appropriate. Most of the places are
“static” information that doesn't change after the module has been
loaded....

45317e3a 12/19/2012 03:45 pm Iustin Pop

Remove some unused Python code

This patch removes code which is no longer used due to refactoring:

- http.InitSsl, last usage removed in commit 33231500 (“Convert RPC
client to PycURL”)
- rapi.baserlib.MakeParamsDict, last usage remove in commit 4e5a68f8...

0d57ce24 12/19/2012 01:02 pm Guido Trotter

Allow shutting down offline instance

If an instance is offline we definitely shouldn't start it up.
But shutting it down, should it be up by mistake is not "that" bad.
Still, we only allow it with --force, as it still performs an action on
an instance we shouldn't touch. This should make everybody happy....

eec7840a 12/19/2012 01:01 pm Guido Trotter

Allow running instances to be put online

If an instance is running (eg. ERROR_up) and at the same time offline,
there's no way to either shut it down or reonline it. This allows
onlining it. Offlining is still disabled for running instances.

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

05325a35 12/18/2012 04:09 pm Bernardo Dal Seno

Fixes and improvements to comments

Some fixes, added more information in a few points, removed a stale (5+
year old) TODO comment.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Guido Trotter <>

114e8500 12/18/2012 02:07 pm Dimitris Aragiorgis

Make LUNetworkAdd pass _VerifyLocks()

LEVEL_NODE_ALLOC should be aquired too if LEVEL_NODE is ALL_SET.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Michael Hanselmann <>

af797be5 12/17/2012 06:16 pm Michael Hanselmann

_DeclareLocksForMigration: Fix non-DRBD locking issue

When non-DRBD disks are used for an instance,
“lu.needed_locks[locking.LEVEL_NODE]” is set to “locking.ALL_SET” (which
is None). The assertion will then fail as None evaluates to False.

Reported by Constantinos Venetsanopoulos....

d4e4b2fd 12/17/2012 05:44 pm Michael Hanselmann

LUOobCommand: Always declare NAL in shared mode

Doing so avoids triggering an assertion in mcpu which cross-checks the
node lock and node allocation lock acquisition mode.

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

1d645825 12/17/2012 01:38 pm Iustin Pop

Fix two logging messages in TLReplaceDisks

Commit f0f8d060 (“Show old primary/secondary node on disk
replacement”) added two wrong uses of feedback_fn, which results in
log entries such like these:

"log": [
[
7, [1351258326, 466214], "message", "Replacing disk(s) 0 for instance 'instance1.example.com'"...
5448799c 12/14/2012 04:55 pm Iustin Pop

Fix an small but quite nasty typo

Introduced in commit d4752785.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

57fb6fcb 12/14/2012 04:28 pm Guido Trotter

Very very very basic openvswitch support

This is a "better than nothing" support, just for kvm and just joining
the machine to the opevswitch bridge with the right command.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>...

e21c2eec 12/13/2012 07:16 pm Constantinos Venetsanopoulos

Pass check_ip and not hostname.ip to _ComputeNics

This should be done because in the case of --no-name-check there
is no 'hostname.ip' attribute, causing an execution error.
'check_ip' is always set (in CheckArguments) even if --no-name-check
is passed in the command line....

ec5af888 12/13/2012 01:29 pm Michael Hanselmann

Read watcher pause using RPC, not directly

The master daemon should not directly read files written by the node
daemon. This patch adds a new RPC to read the watcher pause file and
changes the master code to use it.

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

518a45e5 12/07/2012 02:47 pm Michael Hanselmann

Add error code for temporary lack of resources

When an instance creation uses opportunistic locks, the iallocator might
not be able to find an allocation solution if not enough node locks (or
a suboptimal subset thereof) were acquired. As per the design document...

78bfb560 12/07/2012 02:45 pm Michael Hanselmann

cmdlib: Use locked nodes as node whitelist

Also actually start using opportunistic locks (if requested).

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

b3c728dc 12/07/2012 02:36 pm Michael Hanselmann

cmdlib: Node whitelist support for allocation request

Forward the node whitelist to the iallocator plugin.

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

ba6eda59 12/07/2012 02:35 pm Michael Hanselmann

_ExportQuery: Use node allocation lock

Block instance allocations when all node locks will be acquired.

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

38446261 12/07/2012 02:35 pm Michael Hanselmann

LUBackupExport: Use node allocation lock

Block instance allocations when all node locks will be acquired.

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

dc7d923e 12/07/2012 02:35 pm Michael Hanselmann

LUBackupRemove: Use node allocation lock

Block instance allocations when all node locks will be acquired.

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

5df1c9aa 12/07/2012 02:32 pm Michael Hanselmann

LUInstanceMultiAlloc: Use node allocation lock

Avoid conflicts between instance allocations.

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

32bea623 12/07/2012 02:32 pm Michael Hanselmann

LUInstanceRecreateDisks: Use node allocation lock

Block instance allocations when all node locks will be acquired.

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

48126102 12/07/2012 02:32 pm Michael Hanselmann

LUNodeSetParams: Use node allocation lock

Block instance allocations when all node locks will be acquired.

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

7254c0a9 12/07/2012 02:32 pm Michael Hanselmann

LUNodeQueryvols: Use node allocation lock

Block instance allocations when all node locks will be acquired.

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

cfae7671 12/07/2012 02:32 pm Michael Hanselmann

LUOobCommand: Use node allocation lock

If no node names are given, all node locks are acquired.

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

f22433c0 12/06/2012 01:37 pm Dimitris Aragiorgis

Locking related fixes for networks

Use GetNetwork() only when having already aquired the lock,
i.e. in CheckPrereq().

In LUNetworkConnect/Disconnect do not include Network info in Hooks
environment, so that network locking can be avoided if conflicts
are not checked....

ca519248 12/05/2012 05:04 pm Dimitris Aragiorgis

Use new util function for mac_prefix validation

Use new NormalizeAndValidateThreeOctetMacPrefix() util function in
LUNetworkAdd/LUNetworkSetParams to validate network's MAC prefix.
Additionally, move the check in CheckArguments() in the case of
LUNetworkAdd....

26e88cde 12/05/2012 01:00 pm Michael Hanselmann

LUClusterRedistConf: Use node allocation lock

All node locks are acquired.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

9cbfc69a 12/05/2012 01:00 pm Michael Hanselmann

LUClusterRepairDiskSizes: Use node allocation lock

This opcode acquires all node resource locks, which conflicts with
instance allocations.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

51305499 12/05/2012 01:00 pm Michael Hanselmann

LUGroupVerifyDisks: Use node allocation lock

See comment in code.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

9fa08c84 12/05/2012 01:00 pm Michael Hanselmann

LUClusterVerifyGroup: Use node allocation lock

See comment in code.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

ec272bab 12/05/2012 01:00 pm Michael Hanselmann

LUInstanceReplaceDisks: Acquire node allocation lock

If the lock was acquired in the first place (only when an iallocator is
used), it is released as soon as possible.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

de5967da 12/05/2012 12:46 pm Michael Hanselmann

LUInstanceChangeGroup: Acquire node allocation lock

Changing instances' groups shouldn't conflict with instance allocations.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

a0150c51 12/05/2012 12:44 pm Michael Hanselmann

Acquire node allocation lock during node query

If locking is used (usually by ganeti-watcher), node allocations must be
temporarily blocked.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

ef66500f 12/04/2012 04:26 pm Michael Hanselmann

Fix locking mistake introduced in commit 5cc1f88

The node resource locks were not set correctly on instance import.

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

dbd1264a 12/04/2012 12:57 pm Michael Hanselmann

LUClusterSetParams: Use node allocation lock

All resources are acquired and opportunistic instance creations would
fail. Also add a TODO.

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

5cc1f887 12/04/2012 12:56 pm Michael Hanselmann

LUInstanceCreate: Acquire node allocation lock

Opportunistic locks are not yet used. This patch changes
LUInstanceCreate to acquire the node allocation lock to avoid conflicts
with other opcodes acquiring many node locks.

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

2cb3181a 12/04/2012 12:56 pm Michael Hanselmann

Acquire node allocation lock for failover/migration

See code for an explanatory comment. The lock is released as soon as
possible.

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

1dacbb06 12/04/2012 12:47 pm Dimitris Aragiorgis

Use GetMultiInstanceInfo in LUNetwork* opcodes

LUNetworkConnect/Disconnect looks up a nodegroup's instances for
conflicting IPs. To do so, use GetNodeGroupInstances() and
GetMulitInstanceInfo().

Additionally, check if the correct locks were acquired.

Signed-off-by: Dimitris Aragiorgis <>...

686d24f0 12/03/2012 03:56 pm Michael Hanselmann

Support opportunistic locks in mcpu/LUs

Similar to “share_locks”, a new dictionary containing booleans for each
locking level is added to “cmdlib.LogicalUnit”. Logical units wanting to
make use of opportunistic locks will be able to configure this
dictionary accordingly....

00457f03 12/03/2012 01:21 pm Dimitris Aragiorgis

LUNetworkAdd: Log warning when needed

In case conflicts are checked, log warnings if nodes' IPs cannot
be reserved.

Signed-off-by: Dimitris Aragiorgis <>
Signed-off-by: Michael Hanselmann <>
Reviewed-by: Michael Hanselmann <>

efb8848f 12/03/2012 01:17 pm Dimitris Aragiorgis

Use constants.IP4_VERSION in LUNetworkAdd

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Michael Hanselmann <>

213076fe 12/03/2012 01:04 pm Dimitris Aragiorgis

Fix locking in networks

Ensure that locks are held only if needed.

Add conflicts_check in OpNetworkAdd. This is needed if we want to
check whether nodes/master IPs are included in network.

Depending on conflicts_check value, we have to hold node/instance locks...

55b7e783 11/30/2012 03:54 pm Iustin Pop

Rename OpTestAllocator.allocator to iallocator

This makes the OpCode more consistent with the other opcodes. The
downside is incompatibility when upgrading from 2.6, but since this is
a test opcode it shouldn't be problematic.

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

853c570b 11/29/2012 01:26 pm Helga Velroyen

Fixing crash when removing disks

This bug was introduced by my commit "Check ispecs against ipolicy on
instance modify", because I did not filter for the 'add' action. Thus it
would try to read the size parameter also when removing disks.

Signed-off-by: Helga Velroyen <>...

0ee383bf 11/27/2012 01:27 pm Michael Hanselmann

Fix build after commit 9b7e05a

Commit 9b7e05a didn't quite work as expected: glm.is_owned expects a
locking level, not a lock name.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

81cfd8e5 11/27/2012 11:44 am Michael Hanselmann

LUNodeQueryStorage: Use node allocation lock

Block instance allocations when all node locks will be acquired.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Michele Tartara <>

e58009da 11/27/2012 10:26 am Michael Hanselmann

cmdlib: Don't pass processor to _ComputeNics

The execution context ID can be passed right away.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

9b7e05a6 11/27/2012 10:26 am Michael Hanselmann

cmdlib.LUInstanceRename: Another assertion for BGL

Check whether the BGL is actually held instead of just testing
“REQ_BGL”.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

4a4c0092 11/27/2012 10:26 am Michael Hanselmann

cmdlib: Stop using proc.Log*

The Log* functions are re-exported through the LU. Inline use of string
formatting (“%”) was converted to additional arguments to Log* (unlike
“feedback_fn”, these functions support it). Some punctuation has been
removed from messages, as well as some small re-wordings....

b1ad19c5 11/27/2012 10:22 am Michael Hanselmann

cmdlib: Use CommaJoin where appropriate

Don't use inline versions of CommaJoin.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

21faa3ad 11/27/2012 10:14 am Michael Hanselmann

LUNetwork*: Build dictionaries right away

… instead of constructing an object, only to fill it separately.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Michele Tartara <>

2b5b0fe9 11/23/2012 04:24 pm Iustin Pop

Replace dict() with {}

The network patches and an existing test added function-call based
dict construction as opposed to literal sintax.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michele Tartara <>

2abb9ea8 11/22/2012 01:40 pm Helga Velroyen

Make ipolicy violations a warning

So far, when running 'gnt-cluster verify' on a cluster which
has instances that violate the instance policy, those
violations were shown as an error. This patch makes them a
warning.

Signed-off-by: Helga Velroyen <>...

2556424d 11/21/2012 05:54 pm Iustin Pop

Small style fixes (' vs ") in network code

This is just trivial fixes; I think I caught all of them.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

74434d27 11/21/2012 03:40 pm Michael Hanselmann

Remove delayed iallocator call in TLReplaceDisks

By setting the “delay_iallocator” parameter one could delay the call to
the instance allocator. This was not used for some time now, but the
code was still there.

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

de0417fa 11/21/2012 03:40 pm Michael Hanselmann

cmdlib: Merge duplicated code for TLMigrateInstance

LUInstanceFailover and LUInstanceMigrate use TLMigrateInstance and had
the essentially same code for expanding names and declaring locks. In
LUInstanceMigrate.ExpandNames there was a mistake which led to node...

f3196d68 11/21/2012 12:53 pm Helga Velroyen

Fix lint error about too many variables

Lint complains about too many variables in the CheckPrereq
method. While I think that this method/class would need
some refactoring in general, at least this patch makes lint
shut up for now.

Signed-off-by: Helga Velroyen <>...

7309e7b6 11/21/2012 11:21 am Helga Velroyen

Check ispecs against ipolicy on instance modify

When modifying an instance, so far the specs were not checked against
the ipolicy. This patch fixes this issue.

Note that for backend parameters which have a minimum and a maximum
value (currently only memory), it checks both limits against the...

538427e6 11/20/2012 07:51 pm Dimitris Aragiorgis

Fix _ComputeNics to include network slot

This bug was introduced after rebasing master branch.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

1fa2c40b 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass py-apidoc (make commit-check)

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

3c286190 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass pep8 (make lint)

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

beb81ea5 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass pylint (make lint)

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

77aab207 11/20/2012 07:51 pm Dimitris Aragiorgis

Check for existing networks/groups in Network LUs

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

8140e24f 11/20/2012 07:51 pm Dimitris Aragiorgis

Add tags in network objects

Support:
- gnt-network add --tags.
- gnt-network list-tags/add-tags/remove-tags/.
- gnt-network list -o +tags

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

09a3d21f 11/20/2012 07:51 pm Dimitris Aragiorgis

Pass detailed network info in hooks

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

a0af6c80 11/20/2012 07:51 pm Dimitris Aragiorgis

Use network's mac prefix

Modify existing GenerateMAC so that it takes network as an argument.

Substitute _GenerateOneMAC with a decorator _GenerateMACPrefix that
chooses the prefix (network's or cluster's) and wraps
_GenerateMACSuffix that generates the three remaining bytes....

d1547283 11/20/2012 07:51 pm Dimitris Aragiorgis

Modify LUInstanceSetParams() to support networks

Keep backwards compatibility just like LUInstanceCreate() and support
network parameter for NIC object.

Add ec_id argument in Update() to be able to commit temporary IPs that
were previously reserved.

Signed-off-by: Dimitris Aragiorgis <>...

e8e079f3 11/20/2012 07:51 pm Dimitris Aragiorgis

Modify LUInstanceCreate to support networks

Implement backend support, to export the IP pool management
functionality to the clients. When the new NIC parameter 'network' is
given, the ippool management system is triggered. If a NIC belongs to
a network, it inherits the netparams (mode, link) as its nicparams. If...

0fbd466b 11/20/2012 07:50 pm Dimitris Aragiorgis

Implement network/nodegroup mappings

LUNetworkConnect() connects a network to a nodegroup and defines
its netparams (mode and link). Specifically: * Check if network already exists * Check if netparams are valid * Check if already connected to the same nodegroup...

1e0d3321 11/20/2012 07:50 pm Dimitris Aragiorgis

Implement LUNetworkSetParams

Support modifying all network parameters except for network (ip
range). Cannot modify gateway and reserved ips at the same time.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

306bed0e 11/20/2012 07:50 pm Apollon Oikonomopoulos

Implement LUNetworkQuery

Summarily list all existing networks
Supply detailed info for every existing network
- List used/free IPs
- List instances with NICs assigned to the corresponding network
- List NIC index and IP for the above instances

Implement complementary config methods for retrieving networks....

6c0a75db 11/20/2012 07:50 pm Dimitris Aragiorgis

Basic IP pool management logic

Implement LUs for corresponding opcodes: * LUNetworkAdd:
- Check for IP validity
- Reserves all necessary IPs
- Create new Network config object * LUNetworkRemove:
- Checks if connected to any nodegroup
- Remove a Network config object...

eaa4c57c 11/20/2012 07:50 pm Dimitris Aragiorgis

IP pool related objects, opcodes and constants

Config objects: * Introduce L{Network} with
- IPv4 network field (mandatory)
- IPv4 gateway, IPv6 (network/gateway), mac prefix, type (optional) * Modify existing config objects to support networks:
- Add new slot 'network' to L{NIC} config object...

2c9fa1ff 11/20/2012 11:16 am Iustin Pop

Cleanup ht's use of positive/strictpositive

Currently, ht.py uses a bad terminology for positive/non-negative
numbers. Per http://en.wikipedia.org/wiki/Positive_number, this is the
correct terminology:

- A number is positive if it is greater than zero.
- A number is negative if it is less than zero....

e4d745a7 11/19/2012 03:12 pm Michael Hanselmann

Add opcode for running commands remotely

The opcode doesn't pay attention to the build-time flag to enable or
disable restricted commands. In a cluster different nodes could have
different settings.

Node locks are acquired in shared mode by default, but the use of an...

551a29df 11/12/2012 06:17 pm Iustin Pop

Merge branch 'devel-2.6' into master

  • devel-2.6:
    Improve error message when migration status fail
    Fix type error in kvm/GetMigrationStatus
    Fix PID file writing in Haskell daemons

Conflicts (both trivial):
htools/Ganeti/Daemon.hs (_writePidFile rename)...

112b6e89 11/12/2012 06:05 pm Iustin Pop

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    Improve error message when migration status fail
    Fix type error in kvm/GetMigrationStatus
    Fix PID file writing in Haskell daemons

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

4041a4e3 11/12/2012 03:14 pm Iustin Pop

Improve error message when migration status fail

Commit 6a1434d7 (“Make migration RPC non-blocking”) changed the API
for reporting migration status, but has a small cosmetic bug: if the
migration status if failure, but the RPC itself to get the status
didn't fail, it shows the following error message:...

c17770c7 11/02/2012 01:25 pm Bernardo Dal Seno

Fix previous merge

A call to _CalculateGroupIPolicy wasn't refactored during the merge.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Michael Hanselmann <>

8e09e801 11/01/2012 07:44 pm Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    Fix typo in gnt-instance man page
    jqueue: Return jobs to queue when shutting down
    gnt-debug delay: Add "--submit" option
    Make hostname checks uniform between instance rename and add
    Improve logging of new job submissions...
dc2cc657 11/01/2012 06:39 pm Michael Hanselmann

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    Fix typo in gnt-instance man page
    jqueue: Return jobs to queue when shutting down
    gnt-debug delay: Add "--submit" option
    Make hostname checks uniform between instance rename and add
    Improve logging of new job submissions...
233f4bc6 11/01/2012 03:00 pm Iustin Pop

Make hostname checks uniform between instance rename and add

Currently, we have instance rename doing extra checks on the host
name, to prevent accidental wrong renames; however, instance create
doesn't do these checks (issue 291), which (if DNS is misconfigured)...

0d324688 10/30/2012 04:07 pm Iustin Pop

Fix runtime memory increases

Commit 2c0af7da which added the runtime memory changes functionality
had a small typo (wrong name); I've rewritten this to only compute the
delta once, for simplicity.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

e5dfc531 10/30/2012 02:17 pm Iustin Pop

Fix removal of storage directory on shared file storage

This patch makes _RemoveDisks symmetric to _CreateDisks with respect
to file-based storage: _CreateDisks uses "in constants.DTS_FILEBASED",
whereas _RemoveDisks was not update and only uses "==
constants.DT_FILE". This results in stale directories left on the...

15361a18 10/30/2012 02:17 pm Iustin Pop

Switch non-redundant check to disk template-based

Currently, the warning/notice about non-redundant instances in cluster
verify is based non empty secondaries list (how old is this?); the
proper way to check this nowadays is via DTS_MIRRORED.

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

72b35807 10/26/2012 05:35 pm Michael Hanselmann

Check allowed file storage paths during cluster-verify

Some paths, such as /bin or /usr/lib, should not be used for file
storage. This patch implements a check during cluster verification to
fail in case such a path has been used.

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

48e175a2 10/19/2012 05:55 pm Iustin Pop

Update blockdev's "info" at instance rename

Currently, we set "info" metadata on block devices at device creation
time, but we never update it, leading to stale data in case of
instance renames. This would not be a big problem in case of regular
renames (assuming this is a rare operation), but importing instances...

ba147ff8 10/19/2012 04:57 pm Iustin Pop

Fix disk adoption interaction with ipolicy checks

In Ganeti 2.6, disk adoption is broken due to the ipolicy checks being
done before we read volume size from remote nodes. We fix this by
simply moving these checks to after the disk adoption code which
updates the disk size; it's not that nice that we fail a (almost)...

6b6e335b 10/17/2012 04:13 pm Dato Simó

Group.hs: add 'allTags'; adjust loaders and test data for it

This commit adds a Group.allTags field to store the tags of node groups,
and teaches each loader backend in HTools to populate it (additionally, the
IAllocator class in lib/cmdlib.py now includes tags for groups too). Test...

47130d50 10/11/2012 01:05 pm Michael Hanselmann

LUClusterVerifyGroup: Localize virtual file paths

The check for file consistency didn't properly handle virtual paths
in case of a virtual cluster. This didn't cause any breakage as in
a standard virtual cluster setup with only one node all files are
visible for every node....

ee045466 10/11/2012 12:56 pm Michael Hanselmann

Move constant for /etc/hosts to pathutils

Needed for coming patches.

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

6a74f584 10/11/2012 12:38 pm Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    verify-disks: Explicitely state nothing has to be done
    Add list of design documents implemented in version 2.6
    Better list of replace-disks arguments + typos fixed
    jqueue: Look at archived jobs when watching
    Show old primary/secondary node on disk replacement...
c44356fd 10/11/2012 12:24 pm Michael Hanselmann

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    verify-disks: Explicitely state nothing has to be done
    Add list of design documents implemented in version 2.6
    Better list of replace-disks arguments + typos fixed
    jqueue: Look at archived jobs when watching...
3439fd6b 10/05/2012 07:27 pm Michael Hanselmann

Check fingerprint of file with allowed file storage paths

This makes differences show up in “gnt-cluster verify”.

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

43a8f36a 10/05/2012 07:23 pm Bernardo Dal Seno

Explicitly ask for the default iallocator in commands

Now "gnt-instance recreate-disks" uses the default iallocator when "." is
specified as the iallocator. For uniformity, the same behavior applies to
these commands:
gnt-node evacuate
gnt-instance migrate...

52ecc063 10/05/2012 07:23 pm Bernardo Dal Seno

Support for the default iallocator in replace-disks

"gnt-instance replace-disks" now behaves like the other commands, and uses
the default iallocator when "." is passed as the iallocator parameter.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Michael Hanselmann <>

fa8ef9d6 10/05/2012 04:50 am Michael Hanselmann

Wipe added space when growing disks

This patch adds code to wipe newly added disk space when growing disks
using “gnt-instance grow-disk”. “New disk space” is defined as the delta
between the old block device size (not necessarily equal to the amount
recorded in the configuration) and the new recorded size. Extra caution...

461eb201 10/04/2012 05:58 pm Michael Hanselmann

cmdlib._WipeDisks: Code formatting

- LogInfo takes *args, no need to replace values right away
- Don't overwrite wipe_chunk_size right after it's been set

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

f0f8d060 10/04/2012 02:58 am Michael Hanselmann

Show old primary/secondary node on disk replacement

People unfamiliar with Ganeti's internals might be confused with the
different hostnames showing up later in the process.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

33e26038 10/03/2012 08:00 pm Michael Hanselmann

cmdlib: Change wording of messages during disk wipe

Error messages don't need to say “please” and it's already obvious some
investigation is needed. LogWarning already logs the message using
“logging.error” internally.

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