Index nodes by their UUID
authorThomas Thrainer <thomasth@google.com>
Mon, 27 May 2013 14:17:41 +0000 (16:17 +0200)
committerThomas Thrainer <thomasth@google.com>
Thu, 13 Jun 2013 09:32:23 +0000 (11:32 +0200)
commit1c3231aad9e5dddbe9490d49896434000cec6dd9
tree81ddefd1197466b1a9e8e9a0fc193f4ca9e444ab
parentbc0a2284f152b87004912daa7727da648b1a12f4
Index nodes by their UUID

No longer index nodes by their name but by their UUID in the cluster
config. This change changes large parts of the code, as the following
adjustments were necessary:
 * Change the index key to UUID in the configuration and the
   ConfigWriter, including all methods.
 * Change all cross-references to nodes to use UUID's.
 * External interfaces (command line interface, IAllocator interface,
   hook scripts, etc.) are kept stable.
 * RPC-calls can resolve UUID's as target node arguments, if the RPC
   runner is based on a ConfigWriter instance. The result dictionary is
   presented in the form the nodes are addressed: by UUID if UUID's were
   given, or by name if names were given.
 * Node UUID's are resolved in ExpandNames and then stored in the
   OpCode. This allows to check for node renames if the OpCode is
   reloaded after a cluster restart. This check is currently only done
   for single node parameters.
 * Variable names are renamed to follow the following pattern:
   - Suffix is 'node' or 'nodes': Variable holds Node objects
   - Suffix is 'name' or 'names': Variable holds node names
   - Suffix is 'uuid' or 'uuids': Variable holds node UUID's
 * Tests are adapted.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
59 files changed:
Makefile.am
lib/backend.py
lib/bootstrap.py
lib/client/gnt_cluster.py
lib/client/gnt_instance.py
lib/cmdlib/backup.py
lib/cmdlib/base.py
lib/cmdlib/cluster.py
lib/cmdlib/common.py
lib/cmdlib/group.py
lib/cmdlib/instance.py
lib/cmdlib/instance_migration.py
lib/cmdlib/instance_operation.py
lib/cmdlib/instance_query.py
lib/cmdlib/instance_storage.py
lib/cmdlib/instance_utils.py
lib/cmdlib/misc.py
lib/cmdlib/network.py
lib/cmdlib/node.py
lib/cmdlib/operating_system.py
lib/cmdlib/tags.py
lib/cmdlib/test.py
lib/config.py
lib/hooksmaster.py
lib/hypervisor/hv_base.py
lib/hypervisor/hv_chroot.py
lib/hypervisor/hv_fake.py
lib/hypervisor/hv_kvm.py
lib/hypervisor/hv_lxc.py
lib/hypervisor/hv_xen.py
lib/masterd/iallocator.py
lib/masterd/instance.py
lib/objects.py
lib/opcodes.py
lib/query.py
lib/rpc.py
lib/rpc_defs.py
lib/server/masterd.py
lib/server/noded.py
src/Ganeti/Confd/Server.hs
src/Ganeti/Config.hs
src/Ganeti/HTools/Cluster.hs
src/Ganeti/HTools/Program/Harep.hs
src/Ganeti/OpCodes.hs
src/Ganeti/OpParams.hs
src/Ganeti/Query/Cluster.hs [new file with mode: 0644]
src/Ganeti/Query/Server.hs
test/hs/Test/Ganeti/OpCodes.hs
test/py/ganeti.cmdlib_unittest.py
test/py/ganeti.config_unittest.py
test/py/ganeti.hooks_unittest.py
test/py/ganeti.hypervisor.hv_chroot_unittest.py
test/py/ganeti.hypervisor.hv_fake_unittest.py
test/py/ganeti.hypervisor.hv_kvm_unittest.py
test/py/ganeti.hypervisor.hv_lxc_unittest.py
test/py/ganeti.hypervisor.hv_xen_unittest.py
test/py/ganeti.query_unittest.py
test/py/ganeti.rpc_unittest.py
test/py/mocks.py