1. 25 Nov, 2009 1 commit
  2. 20 Nov, 2009 1 commit
  3. 16 Nov, 2009 2 commits
  4. 13 Nov, 2009 1 commit
  5. 12 Nov, 2009 1 commit
  6. 06 Nov, 2009 5 commits
  7. 04 Nov, 2009 2 commits
    • Iustin Pop's avatar
      TLMigrateInstance: add error messagess during Exec · 78212a5d
      Iustin Pop authored
      
      
      Currently the migration of an instance doesn't show any error until the
      end. We add two messages that show better the progress:
      
      node1# gnt-instance migrate -f instance5
      Wed Nov  4 04:04:34 2009 Migrating instance instance5
      Wed Nov  4 04:04:34 2009 * checking disk consistency between source and target
      Wed Nov  4 04:04:35 2009 * switching node node3 to secondary mode
      Wed Nov  4 04:04:35 2009 * changing into standalone mode
      Wed Nov  4 04:04:35 2009 * changing disks into dual-master mode
      Wed Nov  4 04:04:40 2009 * wait until resync is done
      Wed Nov  4 04:04:41 2009 * preparing node3 to accept the instance
      Wed Nov  4 04:04:41 2009 * migrating instance to node3
      Wed Nov  4 04:04:51 2009 Migration failed, aborting
      Wed Nov  4 04:04:51 2009 * switching node node3 to secondary mode
      Wed Nov  4 04:04:51 2009 * changing into standalone mode
      Wed Nov  4 04:04:51 2009 * changing disks into single-master mode
      Wed Nov  4 04:04:57 2009 * wait until resync is done
      Failure: command execution error:
      Could not migrate instance instance5: Failed to migrate instance: Failed
      to migrate instance instance5: …
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      78212a5d
    • Iustin Pop's avatar
      Introduce a wrapper for hostname resolving · 104f4ca1
      Iustin Pop authored
      
      
      Currently a few of the LU's CheckPrereq use utils.HostInfo which raises
      a resolver error in case of failure. This is an exception from the
      standard that CheckPrereq should raise an OpPrereqError if the error is
      in the 'pre' phase (so that it can be retried).
      
      This patch adds a new error code (resolver_error) and a wrapper over
      utils.HostInfo that just converts the ResolverError into
      OpPrereqError(…, errors.ECODE_RESOLVER). It then uses this wrapper in
      cmdlib, bootstrap and some scripts.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      104f4ca1
  8. 03 Nov, 2009 3 commits
  9. 02 Nov, 2009 6 commits
    • Iustin Pop's avatar
      Some improvements to gnt-node repair-storage · 7e9c6a78
      Iustin Pop authored
      
      
      Currently the repair storage has two issues:
      
      - down instances are aborting the operation, even though they should be
        ignored (it's not technically possible to know their disk status
        unless we would activate their disks)
      - if the VG is so broken that disks cannot be activated via gnt-instance
        activate-disks or gnt-instance startup, it's not possible to repair
        the VG at all
      
      The patch makes the opcode skip down instances and also introduces an
      ``--ignore-consistency`` flag for forcing the execution of the LU.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      7e9c6a78
    • Iustin Pop's avatar
      Add ecode to rpc.py's RpcResult.Raise() · 045dd6d9
      Iustin Pop authored
      
      
      This patch adds a new ecode argument to RpcResult.Raise(). This allows
      specifying the error code (for both OpExec and OpPrereq errors).
      
      Note that this patch also makes the OpExecError exceptions raised from
      _FindFaultInstanceDisks have the error code classification.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      045dd6d9
    • Iustin Pop's avatar
      Introduce two-argument style for OpPrereqError · 5c983ee5
      Iustin Pop authored
      
      
      This patch introduces a two-argument style for OpPrereqError. Only the
      direct raise calls in cmdlib.py are converted, other users will follow.
      
      cli.py is modified to handle both two-argument style and the current
      format. RAPI doesn't need modification as the way we encode errors is
      already using a list for the error arguments, so RAPI users only need to
      start checking the list length and the second argument.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      5c983ee5
    • Iustin Pop's avatar
      Remove the OpRetryError exception · 159d4ec6
      Iustin Pop authored
      
      
      This is only used in two places, in an error path that is no longer
      valid since Ganeti 2.0. We remove the try..except since we should not
      get it anymore (and if we do, then we should catch it in all
      config.Update cases) and we remove the exception class completely.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      159d4ec6
    • Michael Hanselmann's avatar
      Activate disks while exporting an instance · 3e53a60b
      Michael Hanselmann authored
      
      
      Exporting an instance not running or without activated disks
      will fail. This patch makes sure to activate disks before
      exporting an instance if it's in the ADMIN_down state.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      3e53a60b
    • Iustin Pop's avatar
      Unify the query fields for the storage framework · 620a85fd
      Iustin Pop authored
      
      
      This patch unifies the query fields in the storage framework for all
      types. Note that the information is still computed on-demand, so if e.g.
      the used disk space is not requested for the ‘file’ type, it won't be
      computed on nodes.
      
      Summary of changes:
      - improve the LVM storage type to support multiple lvm fields in the
        LIST_FIELDS declaration and constant (not-computed via lvm commands)
        fields
      - rename utils.GetFilesystemFreeSpace to utils.GetFilesystemStats
        returning tuple of (total, free)
      - add used and free as valid fields for lvm-vg (use being computed as
        vg_size-vg_free)
      - make allocatable accepted for all types (ones which are always
        allocatable always return True)
      - add a new list field ‘type’ that gives the current selected type; not
        much useful today (except for understanding what the default output
        is) but in the future might help if we want to list multiple types
      - add type, size and allocatable to the default output field list
      - update the man page with details on how, for file storage, size ≠ used
        + free for non-mountpoint cases
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      620a85fd
  10. 29 Oct, 2009 1 commit
  11. 28 Oct, 2009 2 commits
  12. 27 Oct, 2009 2 commits
    • 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>
      a4eae71f
    • Iustin Pop's avatar
      Fix gnt-node evacuate w. iallocator · e9022531
      Iustin Pop authored
      Commit 2bb5c911
      
       moved around and changed the _RunAllocator function in
      the DiskReplace → TaskLet conversion, but in the process it changed the
      relocate_from argument from a list of nodes to just the secondary node.
      This breaks the protocol and current iallocator scripts.
      
      This patch fixes that but also adds a local variable 'instance' since
      it's not nice to write self.instance so many times.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      e9022531
  13. 23 Oct, 2009 1 commit
  14. 22 Oct, 2009 1 commit
  15. 20 Oct, 2009 1 commit
  16. 13 Oct, 2009 1 commit
  17. 12 Oct, 2009 1 commit
  18. 09 Oct, 2009 2 commits
  19. 05 Oct, 2009 3 commits
  20. 02 Oct, 2009 3 commits