1. 18 Mar, 2010 2 commits
  2. 12 Mar, 2010 2 commits
  3. 11 Mar, 2010 1 commit
  4. 08 Mar, 2010 8 commits
  5. 26 Feb, 2010 1 commit
  6. 22 Feb, 2010 2 commits
  7. 18 Feb, 2010 3 commits
  8. 11 Feb, 2010 1 commit
  9. 03 Feb, 2010 1 commit
  10. 28 Jan, 2010 1 commit
    • Iustin Pop's avatar
      Add capability to use syslog for logging · 551b6283
      Iustin Pop authored
      
      
      This patch adds a configure-time parameter that will set the defaults
      used by all programs, and command-line parameters in the daemons that
      allow overriding it.
      
      Syslog 'yes' enables syslog in addition to file-based logging, 'only'
      enables syslog and disables file-based syslog.
      
      The log entries will be of the form:
      Jan 27 08:45:04 node2 ganeti-noded[14504]: INFO 172.24.227.5:50850 PUT
      /jobqueue_update HTTP/1.0 200
      Jan 27 08:45:05 node2 ganeti-noded[14505]: INFO 172.24.227.5:50853 PUT
      /lv_list HTTP/1.0 200
      
      and (for a multi-threaded program):
      Jan 27 08:51:48 node1 ganeti-masterd[15491]: (MainThread) INFO
      ganeti-masterd daemon startup
      Jan 27 08:51:49 node1 ganeti-masterd[15491]: (MainThread) INFO
      Inspecting job queue
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      551b6283
  11. 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>
      aac3fbf0
  12. 25 Jan, 2010 1 commit
  13. 14 Jan, 2010 1 commit
  14. 11 Jan, 2010 1 commit
  15. 04 Jan, 2010 2 commits
  16. 28 Dec, 2009 1 commit
  17. 14 Dec, 2009 1 commit
  18. 01 Dec, 2009 1 commit
  19. 25 Nov, 2009 2 commits
  20. 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>
      a426508d
  21. 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
      errors.
      
      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>
      6c881c52
  22. 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
  23. 03 Nov, 2009 3 commits
  24. 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)
        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