Statistics
| Branch: | Tag: | Revision:

root / scripts @ 12c3449a

# Date Author Comment
12c3449a 11/21/2007 06:55 pm Michael Hanselmann

Replace disk template drbd8 with drbd where missing.

Reviewed-by: iustinp

520de3bb 11/21/2007 11:36 am Iustin Pop

Correct the -s parameter in gnt-node output

This fixed the previous commit (-s => -s ip).

Reviewed-by: ultrotter

6174860c 11/21/2007 11:15 am Iustin Pop

Add the -s option in the output of 'gnt-node'

Since on dual-homed clusters one always needs to add '-s' to the
gnt-node add command, make this appear in the output of 'gnt-node' (when
run without arguments).

Reviewed-by: imsnah

1e020d1b 11/13/2007 05:04 pm Michael Hanselmann

Fix --node option for “gnt-backup list”.

Reviewed-by: iustinp

59885275 11/12/2007 05:36 am Guido Trotter

Change --nodes to --node

The --nodes option in gnt-backup really accepts only one node at a time.
Change it to --node, for added clarity and consistency with a similar
option in gnt-cluster. This patch also updates the relevant man page.

Reviewed-By: iustinp

0834c866 11/07/2007 05:53 pm Iustin Pop

Enhance secondary node replace for drbd8

This (big) patch does two things:
- add "local disk status" to the block device checks
(BlockDevice.GetSyncStatus and the rpc calls that call this
function, and therefore cmdlib._CheckDiskConsistency)
- improve the drbd8 secondary replace operation using the above...

60d49723 11/06/2007 07:04 pm Michael Hanselmann

Remove --secondary-node option.

Replace --secondary-node option with an optional parameter for --node.

9db6dbce 11/06/2007 07:01 pm Iustin Pop

Implement degraded status for logical volumes

Logical volumes can be 'degraded' in a similar way to mirrored devices,
when their underlying storage has gone away (i.e. after a physical disk
failure and 'vgreduce --removemissing'). If we can detect this, we can...

8fa42c7c 11/05/2007 02:43 am Guido Trotter

Make DiagnoseOS use the modified OS objects

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

73415719 11/03/2007 08:55 am Iustin Pop

Implement tag searching

This patch adds a search command for locating tags on all objects of the
cluster using a regex pattern.

Reviewed-by: aat

d06565e0 11/01/2007 07:51 pm Guido Trotter

Remove two trailing whitespaces

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

2527691a 11/01/2007 07:48 pm Guido Trotter

Move blank lines inside function messages

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

dd96409a 11/01/2007 07:48 pm Guido Trotter

Add empty line after each diagnose OS-Node set

Reviewed-By: imsnah

107b0ccb 11/01/2007 07:46 pm Guido Trotter

Modify the displayed format for gnt-os diagnose

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)...

48f85f75 11/01/2007 07:44 pm Guido Trotter

Change the way to compute the first os status message

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...

5efc50fc 11/01/2007 07:44 pm Guido Trotter

Separate OS status and path

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

80de0e3f 10/31/2007 10:12 pm Iustin Pop

Revert "Implement multi-failover options"

This reverts commit 289, as the node failover functionality was already
implemented in gnt-node (as opposed to gnt-instance). My mistake.

Reviewed-by: ultrotter

22d31e49 10/31/2007 05:19 pm Michael Hanselmann

Fix usage of OpReplaceDisks.

Reviewed-by: iustinp

bcee9cb4 10/31/2007 04:57 pm Iustin Pop

Small improvements to multi-instance selections

This patch fixes the documentation in a few cases and adds handling of
the situation where no instance is selected due to too restrictive
options given.

Reviewed-by: imsnah

36c87212 10/31/2007 04:56 pm Iustin Pop

Implement multi-failover options

This patch adds the same style of multi-instance selection as in
shutdown/startup to the failover subcommand, with the exception that we
cannot failover with --node or --all (it doesn't make sense).

Reviewed-by: imsnah

a9e0c397 10/29/2007 05:49 pm Iustin Pop

Implement replace-disks for drbd8 devices

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...

cc0451f3 10/29/2007 05:20 pm Guido Trotter

Convert ListOS to use the all helper function.

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

a1f445d3 10/24/2007 05:43 pm Iustin Pop

Initial implementation of drbd8 template type

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

fe96220b 10/19/2007 02:48 pm Iustin Pop

Abstract more strings values into constants

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...

579d4337 10/18/2007 01:26 pm Alexander Schreiber

Patch series for reboot feature, part 3

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)....

