1. 27 Oct, 2009 1 commit
    • Michael Hanselmann's avatar
      Provide feedback from redistributing configuration · a4eae71f
      Michael Hanselmann authored
      This is particularily useful for “gnt-cluster redist-conf”, but
      also for all other cases where the configuration files are
      rewritten on other nodes.
      $ gnt-cluster redist-conf
      … Copy of file /var/lib/ganeti/config.data to node … failed: Error while
      executing backend function: [Errno 1] Operation not permitted
      … Error while uploading ssconf files to node …: Error while executing backend
      function: [Errno 1] Operation not permitted
      $ gnt-node modify --offline no --force node3.example.com
      … - WARNING: Not enough master candidates (desired 10, new value will be 4)
      … Copy of file /var/lib/ganeti/config.data to node node8.example.com failed:
      Error while executing backend function: [Errno 1] Operation not permitted
      Modified node node3.example.com
       - offline -> True
       - master_candidate -> auto-demotion due to offline
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
  2. 22 Oct, 2009 1 commit
  3. 16 Oct, 2009 2 commits
  4. 25 Sep, 2009 1 commit
    • Iustin Pop's avatar
      Add uuid on node/instance add and cluster init · 430b923c
      Iustin Pop authored
      This patch does a little bit of cleanup first, since we want to call
      GenerateUniqueID without reacquiring the lock.
      Note that we don't necessarily need to do this for the cluster, since at
      first startup ConfigWriter will do it anyway. But it's better to
      explicitely do this instead of relying on the automated upgrade.
      Additionally this patch adds ctime/mtime population at cluster init
      time. mtime is not necessarily needed (master will update it
      automatically, but we're doing it anyway for consistency).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
  5. 24 Sep, 2009 1 commit
  6. 17 Sep, 2009 1 commit
  7. 16 Sep, 2009 1 commit
  8. 03 Sep, 2009 1 commit
  9. 17 Aug, 2009 1 commit
  10. 13 Aug, 2009 1 commit
  11. 10 Aug, 2009 1 commit
  12. 29 Jul, 2009 1 commit
  13. 20 Jul, 2009 1 commit
  14. 16 Jul, 2009 4 commits
    • Guido Trotter's avatar
    • Guido Trotter's avatar
      Get rid of the default_hypervisor slot · 066f465d
      Guido Trotter authored
      Currently we have both a default_hypervisor and an enabled_hypervisors
      list. The former is only settable at cluster init time, while the latter
      can be changed with cluster modify.
      This becomes cumbersome in a few ways: at cluster init time for example
      if we pass in a list of enabled hypervisors which doesn't include the
      "default" xen-pvm one, we're also forced to pass a default hypervisor,
      or an error will be reported. It is also currently possible to disable
      the default hypervisor in cluster-modify (with unknown results).
      In order to avoid this we get rid of this field altogether, and define
      the "first" enabled hypervisor as the default one. This allows ease of
      changing which one is the default, and at the same time maintains
      At configuration upgrade we make sure that the old default is first in
      the list, so that 2.0 cluster defaults are preserved.
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
    • Guido Trotter's avatar
      Simplify InitConfig and remove SimpleConfigWriter · a33848a5
      Guido Trotter authored
      InitConfig currently creates the cluster config_data, then puts it into
      a dict, passes it to SimpleConfigWriter to load it from a dict (which
      just reuses the dict value) and then saves it. The SimpleConfigWriter is
      then returned, but ignored. With this patch we just write out the
      config_data at InitConfig time, and thus can remove SimpleConfigWriter
      altogether. The now unused SimpleConfigReader.FromDict is also gone.
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
    • Guido Trotter's avatar
      InitCluster, don't use SimpleConfigWriter · 9e1333b9
      Guido Trotter authored
      InitConfig returns a SimpleConfigWriter to InitCluster, which then
      passes it on to ssh.WriteKnownHostsFile, which extracts a couple of
      values from it. One line later the full ConfigWriter is initialized.
      By initializing it one line before we can pass the full writer to
      ssh.WriteKnownHostsFile, and thus we don't need to care anymore for the
      InitConfig returned SimpleConfigWriter
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
  15. 08 Jul, 2009 2 commits
  16. 07 Jul, 2009 2 commits
  17. 15 Jun, 2009 5 commits
  18. 08 Jun, 2009 3 commits
  19. 28 May, 2009 1 commit
  20. 07 May, 2009 1 commit
  21. 04 May, 2009 1 commit
  22. 27 Feb, 2009 2 commits
    • Guido Trotter's avatar
      Create runtime dir in bootstrap · 9dae41ad
      Guido Trotter authored
      Some hypervisors (KVM) need RUN_GANETI_DIR to exist even at cluster init
      time. This patch creates it in InitCluster just before hv parameter
      checking. Since the code to make list of directories is already repeated
      twice in the code, and this would be the third time, we abstract it into
      an utils.EnsureDirs function and we call that one from ganti-noded,
      ganeti-masterd and bootstrap.
      Reviewed-by: iustinp
    • Iustin Pop's avatar
      Fix some epydoc style issues · 5fcc718f
      Iustin Pop authored
      99% of the epydoc return tags are "@return:", but each of the modified files
      had one "@returns:" line. We fix this for consistency.
      Reviewed-by: imsnah
  23. 10 Feb, 2009 2 commits
    • Guido Trotter's avatar
      Instance parameters: force typing · a5728081
      Guido Trotter authored
      We want all the hv/be parameters to have a known type, rather than a
      random mix of empty string, boolean values, and None, so we declare the
      type of each variable and we enforce/convert it.
      - Add some new constants for enforceable value types
      - Add new constants dicts HVS_PARAMETER_TYPES and BES_PARAMETER_TYPES
        holding not only the valid parameters but also their types
      - Drop the old HVS_PARAMETERS and BES_PARAMETERS constants and calculate
        the values from the type dict
      - Convert all the default parameters to a valid type value
      - Create a new ForceDictType utils function, to check/enforce a dict's
        element value types, with relevant unit tests
      - Drop a few custom functions to check/convert the BE param types in
        utils and cli, in favor of ForceDictType
      - Double-check the parameter types using ForceDictType in both scripts
        and LogicalUnits, when possible.
      As a bonus:
      - Remove some old commented-out code in gnt-instance
      - Remove some already fixed FIXME
      - Fix a bug which prevented VALUE_DEFAULT to be applied to BE parameters
        in SetInstanceParams because the value was checked for validity before
        that transformation was made
      - Fix a bug which prevented initing a cluster and passing hvparams to
        work at all
      - ForceDictType allows an allowed_values for exceptions, which makes us
        able to do the checking even when some values must not be
        converted/typechecked (for example the 'default' string in
      Reviewed-by: iustinp
    • Iustin Pop's avatar
      Add a ‘drained’ attribute to node objects · af64c0ea
      Iustin Pop authored
      This attribute will be used to prevent any allocation on the node (any
      of replace-disks with new secondary this node, failover to the node,
      migration to the node).
      The patch adds the attribute and initializes it correctly in cluster
      init and for new nodes.
      Reviewed-by: imsnah
  24. 19 Dec, 2008 3 commits