1. 27 Jan, 2010 1 commit
    • Iustin Pop's avatar
      utils.FileLock: handle init errors properly · aac3fbf0
      Iustin Pop authored
      If the open of the lock file fails (due to whatever reason), 'self'
      won't have the 'fd' attribute, and thus we fail in Close/__del__, which
      will ruin proper error reporting:
      IOError: [Errno 30] Read-only file system: '/var/lib/ganeti/queue/lock'
      Exception exceptions.AttributeError: "'FileLock' object has no attribute
      'fd'" in <bound method FileLock.__del__ of <ganeti.utils.FileLock object
      at 0x2aaaad0bebd0>> ignored
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
  2. 25 Jan, 2010 1 commit
  3. 14 Jan, 2010 1 commit
  4. 11 Jan, 2010 1 commit
  5. 04 Jan, 2010 2 commits
  6. 28 Dec, 2009 1 commit
  7. 14 Dec, 2009 1 commit
  8. 01 Dec, 2009 1 commit
  9. 25 Nov, 2009 2 commits
  10. 20 Nov, 2009 1 commit
    • Michael Hanselmann's avatar
      Handle EEXIST in utils.RenameFile · a426508d
      Michael Hanselmann authored
      This should fix an issue I've seen exactly once during testing. It might have
      been caused by parallel RPC calls to archive jobs.
      […] ganeti-noded:112 ERROR Error in RPC call […]
       File "/usr/lib/python2.4/site-packages/ganeti/backend.py", line 2365, in JobQueueRename
         utils.RenameFile(old, new, mkdir=True)
       File "/usr/lib/python2.4/site-packages/ganeti/utils.py", line 322, in RenameFile
         os.makedirs(os.path.dirname(new), mkdir_mode)
       File "/usr/lib/python2.4/os.py", line 159, in makedirs
         mkdir(name, mode)
      OSError: [Errno 17] File exists: '/var/lib/ganeti/queue/archive/0'
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
  11. 06 Nov, 2009 1 commit
    • Iustin Pop's avatar
      Fix pylint 'E' (error) codes · 6c881c52
      Iustin Pop authored
      This patch adds some silences and tweaks the code slightly so that
      “pylint --rcfile pylintrc -e ganeti” doesn't give any errors.
      The biggest change is in jqueue.py, the move of _RequireOpenQueue out of
      the JobQueue class. Since that is actually a function and not a method
      (never used as such) this makes sense, and also silences two pylint
      Another real code change is in utils.py, where FieldSet.Matches will
      return None instead of False for failure; this still works with the way
      this class/method is used, and makes more sense (it resembles more
      closely the re.match return values).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
  12. 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>
  13. 03 Nov, 2009 3 commits
  14. 02 Nov, 2009 1 commit
    • 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)
      - 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
      - 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>
  15. 09 Oct, 2009 1 commit
  16. 07 Oct, 2009 1 commit
  17. 22 Sep, 2009 1 commit
  18. 10 Sep, 2009 1 commit
  19. 03 Sep, 2009 4 commits
  20. 26 Aug, 2009 3 commits
  21. 20 Aug, 2009 2 commits
  22. 17 Aug, 2009 1 commit
  23. 29 Jul, 2009 1 commit
  24. 24 Jul, 2009 1 commit
  25. 07 Jul, 2009 2 commits
  26. 29 Jun, 2009 1 commit
    • Guido Trotter's avatar
      check_ident_key_val, handle no_ and - prefixes · 8b46606c
      Guido Trotter authored
      If an ident member of an IdentKeyVal relationship starts with no_ or -,
      handle it the same way we do for a key. Some unittests are added to
      check that check_ident_key_val behaves as expected.
      This patch also changes ForceDictType to, for now, fail on such an
      entry, and the same to happen when creating an instance or modifying its
      nics or disks.
      This behavior will be used later on to allow deletion of os entries in
      os parameters.
      Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
  27. 18 Jun, 2009 1 commit
  28. 15 Jun, 2009 2 commits