Skip to content
Snippets Groups Projects
  1. Nov 05, 2007
    • Guido Trotter's avatar
      Make DiagnoseOS use the modified OS objects · 8fa42c7c
      Guido Trotter authored
      Modify backend.py so that DiagnoseOS only returns OS objects rather than
      InvalidOS errors, and make sure gnt-os understands the new objects. Also delete
      the deprecated helper functions from gnt-os.
      
      Reviewed-By: iustinp
      
      8fa42c7c
  2. Nov 03, 2007
    • Iustin Pop's avatar
      Implement tag searching · 73415719
      Iustin Pop authored
      This patch adds a search command for locating tags on all objects of the
      cluster using a regex pattern.
      
      Reviewed-by: aat
      73415719
  3. Nov 01, 2007
    • Guido Trotter's avatar
      Remove two trailing whitespaces · d06565e0
      Guido Trotter authored
      Ok, I've been battling with those for a while but it seems
      in the end I forgot to get rid of them! :( Doing it explicitely now.
      
      Reviewed-By: iustinp
      d06565e0
    • Guido Trotter's avatar
      Move blank lines inside function messages · 2527691a
      Guido Trotter authored
      This patch changes whitespace only. It fixes all the functions in script/gnt-os
      by putting a white line at the end of all the function descriptions and
      removing it from just before the code.
      
      Reviewed-By: iustinp
      2527691a
    • Guido Trotter's avatar
      Add empty line after each diagnose OS-Node set · dd96409a
      Guido Trotter authored
      Reviewed-By: imsnah
      dd96409a
    • Guido Trotter's avatar
      Modify the displayed format for gnt-os diagnose · 107b0ccb
      Guido Trotter authored
      Get rid of the tabulated form and create a simplier indented structure.
      Now a valid OS looks something like:
      
      OS: foo [global status: partial valid]
        Node: gsdtest4.euw.corp.google.com, status: valid (path: /usr/local/lib/ganeti/os/foo)
        Node: gsdtest5.euw.corp.google.com, status: valid (path: /usr/local/lib/ganeti/os/foo)
          [hidden] path: /usr/local/lib/ganeti/os2/foo, status: 'ganeti_api_version' file not found (ENOENT)
        Node: gsdtest3.euw.corp.google.com, status: 'ganeti_api_version' file not found (ENOENT) (path: /usr/local/lib/ganeti/os/foo)
      
      Reviewed-By: imsnah
      107b0ccb
    • Guido Trotter's avatar
      Change the way to compute the first os status message · 48f85f75
      Guido Trotter authored
      Use both _DiagnoseOSStatus and  _DiagnoseOSPath to calculate the message
      associated with the first entry found on a node for an OS. Also call the rename
      the relevant variables to _msg rather than just _status to reflect that they
      contain a bit more than just the bare status message.
      
      Reviewed-By: imsnah
      
      48f85f75
    • Guido Trotter's avatar
      Separate OS status and path · 5efc50fc
      Guido Trotter authored
      Make _DiagnoseOSStatus only return a status message for the OS diagnose object
      and create a new _DiagnoseOSPath function to get the path out. This will let us
      be more flexible in the messages we display to the user.
      
      Reviewed-By: imsnah
      5efc50fc
  4. Oct 31, 2007
  5. Oct 29, 2007
    • Iustin Pop's avatar
      Implement replace-disks for drbd8 devices · a9e0c397
      Iustin Pop authored
      This patch adds three modes of disk replacement for drbd8:
        - replace the disk on the primary node
        - replace the disk on the secondary node
        - replace the secondary node
      
      It also adds some debugging code to backend.py and increments the
      protocol version for the recent changes of the rpc layer.
      
      Reviewed-by: imsnah
      a9e0c397
    • Guido Trotter's avatar
      Convert ListOS to use the all helper function. · cc0451f3
      Guido Trotter authored
      The predicate function gets build by a lambda function.
      Also add a bit of debugging information to the 'unknown OS diagnose type'.
      
      
      Reviewed-by: iustinp
      
      cc0451f3
  6. Oct 24, 2007
    • Iustin Pop's avatar
      Initial implementation of drbd8 template type · a1f445d3
      Iustin Pop authored
      This is a partially working drbd8 template type. It does:
        - add/remove
        - startup/failover/shutdown
      
      Not working is replace disks, which needs custom code for this template.
      
      Reviewed-by: imsnah
      a1f445d3
  7. Oct 19, 2007
    • Iustin Pop's avatar
      Abstract more strings values into constants · fe96220b
      Iustin Pop authored
      Currently, the disk types are defined using constants in the code.
      Convert those into constants so that we can easily find them and check
      their usage.
      
      Note that we don't rename the values of the constants as they are used
      in the configuration file, and as such it's best to leave them as they
      are.
      
      Reviewed-by: imsnah
      fe96220b
  8. Oct 18, 2007
    • Alexander Schreiber's avatar
      Patch series for reboot feature, part 3 · 579d4337
      Alexander Schreiber authored
      This patch series implements the reboot command for gnt-instance. It
      supports three types of reboot: soft (hypervisor reboot), hard (instance
      config rebuild and reboot) and full (full instance shutdown and startup
      again).
      
      This patch contains the gnt-instance script and the man page for it.
      
      Reviewed-by: iustinp
      
      579d4337
  9. Oct 16, 2007
    • Iustin Pop's avatar
      Add the number of VCPUs in gnt-instance info · f55ff7ec
      Iustin Pop authored
      Reviewed-by: imsnah
      f55ff7ec
    • Iustin Pop's avatar
      Allow force removal of instances · 1d67656e
      Iustin Pop authored
      This patch adds a new option to the instance removal command
      "--ignore-failures" that forces the removal of the instance from the
      configuration even if the removal process encounters errors.
      
      In order to be able to do this when the remote node(s) is(are) down, we
      need to restrict the execution of the instance removal hook to the
      master only. I think this is a reasonable trade-off (but I'm not sure).
      
      Reviewed-by: imsnah
      1d67656e
  10. Oct 15, 2007
  11. Oct 12, 2007
    • Guido Trotter's avatar
      Reorder gnt-os simplify _GetAllOS and call it _DiagnoseByOS · fbdb07b9
      Guido Trotter authored
      Put some order in gnt-os putting helper functions above and command functions
      below. Also add a new _DiagnoseOSName() function and use it to make _GetAllOS
      simplier to understand. Change its name to _DiagnoseByOS which makes more clear
      what it does.
      
      
      
      Reviewed-by: iustinp
      
      fbdb07b9
    • Guido Trotter's avatar
      Fix ListOS which was broken · 216fe2f3
      Guido Trotter authored
      To do this we abstract the creation of the all_os dictionary, which was
      produced in DiagnoseOS and use it both for listing and diagnosing.
      
      
      Reviewed-by: iustinp
      
      216fe2f3
  12. Oct 11, 2007
  13. Oct 10, 2007
    • 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
  14. Oct 09, 2007
    • Iustin Pop's avatar
      Implement node failover · c450e9b0
      Iustin Pop authored
      This patch implements a simple failover command for failing over all
      primary instances. This is just a batched form of gnt-instance failover.
      
      Reviewed-by: imsnah
      c450e9b0
    • Guido Trotter's avatar
      Refactor DiagnoseOS · b07a9f05
      Guido Trotter authored
      The new version debugs Hidden OSes as well.
      
      
      Reviewed-by: iustinp
      
      b07a9f05
  15. Oct 08, 2007
  16. Oct 04, 2007
  17. Oct 02, 2007
    • Guido Trotter's avatar
      Add warning on gnt-node add operation. · 99e8bbde
      Guido Trotter authored
      People might not have read all the documentation and might not expect their ssh configuration
      and specially keys to be changed. Adding this warning will inform them before it happens.
      
      Reviewed-by: iustinp
      
      99e8bbde
  18. Sep 27, 2007
  19. Sep 20, 2007
    • Iustin Pop's avatar
      Ask for confirmation when touching multiple instances · 804a1e8e
      Iustin Pop authored
      This patch makes the new startup/shutdown multi-instance operations to
      ask for confirmation when touching more than one instance (and unless
      --force-multi is given).
      
      The code is not very short, but it does present a nice (IMO) user
      interface.
      
      Reviewed-by: ultrotter
      804a1e8e
  20. 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
  21. Sep 18, 2007
    • Iustin Pop's avatar
      Implement cluster rename operation · 07bd8a51
      Iustin Pop authored
      This patch adds a new OpCode (and corresponding LU) that implements the
      cluster rename functionality.
      
      This is done by shutting down the master role, making the needed sstore
      modifications and distributing the changed files to all nodes, and then
      re-enabling the master role.
      
      The modification to the man page of gnt-cluster also moves the section
      on gnt-cluster destroy in order to correct alphabetical ordering.
      
      Reviewed-by: imsnah
      07bd8a51
    • Guido Trotter's avatar
      Fix a docstring · 4ab0b9e3
      Guido Trotter authored
      Reviewed-by: iustinp
      4ab0b9e3
  22. Sep 17, 2007
    • Iustin Pop's avatar
      Implement instance rename operation · decd5f45
      Iustin Pop authored
      This patch adds support for instance rename operation at all remaining
      layers: RPC, OpCode/LU and CLI.
      
      Reviewed-by: imsnah
      decd5f45
    • Iustin Pop's avatar
      Allow start/stop of multiple instances at once · 312ac745
      Iustin Pop authored
      This is an initial version of the multi-instance start/stop, which
      allows the gnt-instance startup and shutdown subcommands to work on
      multiple instances at once.
      
      The available selections are:
        - "gnt-instance startup --instance name..." which is the default, and
          if passed only one argument it behaves like the original command)
        - "gnt-instance startup --node name..." will work on all instances
          having either primary or secondary one of the passed names
        - "gnt-instance startup --primary name..." will work on all instances
          having primary node one of the passed names
        - "gnt-instance startup --secondary name..." will work on all
          instances having as secondary node one of the passed names
        - "gnt-instance startup --all" will work on all instances
      
      This allows a simple cluster-wide shutdown or node shutdown (or
      startup).
      
      Note that this version stops at the first error - it will not try to
      start the 2nd instance selected if there is a critical error with the
      1st one.
      
      Also note that this version is not faster than simply running manually
      "gnt-instance shutdown NAME", because it doesn't parallelize the
      shutdown/startup actions.
      
      Reviewed-by: imsnah,roman.marxer
      312ac745
Loading