1. 22 Jul, 2009 1 commit
  2. 20 Jul, 2009 3 commits
  3. 17 Jul, 2009 2 commits
  4. 16 Jul, 2009 3 commits
  5. 14 Jul, 2009 1 commit
  6. 13 Jul, 2009 1 commit
  7. 08 Jul, 2009 1 commit
  8. 07 Jul, 2009 2 commits
  9. 30 Jun, 2009 3 commits
    • Iustin Pop's avatar
      Cleanup config data when draining nodes · dec0d9da
      Iustin Pop authored
      
      
      Currently, when draining nodes we reset their master candidate flag, but
      we don't instruct them to demote themselves. This leads to “ERROR: file
      '/var/lib/ganeti/config.data' should not exist on non master candidates
      (and the file is outdated)”.
      
      This patch simply adds a call to node_demote_from_mc in this case.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      dec0d9da
    • 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
    • Iustin Pop's avatar
      Fix error message for extra files on non MC nodes · e631cb25
      Iustin Pop authored
      
      
      Currently the message for extraneous files on non master candidates is
      confusing, to say the least. This makes it hopefully more clear.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarOlivier Tharan <olive@google.com>
      e631cb25
  10. 29 Jun, 2009 5 commits
  11. 19 Jun, 2009 3 commits
  12. 18 Jun, 2009 1 commit
  13. 17 Jun, 2009 7 commits
  14. 16 Jun, 2009 1 commit
  15. 15 Jun, 2009 6 commits
    • Iustin Pop's avatar
      Small whitespace change · 6f7d4e75
      Iustin Pop authored
      
      
      Some indentation was wrong, and pylint rightfully complained.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      6f7d4e75
    • Iustin Pop's avatar
      Simplify RPC call result check in cmdlib.py · 4c4e4e1e
      Iustin Pop authored
      
      
      Now that all results are the same, we can even more simplify the
      handling in cmdlib more. Almost all if result.RemoteFailMsg()…
      constructs are similar, and we resurect the RpcResult.Raise() function
      to take a message argument, which it will process and raise an
      appropriate exception.
      
      This means a significant reduce in boilerplate code. Only the cases
      which handle the error specially (e.g. by warning only) need to touch
      directly the failure message, which was renamed on the RpcResult object
      for more clarity.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      4c4e4e1e
    • 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 the file storage rpcs to new style result · b2b8bcce
      Iustin Pop authored
      
      
      This patch converts all three file-storage rpc (create, delete, rename)
      to new style result. This is done in a single patch as they all use a
      helper function which itself needs to/can be converted.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      b2b8bcce
    • Iustin Pop's avatar
      38ea42a1
    • Iustin Pop's avatar
      Convert iallocator_runner rpc to new result style · 87f5c298
      Iustin Pop authored
      
      
      This patch converts this rpc into the new style. Since the function
      already had some error handling, we remove this custom error reporting
      and replace it with our (new-style) result type. This allows significant
      cleaning up of this code.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      87f5c298