Skip to content
Snippets Groups Projects
  1. Oct 10, 2007
    • 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
      
      16abfbc2
    • Iustin Pop's avatar
      Some small fixes to utils.GenerateTable · 01ca31ae
      Iustin Pop authored
      This adds:
        - fix the case when a dumb caller didn't stringify its values
        - explicitly raise a ProgrammerError in case a field is missing from
          the headers dictionary
      
      Reviewed-by: imsnah
      01ca31ae
    • Iustin Pop's avatar
      Fix AskUser to not die on extra input · 3023170f
      Iustin Pop authored
      Currently, AskUser dies with -ESPIPE if the user gives more than one
      character plus newline. This is because the python library, while
      returning only two chars from the readline(2) call, will cache the rest
      of the input, and when we do a write, it will try to seek back to just
      after the last returned char. This fails on /dev/tty, so an exception is
      raised. However, then opening the file descriptor in O_APPEND mode,
      python will not issue such seeks, thereby fixing this problem.
      
      The other alternative, opening in unbuffered mode, is not as good, since
      then python will issue one-byte reads at a time, but the tty will read
      the entire line, so at the next readline call, whatever remained in the
      descriptor buffer is returned from the kernel to python, and the user
      doesn't get a chance to enter something at all.
      
      Reviewed-by: imsnah
      3023170f
    • Iustin Pop's avatar
      Implement gnt-node evacuate · a5bc662a
      Iustin Pop authored
      This patch adds a new 'evacuate' subcommand to gnt-node. The command
      will do a replace disks for all instances having that node as secondary
      with the new target being the new node given.
      
      The syntax is:
        gnt-node evacuate src_node target_node
      
      The command by itself doesn't do any resource checks, and instead relies
      on the LUFailoverInstance code to do that.
      
      Reviewed-by: imsnah
      a5bc662a
    • Michael Hanselmann's avatar
      Make Xen DomU kernel and initrd configurable at build time. · f00b46bc
      Michael Hanselmann authored
      Reviewed-by: iustinp
      
      f00b46bc
    • 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
      2f31098c
    • Michael Hanselmann's avatar
      Detect node restarts and reactivate disks. · 5a3103e9
      Michael Hanselmann authored
      - Change format of watcher state file to JSON.
      - Move log path for watcher script to constants.py.
      
      Reviewed-by: iustinp
      
      5a3103e9
  2. Oct 09, 2007
  3. Oct 08, 2007
  4. Oct 04, 2007
    • Guido Trotter's avatar
      Remove redundant check. · 0ee60a28
      Guido Trotter authored
      This isdir() check leads to a broken error message. Even fixing it creates some
      cases in which the error message is nebulous and unclear while removing it
      makes this situation be dealt with a lot better by the _OSOndiskVersion checks.
      
      
      Reviewed-by: iustinp
      
      0ee60a28
    • Guido Trotter's avatar
      Ship (and display) path for InvalidOS errors too. · 305a7297
      Guido Trotter authored
      - Document the expected change to errors.InvalidOS
      - Always pass the additional argument
      - Modify DiagnoseOS output to show the path
      
      
      Reviewed-by: iustinp, imsnah
      
      305a7297
    • Michael Hanselmann's avatar
      Change configuration storage format from Pickle to JSON. · 319856a9
      Michael Hanselmann authored
      - Add NEWS file with major changes between versions.
      - Bump RPC version number
      - No longer serialize in RPC, but just convert to dict
      
      Old Pickle based configuration files can be converted using the cfgupgrade
      utility.
      
      Reviewed-by: iustinp, ultrotter
      
      319856a9
  5. Oct 03, 2007
  6. Sep 28, 2007
  7. Sep 27, 2007
  8. Sep 25, 2007
  9. Sep 24, 2007
    • Iustin Pop's avatar
      Implement to/from dict conversion for ConfigObject(s) · ff9c047c
      Iustin Pop authored
      This change allows instances of ConfigObject and its children to be
      converted to and from standard python types. This will allow easier
      upgrade of the configuration and use of any serialization protocol (not
      only pickle).
      
      The code is not very nice (a little too verbose, I think) but it works.
      Tested on a 2-node, 3-instance cluster by doing repeated conversions and
      checking consistency of results.
      
      Reviewed-by: imsnah
      ff9c047c
  10. Sep 21, 2007
    • Iustin Pop's avatar
      Change class hierarchy in objects.py · ec29fe40
      Iustin Pop authored
      It makes sense to make the TaggableObject a child of the ConfigObject,
      since in this case we can derive the Instance, Node and Cluster objects
      only from the TaggableObject and have a cleaner hierarchy.
      
      For consistency child classes will have to declare their slots by adding
      their parents on top.
      
      Reviewed-by: imsnah,ultrotter
      ec29fe40
    • 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
      as:
        - 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
      89e1fc26
    • Iustin Pop's avatar
      Move a constant from ganeti-master to constants.py · 619fdc8e
      Iustin Pop authored
      The EXIT_NODESETUP_ERROR is a useful constant and ganeti-watcher could
      use it too. This patch moves it to constants.py and modifed the
      ganeti-master script to use it from there.
      
      Reviewed-by: imsnah
      619fdc8e
    • Iustin Pop's avatar
      Add __slots__ on TaggableObject · 2057f6c7
      Iustin Pop authored
      Unless we use __slots__ on all parents, we don't get the benefits that
      __slots__ bring. This patch adds this attribute to the TaggableObject so
      that Instances, Nodes and the Clusters behave as intended.
      
      Reviewed-by: schreiberal,imsnah
      2057f6c7
  11. Sep 19, 2007
    • Iustin Pop's avatar
      Improve the cli.AskUser() function · 47988778
      Iustin Pop authored
      This patch improves the AskUser function by allowing it to:
       - choose from multiple choices (instead of only y/n)
       - give help to the user
       - preserve line breaks and whitespace formatting in the message
      
      With this patch, an instance removal looks like this:
      root@xen-test1-4:~# gnt-instance remove tsetest1
      This will remove the volumes of the instance tsetest1 (including
      mirrors), thus removing all the data of the instance. Continue?
      y/[n]/?: ?
       y - Perform the operation
       n - Do not perform the operation
      
      This will remove the volumes of the instance tsetest1 (including
      mirrors), thus removing all the data of the instance. Continue?
      y/[n]/?: y
      
      The patch also removed the _ask_user member of the opts argument, since
      external code was using it (and thus it makes no sense for it to be a
      private member); now gnt-* scripts are using the AskUser function
      directly.
      
      Reviewed-by: ultrotter
      47988778
    • Iustin Pop's avatar
      Allow 'add instance' to not start the new instance · bdd55f71
      Iustin Pop authored
      This patch allows 'gnt-instance add' to not start the newly-created
      instance. It also allow 'gnt-instance add' and 'gnt-backup import' to
      not check for IP conflicts (only when not starting the instance).
      
      Reviewed-by: ultrotter
      bdd55f71
    • 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
      bcf043c9
Loading