Skip to content
Snippets Groups Projects
  1. Aug 17, 2009
  2. Aug 14, 2009
  3. Aug 13, 2009
  4. Aug 10, 2009
  5. Aug 06, 2009
  6. Aug 05, 2009
    • Iustin Pop's avatar
      export: add meaningful exit code · 084f05a5
      Iustin Pop authored
      
      Currently ‘gnt-backup export’ always returns exit code zero, even in the
      face of complete failure during backup (only failure to stop/start the
      instance will cause job failure and thus non-zero exit code). This is
      bad, since one cannot script the backup.
      
      This patch adds some simple results from the LU so that the command line
      script can return good exit code. It will:
        - return zero for full success (snapshot removal errors are ignored
          though)
        - return one for full failure (finalize export failure or all disks
          failure)
        - return two for partial failure (some disks backed up, some not)
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      084f05a5
  7. Aug 04, 2009
  8. Aug 03, 2009
  9. Jul 31, 2009
  10. Jul 22, 2009
  11. Jul 19, 2009
  12. Jul 16, 2009
    • Guido Trotter's avatar
      b119bccb
    • 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
      coherency.
      
      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>
      066f465d
  13. Jul 08, 2009
  14. Jun 30, 2009
    • Iustin Pop's avatar
      Fix node readd issues · a8ae3eb5
      Iustin Pop authored
      
      This patch fixes a few node readd issues.
      
      Currently, the node readd consists of two opcodes:
        - OpSetNodeParms, which resets the offline/drained flags
        - OpAddNode (with readd=True), which reconfigures the node
      
      The problem is that between these two, the configuration is inconsistent
      for certain cluster configurations. Thus, this patch removes the first
      opcode and modified the LUAddNode to deal with this case too.
      
      The patch also modifies the computation of the intended master_candidate
      status, and actually sets the readded node to master candidate if
      needed. Previously, we didn't modify the existing node at all.
      
      Finally, the patch modifies the bottom of the Exec() function for this
      LU to:
        - trigger a node update, which in turn redistributes the ssconf files
          to all nodes (and thus the new node too)
        - if the new node is not a master candidate, then call the
          node_demote_from_mc RPC so that old master files are cleared
      
      My testing shows this behaves correctly for various cases.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      a8ae3eb5
  15. Jun 29, 2009
  16. Jun 19, 2009
  17. Jun 18, 2009
  18. Jun 17, 2009
  19. Jun 15, 2009
    • Iustin Pop's avatar
      Big rewrite of the OS-related functions · 255dcebd
      Iustin Pop authored
      
      Currently the OSes have a special, customized error handling: the OS
      object can represent either a valid OS, or an invalid OS. The associated
      function, instead of raising other exception or failing, create custom
      OS objects representing failed OSes.
      
      While this was good when no other RPC had failure handling, it's
      extremely different from how other function in backend.py expect
      failures to be signalled.
      
      This patch reworks this completely:
        - the OS object always represents valid OSes (the next patch will
          remove the valid/invalid field and associated constants)
        - the call_os_diagnose returns instead of a list of OS objects, a list
          of (name, path, status, diagnose_msg); the status is then used in
          cmdlib to determine validity and the status and diagnose_msg values
          are used in gnt-os for display
        - call_os_get returns either a valid OS or a RPC remote failure (with
          the error message)
        - the other functions in backend.py now just call backend.OSFromDisk()
          which will return either a valid OS object or raise an exception
        - the bulk of the OSFromDisk was moved to _TryOSFromDisk which returns
          status, value for the functions which don't want an exception raised
      
      The gnt-os list and diagnose commands still work after this patch.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      255dcebd
    • Iustin Pop's avatar
      Convert volume_list rpc to new style result · 29d376ec
      Iustin Pop authored
      
      This is a big change, because we need to cleanup its users too.
      
      The call and thus LUVerifyDisks LU used to differentiate between failure
      at node level and failure at LV level, by returning different types in
      the RPC result. This is way too complicated for our needs.
      
      The patch changes to new style result (easy change), and then:
        - changes LUVerifyDisks.Exec() to return a tuple of 3-elements
          instead of 4-elements; we collapse the «nodes not reachable» and
          «nodes with LVM errors» in a single dict
        - changes gnt-cluster to parse 3-element results and simplifies the
          different by-error handling code
      
      Note that the status is added in ganeti-noded, and not in the function
      itself, as the function is used in other places too.
      
      This was tested with down nodes and broken VGs.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      29d376ec
    • Guido Trotter's avatar
      QueryClusterInfo: don't show default_bridge · 9ebe9556
      Guido Trotter authored
      
      Since default_bridge is deprecated, avoid displaying it when querying
      for cluster information.
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      9ebe9556
    • Guido Trotter's avatar
      InitCluster: don't set default_bridge · ec0652ad
      Guido Trotter authored
      
      And remove the -b option, as default nic parameters can be used instead.
      We could support the option, but that would add more code, and since
      cluster init is not a frequent operation, it's better to keep the code
      clean.
      
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      ec0652ad
  20. Jun 10, 2009
Loading