Skip to content
  • Thomas Thrainer's avatar
    Index instances by their UUID · da4a52a3
    Thomas Thrainer authored
    
    
    No longer index instances 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.
     * External interfaces (command line interface, IAllocator interface,
       hook scripts, etc.) are kept stable.
     * Instance UUID's are resolved in ExpandNames and then stored in the
       OpCode. This allows to check for instance renames if the OpCode is
       reloaded after a cluster restart. This check is currently only done
       for single instance parameters.
     * Instance locking unfortunately can't use instances UUID as
       identifiers. The reasons is that new instances (which have no UUID
       yet) have to be locked as well, so the instance name is used.
     * Variable names are renamed to follow the following pattern:
       - Suffix is 'inst' or 'insts': Variable holds Instance objects
       - Suffix is 'name' or 'names': Variable holds Instance names
       - Suffix is 'uuid' or 'uuids': Variable holds Instance UUID's
     * Tests are adapted.
    
    Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
    Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
    da4a52a3