1. 19 May, 2014 1 commit
  2. 16 May, 2014 1 commit
  3. 16 Dec, 2013 1 commit
  4. 21 Nov, 2013 1 commit
    • Dimitris Aragiorgis's avatar
      Introduce --hotplug-if-possible option · 96ed3a3e
      Dimitris Aragiorgis authored
      
      
      This will be useful for an external entity using RAPI that
      wants to modify devices of instances.
      
      The common use case for that is:
      "I want to add a NIC/disk to an instance. If it is running
      then try to hotplug the device. If not, then just add it to config."
      
      Another use case is that if we are unaware of the instance's
      hypervisor: "I want do add a NIC/disk to an instance and if
      its hypervisor is KVM try to hotplug it."
      
      For all those cases just print a warning in CheckPrereq() and
      disable any further hotplug related actions (and let
      modifications take place after reboot).
      
      Add NoHoplugSupport and HotplugIfPossible unittests an modify
      existing by explicitly creating successful RPC results for
      call_hotplug_supported.
      Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
      Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
      Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
      96ed3a3e
  5. 24 Oct, 2013 1 commit
  6. 15 Oct, 2013 1 commit
  7. 11 Oct, 2013 1 commit
    • Helga Velroyen's avatar
      Correct properties of the cluster's file storage dir · 5ce621ab
      Helga Velroyen authored
      
      
      This patch does:
      - Rename the haskell opcode parameter
        'pGlobalFileStorageDir' and 'pGlobalSharedfileStorageDir'
        to 'pClusterFileStorageDir' and
        'pClusterSharedfileStorageDir', respectively, because
        the old name was misleading.
      - The two parameters are made optional strings instead of
        non-empty strings. This actually used to be like this
        before, but was accidentally overriden by the switch to
        opcode generation from haskell to python.
      - The ClusterFileStorageDir parameter had to be renamed in
        Haskell to not clash with the FileStorageDir parameter
        of the OpInstanceCreate code.
      Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
      Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
      5ce621ab
  8. 08 Oct, 2013 1 commit
  9. 02 Oct, 2013 1 commit
    • Jose A. Lopes's avatar
      Merge 'EvacNode' and 'NodeEvacMode' · d067f40b
      Jose A. Lopes authored
      
      
      Merge 'EvacMode' and 'NodeEvacMode' which are associated with the
      duplicated constants 'IALLOCATOR_NEVAC_*' and 'NODE_EVAC_*'.  This
      merge moves the type 'EvacMode' to 'Ganeti.Types' in order to avoid a
      circular dependency between 'Ganeti.HsConstants' and
      'Ganeti.HTools.Types'.  The type 'EvacMode' is preferred to the type
      'NodeEvacMode' given that its use is more widespread.
      Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      d067f40b
  10. 10 Sep, 2013 1 commit
    • Jose A. Lopes's avatar
      Wrap 'Set' in 'ListSet' for the opcodes · 4651c69f
      Jose A. Lopes authored
      
      
      In what Haskell to Python opcodes are concerned, a Haskell 'Set' is
      translated into a Python 'list'.  In other words, currently, opcodes
      that handle sets of parameters are actually handling lists because
      this is how sets are currently encoded.  This patch introduces a new
      type called 'ListSet' that wraps a Haskell 'Set' and it is used to
      represent on the Haskell side a Python 'list' without duplicate
      elements.  This patch also updates the respective opcode parameters
      and updates the opcode tests.
      Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
      Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
      4651c69f
  11. 08 Aug, 2013 1 commit
    • Jose A. Lopes's avatar
      Fix opcodes and parameters · 5cbf7832
      Jose A. Lopes authored
      
      
      * fix some return types in opcodes and some types and documentation in
        parameters.
      * fix serialization of the default value of the 'name' parameter in
        the opcodes related to tags when tag kind is 'cluster'
      * revert changes to 'pShutdownTimeout'' and its references because the
        master branch tried to fix this inconsistency but was unable to fix
        all the references to this parameter
      Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
      Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
      5cbf7832
  12. 07 Aug, 2013 3 commits
  13. 29 Jul, 2013 1 commit
  14. 24 Jul, 2013 1 commit
  15. 23 Jul, 2013 1 commit
  16. 15 Jul, 2013 1 commit
  17. 20 Jun, 2013 1 commit
    • 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
  18. 13 Jun, 2013 1 commit
    • 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
  19. 30 Apr, 2013 1 commit
  20. 22 Apr, 2013 1 commit
  21. 17 Apr, 2013 1 commit
  22. 11 Apr, 2013 2 commits
  23. 21 Mar, 2013 1 commit
  24. 19 Feb, 2013 1 commit
  25. 11 Feb, 2013 1 commit
  26. 24 Dec, 2012 1 commit
  27. 19 Dec, 2012 1 commit
  28. 17 Dec, 2012 4 commits
  29. 07 Dec, 2012 1 commit
  30. 04 Dec, 2012 3 commits
  31. 30 Nov, 2012 2 commits
    • Iustin Pop's avatar
      Remove read instances from our Haskell code · 139c0683
      Iustin Pop authored
      
      
      It turns out that optimising 'read' derived instances (via -O) for
      complex data types (like OpCode, or the various objects) can be slow
      to very slow. Disabling such instances results in (time make
      $all_our_haskell_binaries) large compile-time savings and also smaller
      (unstripped) binaries (by a significant amount):
      
      ghc 6.12:        time  htools sz  hconfd sz
        with read:    4m50s 12,244,694 14,927,928
        no read:      3m30s 10,234,305 12,536,745
      ghc 7.6:
        with read:   14m45s 13,694,761 15,741,755
        no read:      3m40s 11,631,373 13,245,134
      
      So let's remove these instances, since we never use read in production
      for our custom types, and even when debugging in GHCI, we can simply
      use the 'show' representation to create the types, without needing to
      actually parse from strings.
      
      Note: for the very slow ghc 7.6 compilation time, I filled a ticket
      (ghc #7450), since it is surprising(ly slow).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
      139c0683
    • Iustin Pop's avatar
      Remove remaining in-line parameters · 7d421386
      Iustin Pop authored
      
      
      … except one, and replace them with separately-defined ones in
      OpParams.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
      7d421386