f55ff7ec 10/16/2007 05:30 pm Iustin Pop

Add the number of VCPUs in gnt-instance info

Reviewed-by: imsnah

1d67656e 10/16/2007 04:51 pm Iustin Pop

Allow force removal of instances

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...

a2656173 10/15/2007 02:45 pm Michael Hanselmann

Make “gnt-os diagnose” exit 1 if not all OSes are valid.

Reviewed-by: iustinp

fbdb07b9 10/12/2007 03:26 pm Guido Trotter

Reorder gnt-os simplify _GetAllOS and call it _DiagnoseByOS

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...

216fe2f3 10/12/2007 02:19 pm Guido Trotter

Fix ListOS which was broken

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

f5abe9bd 10/11/2007 05:47 pm Oleksiy Mishchenko

Docstring correction

Reviewed-by: iustinp

a5bc662a 10/10/2007 02:10 pm Iustin Pop

Implement gnt-node evacuate

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...

c450e9b0 10/09/2007 04:48 pm Iustin Pop

Implement node failover

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

b07a9f05 10/09/2007 02:15 pm Guido Trotter

Refactor DiagnoseOS

The new version debugs Hidden OSes as well.

Reviewed-by: iustinp

3ef10550 10/08/2007 06:18 pm Michael Hanselmann

Add boot id to “gnt-node list”.

Reviewed-by: iustinp

810c50b7 10/08/2007 06:12 pm Iustin Pop

Add source file option for {add,remove}-tags

This patch adds a '--from' option to the {add,remove}-tags commands that
allows the command to read from a file or from stdin (when passing a
dash for the filename).

Reviewed-by: imsnah

846baef9 10/08/2007 06:11 pm Iustin Pop

Implement command-line tags support

This patch adds generic functions for tag manipulations to cli.py and
modifies gnt-{cluster,node,instance} to export {list,add,remove}-tags
commands that use those.

Reviewed-by: imsnah

305a7297 10/04/2007 02:51 pm Guido Trotter

Ship (and display) path for InvalidOS errors too.

- Document the expected change to errors.InvalidOS
- Always pass the additional argument
- Modify DiagnoseOS output to show the path

Reviewed-by: iustinp, imsnah

694e2444 10/04/2007 01:41 pm Guido Trotter

Fix OS Diagnose in light of the new OS Search path (Part One).

As of now only the last OS was taken into consideration by diagnose, fix by
storing them all and displaying for now only the first. Also display the source
path for valid OSes.

Reviewed-by: imsnah

99e8bbde 10/02/2007 03:50 pm Guido Trotter

Add warning on gnt-node add operation.

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

a181730e 09/27/2007 03:18 pm Michael Hanselmann

Pass required ip_check parameter to OpCreateInstance in gnt-backup.

Reviewed-by: ultrotter

804a1e8e 09/20/2007 10:26 am Iustin Pop

Ask for confirmation when touching multiple instances

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...

47988778 09/19/2007 05:24 pm Iustin Pop

Improve the cli.AskUser() function

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:...

bdd55f71 09/19/2007 04:52 pm Iustin Pop

Allow 'add instance' to not start the new instance

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)....

07bd8a51 09/18/2007 03:42 pm Iustin Pop

Implement cluster rename operation

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...

4ab0b9e3 09/18/2007 11:06 am Guido Trotter

Fix a docstring

Reviewed-by: iustinp

decd5f45 09/17/2007 02:52 pm Iustin Pop

Implement instance rename operation

This patch adds support for instance rename operation at all remaining
layers: RPC, OpCode/LU and CLI.

Reviewed-by: imsnah

312ac745 09/17/2007 12:12 pm Iustin Pop

Allow start/stop of multiple instances at once

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...

246e180a 09/14/2007 12:54 pm Iustin Pop

Change OpQueryNodes nodes attribute to names

