Skip to content
Snippets Groups Projects
  1. Sep 17, 2007
    • Iustin Pop's avatar
      Add rename instance support to ConfigWriter · fc95f88f
      Iustin Pop authored
      This patch adds support for renaming instances to the ConfigWriter
      class. It's needed in here in order to guarantee that we don't lose the
      instance during the rename (the instance will be there, either with the
      old name or with the new name).
      
      Reviewed-by: imsnah
      fc95f88f
  2. Sep 14, 2007
    • Iustin Pop's avatar
      Change OpQueryNodes nodes attribute to names · 246e180a
      Iustin Pop authored
      Change this to have the exact same parameters as OpQueryInstances.
      
      Also fix burnin which is broken since r146.
      
      Reviewed-by: imsnah
      246e180a
    • Iustin Pop's avatar
      Enable LUQueryInstances to work with a given list of instances · 069dcc86
      Iustin Pop authored
      As per the changes to LUQueryNodes, the QueryInstances LU is modified to
      accept a list of instances for which to compute and return information.
      
      Reviewed-by: imsnah
      069dcc86
    • Iustin Pop's avatar
      Remove OpQueryNodeData and LUQueryNodeData · 4a72cc75
      Iustin Pop authored
      Now that LUQueryNodes supports all the functionality of LUQueryNodeData,
      let's migrate gnt-node.ShowNodeConfig to use it and remove all traces of
      OpQueryNodeData and LUQueryNodeData.
      
      Reviewed-by: imsnah
      4a72cc75
    • Iustin Pop's avatar
      Change LUQueryNodes to return raw values and support selective listing · ec223efb
      Iustin Pop authored
      LUQueryNodes it's very similar to LUQueryNodeData, but it lacks two
      features:
        - instance list (it has count though), both primary and secondary
        - selective node listing
      
      In order to support these features, we change it to return raw values
      instead of stringified ones (like the recent change to LUQueryInstances)
      and to support query-ing of a restricted set of nodes.
      
      This CL also modifies the gnt-node script to conform to the new protocol
      and the opcode OpQueryNodes to support the new "nodes" attribute.
      
      Reviewed-by: imsnah
      ec223efb
    • Iustin Pop's avatar
      Change _GetWanted* to return names instead of objects · a7ba5e53
      Iustin Pop authored
      On closer look, all except one of the current users of _GetWantedNodes are
      using only the name of the nodes and throw away the other attributes. It makes
      sense to make this function return only the name list (as in the future this
      might be faster than computing all attributes).
      
      Reviewed-by: imsnah
      a7ba5e53
  3. Sep 13, 2007
    • Iustin Pop's avatar
      Move string formatting out of LUQueryInstances · 8a23d2d3
      Iustin Pop authored
      Currently, LUQueryInstances will provide strings for its results. This makes it
      hard for other consumers than "gnt-instance list" to use the OpQueryInstances
      opcode for whatever they wish to.
      
      The change moves the formatting in five of the six cases where this happens to
      the actual gnt-instance.ListInstances procedure and removes the unconditional
      convert to string in LUQueryInstances.Exec()
      
      Reviewed-by: imsnah
      8a23d2d3
    • Iustin Pop's avatar
      Fix the ssh change which breaks remote ssh commands · 72f0f7fd
      Iustin Pop authored
      Explanation: since we use lists and not a string, every argument we give
      is passed unchanged to the remote shell. So, for example, passing
      '/etc/init.d/ganeti restart' to the remote shell, it will try to run the
      path /etc/init.d/ganeti\ restart. With the s space included. This
      breaks, for example, gnt-node add and gnt-cluster command.
      
      The original problem with the backup routines that led to the "'" change
      is that they use a plain " ".join(list), but we don't need to quote the
      whole ssh remote command for this. We can simply use the existing
      utils.ShellQuoteCmd(list) which does the proper quoting of the ';' or
      '&&' metacharacters.
      
      With this change, both gnt-node add, gnt-cluster command and
      export/import work.
      
      This also improves the error-handling behaviour of one cat command by
      making it conditional on the preceding mkdir.
      
      Reviewed-by: ultrotter
      72f0f7fd
  4. Sep 12, 2007
  5. Sep 11, 2007
  6. Sep 07, 2007
    • Guido Trotter's avatar
      Make import/export use the auxiliary ssh library to build the remote commands. · 00003458
      Guido Trotter authored
      This avoids forgetting some parameters, as it's happening right now 
      (the correct known host file is not being passed)
      
      In order to do so we split SSHCall into an auxiliary BuildSSHCmd which builds
      the command but doesn't actually call it, and SSHCall itself which runs RunCmd
      on top of BuildSSHCmd's result. BuildSSHCmd is then explicitely called by 
      import/export who has to build a more complex command to be run later.
      00003458
  7. Sep 05, 2007
  8. Sep 04, 2007
  9. Sep 03, 2007
    • Michael Hanselmann's avatar
      - Generic automake cleanup · 7c18ef8e
      Michael Hanselmann authored
      - Bump version number to 1.2b2
      - Add version.py file generated from version.py.in by autoconf
      
      Reviewed-by: schreiberal
      7c18ef8e
    • 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
      environment.
      
      Reviewed-by: imsnah
      113b55aa
  10. Aug 30, 2007
  11. Aug 28, 2007
  12. Aug 24, 2007
    • Iustin Pop's avatar
      Rework ssh known-hosts handling. · 82122173
      Iustin Pop authored
      This changes:
        - cluster setup, we no longer edit /etc/ssh/ssh_known_hosts but our
          own file
        - node add, we no longer remove root's known_hosts (twice)
        - gnt-instance console, both the LU and the script: since now the ssh
          setup is not standard, we need to build the ssh cmdline in the LU
          (instead of manually building it in the script) with the correct
          parameters and use the command line as returned in the script
        - ssh.py, many changes, split options in module-level constants so
          that building the command line in different places is easier/more
          logical
        - backend.py, we no longer remove root's known_hosts in Add node, and
          we allow our own known_hosts file to be uploaded
      
      Reviewed-by: imsnah
      82122173
  13. Aug 23, 2007
    • Iustin Pop's avatar
      Improve LURunClusterCommand · 02715459
      Iustin Pop authored
      This function used a hand-coded ssh call to remote nodes. Fix it to use the
      ssh.SSHCall function, and in the process drop the command field from the
      results, as it's too verbose and we can use (in gnt-cluster) what we passed in.
      
      Reviewed-by: schreiberal
      02715459
  14. Aug 22, 2007
  15. Aug 21, 2007
  16. Aug 20, 2007
  17. Aug 17, 2007
    • Iustin Pop's avatar
      Change cli.OutputTable to cli.GenerateTable · 16be8703
      Iustin Pop authored
      Since the table generation might be useful elsewhere, let's change it to
      return the data instead of directly printing it.
      
      Its callers have also been updated.
      
      Reviewed-by: imsnah
      16be8703
  18. Aug 16, 2007
    • Iustin Pop's avatar
      Some small fixes. · 8925faaa
      Iustin Pop authored
      It fixes the main Makefile.am to create $localstatedir/{lib,log}/ganeti.
      It fixes the testing Makefile.am after the rename fake_config.py ->
      mocks.py.  It strips the output of "ip link show" to have a nicer output
      if the master netdev does not exist.
      8925faaa
  19. Aug 14, 2007
    • 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
      to
        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).
      3ecf6786
  20. Aug 08, 2007
  21. Aug 06, 2007
  22. Aug 03, 2007
Loading