1. 09 Apr, 2010 1 commit
    • Guido Trotter's avatar
      Fix new pylint errors · fe7c59d5
      Guido Trotter authored
      
      
      Under squeeze pylint reports the following errors:
      ************* Module ganeti.serializer
      E1103:155:LoadSignedJson: Instance of 'False' has no 'get' member (but some types could not be inferred)
      ************* Module ganeti-masterd
      E1103:166:ClientRqHandler.handle: Instance of 'False' has no 'get' member (but some types could not be inferred)
      E1103:167:ClientRqHandler.handle: Instance of 'False' has no 'get' member (but some types could not be inferred)
      ************* Module gnt-instance
      E1103:431:BatchCreate: Instance of 'False' has no 'keys' member (but some types could not be inferred)
      
      For the first two cases it's actually wrong: we had checked before that
      the variable on which "get" is called is actually a dict. In the third
      case though such check doesn't exist, so we add it. Then we silence the
      error all three times.
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      fe7c59d5
  2. 08 Apr, 2010 1 commit
  3. 23 Mar, 2010 1 commit
  4. 17 Mar, 2010 3 commits
  5. 16 Mar, 2010 1 commit
  6. 15 Mar, 2010 3 commits
    • Michael Hanselmann's avatar
      Rightname confd's HMAC key · 6b7d5878
      Michael Hanselmann authored
      
      
      Currently, the ganeti-confd's HMAC key is called “cluster HMAC key” or
      simply “HMAC key” everywhere. With the implementation of inter-cluster
      instance moves, another HMAC key will be introduced for signing critical
      data. They can not be the same, so this patch clarifies the purpose of the
      “cluster HMAC key” by renaming it. The actual file name is not changed.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      6b7d5878
    • Michael Hanselmann's avatar
      Rename SSL_CERT_FILE to NODED_CERT_FILE · 168c1de2
      Michael Hanselmann authored
      
      
      To be consistent with RAPI_CERT_FILE, the rather generic named
      “SSL_CERT_FILE” constant is renamed to “NODED_CERT_FILE”. The actual file
      name is not changed.
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      168c1de2
    • Iustin Pop's avatar
      Implement conversion from plain to drbd · e29e9550
      Iustin Pop authored
      
      
      This patch adds a new mode to instance modify, the changing of the disk
      template. For now only plain to drbd conversion is supported, and the
      new secondary node must be specified manually (no iallocator support).
      
      The procedure for conversion works as follows:
      
      - a completely new disk template is created, matching the count, size
        and mode of the instance's current disks
      - we create manually (not via _CreateDisks) all the missing volumes
      - we rename on the primary the LVs to the new name
      - we create manually the DRBD devices
      
      Failures during the creation of volumes will leave orphan volumes.
      Failure during the rename might leave some disks renamed and some not,
      leading to an inconsistent instance.
      
      Once the disks are renamed, we update the instance information and wait
      for resync. Any failures of the DRBD sync must be manually handled (like
      a normal failure, e.g. by running replace-disks, etc.).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      e29e9550
  7. 12 Mar, 2010 1 commit
  8. 09 Mar, 2010 4 commits
  9. 08 Mar, 2010 1 commit
  10. 26 Feb, 2010 1 commit
  11. 22 Feb, 2010 2 commits
  12. 11 Feb, 2010 2 commits
  13. 09 Feb, 2010 2 commits
    • Iustin Pop's avatar
      Add an early release lock/storage for disk replace · 7ea7bcf6
      Iustin Pop authored
      
      
      This patch adds an early_release parameter in the OpReplaceDisks and
      OpEvacuateNode opcodes, allowing earlier release of storage and more
      importantly of internal Ganeti locks.
      
      The behaviour of the early release is that any locks and storage on all
      secondary nodes are released early. This is valid for change secondary
      (where we remove the storage on the old secondary, and release the locks
      on the old and new secondary) and replace on secondary (where we remove
      the old storage and release the lock on the secondary node.
      
      Using this, on a three node setup:
      
      - instance1 on nodes A:B
      - instance2 on nodes C:B
      
      It is possible to run in parallel a replace-disks -s (on secondary) for
      instances 1 and 2.
      
      Replace on primary will remove the storage, but not the locks, as we use
      the primary node later in the LU to check consistency.
      
      It is debatable whether to also remove the locks on the primary node,
      and thus making replace-disks keep zero locks during the sync. While
      this would allow greatly enhanced parallelism, let's first see how
      removal of secondary locks works.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      7ea7bcf6
    • Iustin Pop's avatar
      Fix "gnt-instance rename" functionality · c4a73785
      Iustin Pop authored
      Commit 91e0748c
      
       (Unify the “--no-ip-check” option) broke the options
      variable name for ‘--no-ip-check’ but since we don't have a QA test for
      instance rename (only burnin test), this was not caught until Issue 86
      was opened.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      c4a73785
  14. 25 Jan, 2010 1 commit
  15. 21 Jan, 2010 1 commit
  16. 04 Jan, 2010 4 commits
  17. 16 Dec, 2009 1 commit
  18. 25 Nov, 2009 3 commits
  19. 16 Nov, 2009 1 commit
  20. 04 Nov, 2009 1 commit
    • 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
  21. 02 Nov, 2009 3 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
      Convert the rest of the OpPrereqError users · debac808
      Iustin Pop authored
      
      
      This finishes the conversion of OpPrereqError creation to two-argument
      style. Any leftovers as one-argument are not breaking anything, just
      losing information about the errors.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      debac808
    • 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
  22. 28 Oct, 2009 2 commits