Change this to have the exact same parameters as OpQueryInstances.

Also fix burnin which is broken since r146.

Reviewed-by: imsnah

069dcc86 09/14/2007 12:54 pm Iustin Pop

Enable LUQueryInstances to work with a given list of instances

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

4a72cc75 09/14/2007 12:03 pm Iustin Pop

Remove OpQueryNodeData and LUQueryNodeData

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

ec223efb 09/14/2007 12:02 pm Iustin Pop

Change LUQueryNodes to return raw values and support selective listing

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...

8a23d2d3 09/13/2007 02:49 pm Iustin Pop

Move string formatting out of LUQueryInstances

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...

b9ac33e9 08/30/2007 01:29 pm Iustin Pop

Fix the manpage gnt-instance w.r.t. units

The manpage wrongly states that the default unit for disk sizes is
gibibytes, whereas currently it's mebibytes. Fix that and also update
the '--help' output to display the default unit.

Reviewed-by: roman.marxer

82122173 08/24/2007 12:20 pm Iustin Pop

Rework ssh known-hosts handling.

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...

02715459 08/23/2007 04:59 pm Iustin Pop

Improve LURunClusterCommand

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....

644eeef9 08/20/2007 03:17 pm Iustin Pop

Add support for listing instance disk sizes.

Reviewed-by: imsnah

16be8703 08/17/2007 12:14 pm Iustin Pop

Change cli.OutputTable to cli.GenerateTable

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

3ecf6786 08/14/2007 06:17 pm Iustin Pop

Style changes for pep-8 and python-3000 compliance.

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...

c2a62a33 08/03/2007 04:54 pm Michael Hanselmann

Import constants into gnt-cluster.

Reviewed-by: iustinp

cf62a272 08/02/2007 06:54 pm Michael Hanselmann

Put default bridge into constant.

Reviewed-by: iustinp

bdb8c997 08/02/2007 12:41 pm Guido Trotter

Fix a function's doc string

Reviewed-By: iustinp

606d909d 07/27/2007 04:26 pm Michael Hanselmann

Use OutputTable for “gnt-os list”.

Reviewed-by: iustinp

739ecd56 07/27/2007 12:34 pm Michael Hanselmann

Remove defectiv comma.

Reviewed-by: iustinp

d0834de3 07/27/2007 12:05 pm Michael Hanselmann

- Implement “gnt-instance reinstall --os-type=…”
- Add the command to gnt-instance.sgml

Reviewed-by: iustinp

59322403 07/27/2007 11:15 am Iustin Pop

Fix the "gnt-cluster getmaster" command by making the LuQueryClusterInfo
runnable on non-master nodes (and remove the list of instances and nodes
returned by it, that information can be retrieved by other opcodes).

Also, remove the node/instance list from "gnt-cluster info" as it...

fe7b0351 07/26/2007 07:09 pm Michael Hanselmann

- Move --force option to cli.py
- Implement “gnt-instance reinstall”
- Fix two typos

Reviewed-by: iustinp

098c0958 07/26/2007 02:40 pm Michael Hanselmann

Comment formatting updates.

Reviewed-by: iustinp

137161c9 07/24/2007 04:29 pm Michael Hanselmann

Use generic function to output tables.

Reviewed-by: iustinp

dcb93971 07/24/2007 02:45 pm Michael Hanselmann

- Implement “gnt-node volumes”
- Create all --output options using a constant
- Put node checking code from opcodes into a single function
- Do the same for output fields

Reviewed-by: iustinp

880478f8 07/23/2007 05:38 pm Iustin Pop

Big change/cleanup in relation to the master startup:
- move the master node name from the ConfigWriter to SimpleStore (all
nodes need this, and it was the only thing pulled in from the
ConfigWriter on nodes)
- fix mcpu.py and the testing w.r.t. this change; for testing, rename...

79f7be7b 07/23/2007 11:53 am Iustin Pop

Fix small typo.

Reviewed-by: imsnah

dd4b1106 07/23/2007 10:45 am Iustin Pop

Add the gnt-backup script and man-pages.

Reviewed-by: imsnah

a8083063 07/16/2007 04:39 pm Iustin Pop

Initial commit.