1. 20 Nov, 2007 1 commit
  2. 12 Nov, 2007 6 commits
  3. 09 Nov, 2007 3 commits
  4. 05 Nov, 2007 2 commits
  5. 28 Oct, 2007 1 commit
    • Guido Trotter's avatar
      Import two itertools recipes · 78feb6fb
      Guido Trotter authored
      The two function 'any' and 'all' are copied as-is from the python 2.4
      documentation for the itertools module. They are useful (and are already
      builtin function in python 2.5).
      Reviewed-by: iustinp
  6. 12 Oct, 2007 2 commits
    • Iustin Pop's avatar
      Add a generic write file function · 087b34fe
      Iustin Pop authored
      Currently there are a few version of "write a file safely" in the code.
      This patch adds a generic function that should be able to replace all
      the other versions.
      The "take attributes from the target file" option, while useful, is not
      implemented by this patch.
      Reviewed-by: imsnah,ultrotter
    • Iustin Pop's avatar
      Enhance GetHomeDir to accept either names or UIDs · 257f4c0a
      Iustin Pop authored
      Currently GetHomeDir accepts UIDs only. Enhance it to accept either a
      user name or a user id, to allow for nicer usage.
      Reviewed-by: imsnah
  7. 11 Oct, 2007 2 commits
  8. 10 Oct, 2007 2 commits
    • Alexander Schreiber's avatar
      Remove fping as a dependency for Ganeti. · 16abfbc2
      Alexander Schreiber authored
      This patch completely  gets rid of fping
       - replace all fping invocations with TcpPing calls
       - update documentation accordingly.
       - associated cleanups (use constant for localhost IP, use more sensible
         defaults for TcpPing and _use_ those)
      Reviewed-by: iustinp
    • Iustin Pop's avatar
      Remove the shebang from modules · 2f31098c
      Iustin Pop authored
      Since modules are not directly executables, remove the shebang from
      them. This helps with lintian warnings.
      Also make the autogenerated _autoconf.py contain two comment lines at
      the beginning, like the other modules.
      Reviewed-by: ultrotter
  9. 08 Oct, 2007 1 commit
  10. 27 Sep, 2007 1 commit
  11. 21 Sep, 2007 1 commit
    • Iustin Pop's avatar
      Remove requirement that host names are FQDN · 89e1fc26
      Iustin Pop authored
      We currently require that hostnames are FQDN not short names
      (node1.example.com instead of node1). We can allow short names as long
        - we always resolve the names as returned by socket.gethostname()
        - we rely on having a working resolver
      These issues are not as big as may seem, as we only did gethostname() in
      a few places in order to check for the master; we already required
      working resolver all over the code for the other nodes names (and thus
      requiring the same for the current node name is normal).  The patch
      moves some resolver calls from within execution path to the checking
      path (which can abort without any problems). It is important that after
      this patch is applied, no name resolving is called from the execution
      path (LU.Exec() or other code that is called from within those methods)
      as in this case we get much better code flow.
      This patch also changes the functions for doing name lookups and
      encapsulates all functionality in a single class.
      The final change is that, by requiring working resolver at all times, we
      can change the 'return None' into an exception and thus we don't have to
      check manually each time; only some special cases will check
      (ganeti-daemon and ganeti-watcher which are not covered by the
      generalized exception handling in cli.py). The code is cleaner this way.
      Reviewed-by: imsnah
  12. 19 Sep, 2007 1 commit
    • Iustin Pop's avatar
      Change resolved hostname from dict to a class · bcf043c9
      Iustin Pop authored
      The current result of utils.LookupHostname() is a dict, but this does
      not allow static checkers to check the correctness of the code. This
      patch introduces a new class names HostInfo and changes LookupHostname
      to return an instance of this class; this allows better checking of the
      code (and also the code is cleaner).
      Reviewed-by: ultrotter
  13. 17 Sep, 2007 2 commits
  14. 12 Sep, 2007 1 commit
  15. 11 Sep, 2007 1 commit
    • Iustin Pop's avatar
      Filters out LANG and LC_* on RunCmd · f6441c7c
      Iustin Pop authored
      This filters out the LANG and LC_ variables from the environment of programs
      executed by RunCmd, in order to get consistent output of execute programs like
      lvs, etc.
      Reviewed-by: imsnah
  16. 05 Sep, 2007 1 commit
  17. 03 Sep, 2007 1 commit
    • Iustin Pop's avatar
      Switch utils.RunCmd from popen2 to subprocess · 113b55aa
      Iustin Pop authored
      This changes the implementation of RunCmd from using the popen2 module
      to using the (new in 2.4) subprocess module.
      This is helpful because the subprocess module has more advanced features
      than popen2, the most important ones being the ability to run code in the
      child process before the exec and ability to launch with modified
      Reviewed-by: imsnah
  18. 14 Aug, 2007 1 commit
    • Iustin Pop's avatar
      Style changes for pep-8 and python-3000 compliance. · 3ecf6786
      Iustin Pop authored
      This changes the raising of exceptions from:
        raise Exception, value
        raise Exception(value)
      as the first form will be removed in python-3000 and the second form is
      preferred now.
      The changes also involve a few cases of changing from raising standard
      exceptions and use our own ones.
      The new version also fixes many pylint-generated warnings, especially in
      ganeti-noded where I changed many methods to @staticmethod.
      There is no functionality changed (barring any bugs).
  19. 26 Jul, 2007 1 commit
  20. 16 Jul, 2007 1 commit