1. 28 May, 2014 1 commit
  2. 04 Mar, 2014 1 commit
  3. 14 Nov, 2013 1 commit
    • Thomas Thrainer's avatar
      Don't allow optional node parameters · 07e68848
      Thomas Thrainer authored
      
      
      Ganeti does not support optional fields in parameters
      (hypervisor-params, disk-params, etc.). OpenVSwitch related node
      parameters were the exception to this rule, which caused numerous
      problems related to import/export and (de-)serialization.
      
      The reason for making those parameters optional in the first place was to
      disallow them when OpenVSwitch is not used. This was not consistent with
      other parts of Ganeti, where we allow parameters to be set even though they
      are not actively used.
      
      This patch makes all node parameters mandatory and provides sensible
      defaults for them. Checks which make sure that certain parameters are
      not set in some cases were removed, and the tests adapted. Also, the
      inheritance logic from cluster -> node group -> node was implemented, as
      it was missing previously.
      Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
      Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
      07e68848
  4. 07 Nov, 2013 1 commit
  5. 15 Oct, 2013 2 commits
    • Helga Velroyen's avatar
      Make 'gnt-node list-storage' use default storage type · 4f90370c
      Helga Velroyen authored
      
      
      Currently, when no explicit storage type is given, the
      'gnt-node list-storage' command defaults to file storage
      whether or not file storage is enabled on the cluster
      or not. This patch fixes it by defaulting to the default
      storage type (which is the storage type of the default
      disk template). If this storage type does not support
      space reporting, an error message is emitted.
      Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      4f90370c
    • Helga Velroyen's avatar
      Streamlining handling of spindles and default templates · 6c00b2c7
      Helga Velroyen authored
      
      
      This rather lenghy patch comprises a couple of refactorings
      to achieve the following goals:
      - 'gnt-node info' should only report space information about
        spindles, when exclusive storage is enabled on the node
        (so far it always did when lvm-based storage was enabled).
      - 'gnt-node info' should report the disks' space information
        for the default disk template's storage. So far it did it
        always for LVM, which is irrelevant for a cluster running
        for example file-based instances.
      - Performance tweaking of storage reporting and gnt-node
        info.
      - Consider the future work on storage pools for any changes.
      
      This is is achieved by the following refactorings:
      - Move the decision whether or not to ask for spindle
        from cmdlib-level to rpc level.
      - Move the decision for which disk template's storage
        information to ask for to cmdlib level (instead of
        requesting information for all storage units and
        later discarding most of them).
      - Adjustments to storage utility functions.
      - Affected unit tests are adjusted as well.
      Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      6c00b2c7
  6. 02 Oct, 2013 1 commit
  7. 13 Sep, 2013 2 commits
  8. 09 Sep, 2013 1 commit
  9. 27 Aug, 2013 2 commits
  10. 21 Aug, 2013 1 commit
  11. 07 Aug, 2013 1 commit
  12. 15 Jul, 2013 1 commit
  13. 03 Jul, 2013 1 commit
    • Helga Velroyen's avatar
      Improve handling of storage info · 20faaa74
      Helga Velroyen authored
      
      
      This patch improves the processing of storage information
      as result of the 'node_info' call in the following way:
      - It removes the override for LVM storage. This was needed
        in MakeLegacyNode info to be compatible to the
        iallocator, which no longer uses it.
      - When no storage information is available (for example
        when only disk templates are enabled, for which no
        storage reporting exists), then this is handled more
        gracefully.
      Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
      Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
      20faaa74
  14. 02 Jul, 2013 2 commits
  15. 20 Jun, 2013 2 commits
    • 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
    • Thomas Thrainer's avatar
      Fix wrong assert · 5e568fee
      Thomas Thrainer authored
      
      
      An assert wrongly verified that the node name instead of the node UUID
      is in the set of locked nodes. This patch fixes this.
      Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      5e568fee
  16. 14 Jun, 2013 1 commit
  17. 13 Jun, 2013 2 commits
    • Thomas Thrainer's avatar
      Inline simple "alias" variables · d0d7d7cf
      Thomas Thrainer authored
      
      
      Remove variables in the form "var = self.var" throughout all LU's. Those
      "alias" variables make it harder to read the code (it's no longer
      immediately clear what's a field and what's a local variable), and can
      introduce subtle bug (especially when not used consistently and when
      they are re-assigned).
      Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      d0d7d7cf
    • Thomas Thrainer's avatar
      Index nodes by their UUID · 1c3231aa
      Thomas Thrainer authored
      
      
      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: default avatarThomas Thrainer <thomasth@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      1c3231aa
  18. 12 Jun, 2013 3 commits
  19. 07 Jun, 2013 1 commit
  20. 05 Jun, 2013 1 commit
  21. 28 May, 2013 1 commit
  22. 21 May, 2013 1 commit
    • Helga Velroyen's avatar
      RPC 'node_info': <storage_type,key> instead of vg_names · 4b92e992
      Helga Velroyen authored
      
      
      This replaces the field 'vg_names' in the RPC call of 'node info' by
      'storage_units'. A storage unit is a tuple <storage_type,key>
      and a generalization of a vg_name. The list of vg names is replaced by
      a list of storage units. The modified RPC call will be used to report
      storage space for more than just lvm volume groups. What the 'key' is
      depends on the storage type. For storage type lvm-vg, the key is the
      volume group name. To keep backward compatibility, all functions that
      use the old vg_names, convert them to a list where every volume group
      is mapped to a tuple [('lvm-vg',volume_group)] before making the call.
      Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
      Reviewed-by: default avatarBernardo Dal Seno <bdalseno@google.com>
      4b92e992
  23. 17 May, 2013 2 commits