1. 09 Oct, 2009 2 commits
  2. 05 Oct, 2009 7 commits
  3. 25 Sep, 2009 1 commit
  4. 14 Sep, 2009 1 commit
    • Iustin Pop's avatar
      Treat virtual LVs as inexistent · 33f2a81a
      Iustin Pop authored
      Currently, “gnt-cluster verify” and “gnt-cluster verify-disks” use the
      list of LVs as returned by backend.GetVolumeList to determine whether an
      LV exists or not. However, LVs can also be ‘virtual’, which is handled
      correctly (i.e. as missing) by the bdev code, but not by this function.
      This patch changed GetVolumeList to simply skip virtual LVs; this makes
      cluster verify and verify-disks report these correctly as missing. The
      only downside is that an user could get confused (lvs reports the volume
      as existing, but ganeti as missing). However, this is better than simply
      considering virtual LVs as “good”.
      No other code beside these two gnt-cluster operations uses the
      GetVolumeList function, so we don't change the behaviour of the rest of
      the code (e.g. replace-disks, instance info, etc.).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
  5. 03 Sep, 2009 1 commit
  6. 24 Aug, 2009 1 commit
  7. 05 Aug, 2009 3 commits
  8. 04 Aug, 2009 1 commit
  9. 29 Jul, 2009 1 commit
  10. 24 Jul, 2009 2 commits
  11. 20 Jul, 2009 2 commits
  12. 19 Jul, 2009 1 commit
  13. 08 Jul, 2009 1 commit
  14. 07 Jul, 2009 2 commits
  15. 30 Jun, 2009 1 commit
  16. 29 Jun, 2009 2 commits
  17. 26 Jun, 2009 2 commits
  18. 23 Jun, 2009 2 commits
  19. 18 Jun, 2009 1 commit
  20. 16 Jun, 2009 1 commit
  21. 15 Jun, 2009 5 commits
    • Iustin Pop's avatar
      Simplify the RPC result framework in backend.py · c26a6bd2
      Iustin Pop authored
      Since now all functions fail via _Fail, the return True, … is redundant
      as all normal return paths have it, and thus the True value can be added
      in the ganeti-noded handler.
      This means that all functions can now forget about the special result
      type, and instead return normally, but signal all failures via _Fail().
      Only a few functions must be handled specially (the recursive ones).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    • Iustin Pop's avatar
      Convert all backend function to exception · afdc3985
      Iustin Pop authored
      Instead of returning (False, msg) from rpc endpoints, we raise always
      exceptions (the non-endpoint, internal functions can remain as is). This
      means that the error paths are agnostic to how the failure is signalled
      (i.e. by False, msg) and instead use only this method (exceptions) to
      signal failures.
      The patch also adds a log=False argument to _Fail so that trivial cases are not
      logged (but usually it's a good idea to log all failures, for the record).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    • Iustin Pop's avatar
      Simplify usage of backend._FindDisks · 5a533f8a
      Iustin Pop authored
      Since all users of _FindDisks now return new-style results, we can
      simply make it raise an exception and not deal with the status field.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    • Iustin Pop's avatar
      Remove old invalid-os related functionality · 8e70b181
      Iustin Pop authored
      We no longer need OS objects to be able to represent invalid OSes. This
      cleans up the code handling those cases.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    • 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>