gnt-node migrate: Use LU-generated jobs
authorMichael Hanselmann <hansmi@google.com>
Mon, 23 May 2011 16:55:50 +0000 (18:55 +0200)
committerMichael Hanselmann <hansmi@google.com>
Mon, 30 May 2011 15:07:56 +0000 (17:07 +0200)
commitb7a1c816102553df4c73118ce14db328ca59ae24
tree37c40aa94405f24223047af5282efd9199659abf
parentb99b607f7f6724dd390d04fe44eab5cf399e760d
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
like a better option. This patch changes LUNodeMigrate to use
LU-generated jobs.

While working on this patch, I identified a race condition in
LUNodeMigrate.ExpandNames. A node's instances were retrieved without a
lock and no verification was done.

For RAPI, a new feature string is added and can be used to detect
clusters which support more parameters for node migration. The client
is updated.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Signed-off-by: Michael Hanselmann <hansmi@google.com>
lib/client/gnt_node.py
lib/cmdlib.py
lib/rapi/client.py
lib/rapi/rlib2.py
test/ganeti.rapi.client_unittest.py