Statistics
| Branch: | Tag: | Revision:

root / scripts / gnt-instance @ 5ffaa51d

History | View | Annotate | Download (53.3 kB)

# Date Author Comment
5ffaa51d 01/29/2009 05:09 pm Iustin Pop

gnt-instance list: accept input names

Currently gnt-instance list will refuse to take arguments, and always
return the full list of instances. This patch allows it to pass names to
LUQueryInstances, so that we restrict the input to a given set of
instances....

a76f0c4a 01/29/2009 05:08 pm Iustin Pop

Check that instance exists before confirm. queries

Currently we ask the user for confirmation, and only after (try to)
remove, failover or migrate the instance. This doesn't work nicely if
the instance doesn't exist, so we make a query for the instance before...

479636a3 01/27/2009 05:41 pm Iustin Pop

Rework the multi-instance gnt commands

This patch changes the multi-instance gnt-* commands (gnt-instance
start/stop, gnt-node evacuate/failover) such that the individual
operations are submitted in parallel, ideally improving the speed of the
execution....

7312b33d 01/23/2009 03:33 pm Iustin Pop

Sort the instance names in batcher

In case we submit multiple instances via batcher, it's nicer to have the
sorted nicely.

Reviewed-by: imsnah

9939547b 01/23/2009 03:33 pm Iustin Pop

Fix batcher for 2.0-style disks and nics

This patch fixes the gnt-instance batch-create command, and in doing so
also slightly changes two other functions:
- we change utils.ParseUnit so that it accepts integer values also
(both ParseUnit(5) and ParseUnit("5") return the same value)...

1325da74 01/23/2009 02:36 pm Iustin Pop

Make iallocator work with offline nodes

This patch changes the iallocator framework to work with and properly
export to plugins offline nodes. It does this by only exporting the
static configuration data for those nodes, and not attempting to parse
the runtime data....

2f907a8c 01/20/2009 04:20 pm Iustin Pop

Fix a couple of epydoc warnings

Reviewed-by: ultrotter

53c776b5 01/13/2009 05:21 pm Iustin Pop

Forward port the live migration from 1.2 branch

This is forward port via copy (and not individual patches cherry-pick)
of the latest code on the 1.2 branch related to the migration.

The changes compared to 1.2 are the fact that we don't need the
IdentifyDisks step anymore (the drbd rpc calls are independent now), and...

19708787 01/12/2009 02:42 pm Iustin Pop

Heavy redo of gnt-instance info output

In 2.0, we have more parameters in drbd's logical_id, and passing the
results over json makes them unicode which looks worse with the default
formatting. As such, a redo of the output is needed.

This patch:
- adds a separate function to format the logical_id of devices...

7e9366f7 01/09/2009 02:22 pm Iustin Pop

Cleanup replace-disks modes and options

In 1.2, due to the md+drbd7 legacy, we had a complex choice of replace
modes, and the new drbd8 modes where forced into this syntax, with some
complicated rules of transition from one mode to another (if REPLACE_ALL...

467ae11e 12/02/2008 12:25 pm Guido Trotter

SetInstanceParams: handle default/none values

If the hv/be parameter lowercase value is set to "default" we'll pass
constants.VALUE_DEFAULT, if it's set to "none" we'll pass
constants.VALUE_NONE.

Reviewed-by: imsnah

dfecf310 12/01/2008 10:52 pm Michael Hanselmann

gnt-instance add: Remove "--os-size" and "--swap-size"

They're not used anymore.

Reviewed-by: ultrotter

e0e31530 11/27/2008 05:12 am Iustin Pop

Allow network-less instances

Currently there's no way to specify no NICs for an instance, even though
this is a supported configuration.

The patch adds a --no-nics option to gnt-instance add.

Reviewed-by: amishchenko

112050d9 11/27/2008 05:12 am Iustin Pop

Fix instance creation

This patch fixes the diskless and drbd/file based instances. Sorry :(

Reviewed-by: ultrotter

24991749 11/25/2008 02:57 pm Iustin Pop

Implement support for multi devices changes

This big patch adds support for:
- changing NIC/disks in the multi-device model
- adding/removing NICs
- adding/removing disks

The patch is big and not very nice; the error checking paths are not
very clear....

b6fdf8b8 11/25/2008 02:50 pm Iustin Pop

Show disk access mode in gnt-instance info

The mode parameter needs to be exported and shown in the info output.

Reviewed-by: imsnah

d2acfe27 11/25/2008 02:50 pm Iustin Pop

Slighly improve multi-nic in gnt-instance info

Previously we had only one nic, so the NIC information was all on one
line. This patch changes it to:

- NICs:
- nic/0: MAC: aa:00:00:e8:b2:ef, IP: None, bridge: None
- nic/1: MAC: aa:00:00:53:ca:92, IP: None, bridge: xen-br0...
9fbfbb7b 11/23/2008 05:34 pm Iustin Pop

Enable auto-unit formatting in script output

This patch enables by default the old 'human-readable' option, but in a
slightly different model.

The option is now called "units" and takes either:
- 'h' for automatic formatting
- 'm', 'g' or 't' for mebi/gibi/tebibytes...

23b8c8d6 11/23/2008 05:34 pm Iustin Pop

Improvements to CLI output

This patch adds nicer formatting for some gnt-instance list operations.

Reviewed-by: ultrotter

00430f8e 11/21/2008 05:36 pm Iustin Pop

Make cli.py use FieldSet for matching fields

This changes cli.py to FieldSet usage so that gnt-instance list will
format nicely the disk.size/*, and the count of disks/nics.

Reviewed-by: ultrotter

ad24e046 11/21/2008 05:34 pm Iustin Pop

Change GrowDisk to work with multi-disk

This patch changes the instance.FindDisk method to take index arguments
(instead of iv_names), and changes GrowDisk and list instances
accordingly.

Reviewed-by: ultrotter

54155f52 11/20/2008 08:22 am Iustin Pop

Convert replace-disks (same nodes) to multi-disk

This patch changes the drbd8 replace disk only (no secondary change) to
work in with multi-disk. This mode of replaces works correctly with
replacing only a subset of disks.

Reviewed-by: imsnah

08db7c5c 11/20/2008 08:22 am Iustin Pop

Initial multi-disk/multi-nic support

This patch adds support for mult-disk/multi-nic in:
- instance add
- burnin

The start/stop/failover/cluster verify work as expected. Replace disk
and grow disk are TODO.

There's also a change gnt-job to allow dictionaries to be listed in...

7232c04c 10/28/2008 01:18 am Iustin Pop

Documentation updates for gnt-instance

Reviewed-by: imsnah

2f79bd34 10/20/2008 03:33 pm Iustin Pop

Fix some pylint-detected issues on the scripts

Some names were wrong, and similar stuff detected by pylint.
gnt-debug.GenericOpCode is still broken.

Reviewed-by: imsnah

3a24c527 10/20/2008 03:33 pm Iustin Pop

Convert the gnt scripts to ToStdout/err

Currently the gnt-* scripts are using a mix of print, logger.ToStd* and
sys.stderr.write. We convert them all to using cli.ToStdout/err. This
way, we can easily change the implementation for all at once.

Reviewed-by: imsnah

61be6ba4 10/20/2008 03:16 pm Iustin Pop

Fix gnt-instance modify with beparams

The gnt-instance modify didn't work correctly w.r.t the be parameters.
There was also a typo in the corresponding LU.

Reviewed-by: imsnah

0d0e9090 10/15/2008 04:38 pm René Nussbaumer

Adding batch-create to gnt-instance

This change is part of the integration of tools/batcher from
Ganeti 1.2 into Ganeti 2.0 core code. It has a compatible
submission interface to the version from 1.2 with these differences:

  • it's integrated into Ganeti directly: gnt-instance batch-create...
7399cd55 10/14/2008 07:33 pm Guido Trotter

gnt-instance fix ValidateBeParams call

ValidateBeParams does not return, but its return value is assigned to a
variable which is never used. Avoid this assignment.

Reviewed-by: iustinp

7ac1fc45 10/14/2008 07:33 pm Guido Trotter

gnt-instance remove deprecated flags

kernel, initrd, hvm_boot_order and vnc_bind_address are now hypervisor
parameters and should not have their own flag. Moreover querying of
vnc_bind_address should of course pass through the hv/ namespace.

Reviewed-by: iustinp

6605411d 10/14/2008 07:23 pm Iustin Pop

grow-disk: wait until resync is completed

The patch adds a new ‘--no-wait-for-sync’ parameter to grow-disk similar
to the one in instance add, and changes the default to wait.

This is cleaner as at the moment when the command returns, we either
have a fully synced disk or there is an error....

c0f2b229 10/14/2008 05:42 pm Iustin Pop

Some fixes related to auto_balance

Change the constant name to match the value (autobalance ->
auto_balance).

Also add the auto_balance header so that gnt-instance can list it.

Reviewed-by: ultrotter

338e51e8 10/14/2008 02:29 pm Iustin Pop

Change over to beparams

This big patch changes the master code to use the beparams. Errors might
have crept in, but it passes a small burnin.

Reviewed-by: ultrotter

57821cac 10/14/2008 01:21 pm Iustin Pop

Allow instance info to only query the config file

This patch adds a new '-s' parameter to ‘gnt-instance info’ that makes
it return only 'static' information. This is much faster, especially for
drbd instances.

This is a forward-port of rev 1570 on the ganeti-1.2 branch, resending...

24838135 10/14/2008 01:21 pm Iustin Pop

Convert gnt-instance info to the hvparams model

Some informations are not printed nicely (e.g. “virtual CDROM: False”),
but this is the first step.

Reviewed-by: imsnah

74409b12 10/14/2008 01:20 pm Iustin Pop

Change gnt-instance modify to the hvparams model

Reviewed-by: imsnah

5018a335 10/14/2008 01:20 pm Iustin Pop

Change gnt-instance list to the hvparams model

This is just a change of the various hvm_ and pvm parameters to the hv
model. Parameters are queried via hv/$name or via the whole dict as
returned by hvparams.

Reviewed-by: ultrotter,imsnah

6785674e 10/14/2008 01:20 pm Iustin Pop

Switch instance hypervisor parameters to hvparams

This big patch changes instance create to the new hvparams structure.
Old parameters are removed, so old jobs or old instances file will break
current clusters.

Reviewed-by: ultrotter

e69d05fd 10/08/2008 01:36 pm Iustin Pop

Move the hypervisor attribute to the instances

This (big) patch moves the hypervisor type from the cluster to the
instance level; the cluster attribute remains as the default hypervisor,
and will be renamed accordingly in a next patch. The cluster also gains...

bf2fd71e 10/07/2008 04:16 pm Alexander Schreiber

Change default instance reboot type to hard.

Merged r1777 from branches/ganeti/ganeti-1.2

Reviewed-by: imsnah

38d7239a 09/27/2008 06:58 pm Iustin Pop

Allow listing of the serial_no via gnt-* list

This patch adds listing of the serial_no attribute in gnt-instance and
gnt-node list, and updates to the manpages to reflect the change.

Reviewed-by: ultrotter

746ea1da 09/11/2008 08:45 pm Guido Trotter

gnt-instance: fix tags commands online help

It used to refer to "nodes", which was confusing.

Reviewed-by: iustinp

aefef4f4 09/11/2008 11:25 am Iustin Pop

Add gnt-instance (start|stop) --submit

Finish the --submit changes with these two, which (because they are
multi-opcode commands) require special handling.

Reviewed-by: ultrotter

b7329c9c 09/10/2008 08:06 pm Iustin Pop

Do not use jobs in gnt-instance _ExpandNames()

In the gnt-instance script, _ExpandNames() uses jobs to query instance
names. This is not optimal, so we change it to use queries.

Reviewed-by: ultrotter

6340bb0a 09/10/2008 08:06 pm Iustin Pop

Implement "--submit" on gnt-instance

This patch adds support for the “--submit” parameter in the gnt-instance
script, for the commands where it makes sense.

Reviewed-by: ultrotter

3fb1e1c5 09/02/2008 03:57 pm Alexander Schreiber

merge r1568 from branches/ganeti/ganeti-1.2

Add more fields to gnt-instance list

Reviewed-by: imsnah

20e23543 09/02/2008 02:46 pm Alexander Schreiber

merge r1542, r1543, r1573 from branches/ganeti/ganeti-1.2

Implement interactive instance OS reinstall.

Reviewed-by: ultrotter

34b6ab97 09/01/2008 07:05 pm Alexander Schreiber

merge r1539 from branches/ganeti/ganeti-1.2

Display VNC console port in gnt-instance info.

Reviewed-by: iustinp

4300c4b6 09/01/2008 02:37 pm Guido Trotter

Pass the force param to SetInstanceParms

It was already allowed in gnt-instance modify, but ignored.
It will be used to force skipping parameter checks.

This is a forward-port from branches/ganeti-1.2

Original-Reviewed-by: imsnah
Reviewed-by: iustinp

ad2023a3 08/29/2008 07:30 pm Alexander Schreiber

Merge r1537 from branches/ganeti/ganeti-1.2

Add HVM device type flags 3/4

Reviewed-by: ultrotter

3fc175f0 08/29/2008 03:47 pm Alexander Schreiber

merge r997 from branches/ganeti/ganeti-1.2

Fix gnt-instance modify for HVM parameters

This patch makes gnt-instance modify work again for the advanced
HVM parameters after it was broken by other changes.

Reviewed-by: ultrotter

1f05af2b 08/06/2008 11:25 am Michael Hanselmann

Use new query RPC call in “gnt-instance list”

Reviewed-by: iustinp

fbe5b278 07/03/2008 03:06 pm Iustin Pop

Remove custom locking code from gnt-instance

The gnt-instance script doesn't run in the same process anymore, so we
can't and don't have to unlock.

Reviewed-by: ultrotter

00fb8246 06/25/2008 11:07 am Michael Hanselmann

Cleanup old DRBD 0.7.x code

Apparently there were still some leftovers. While removing an instance,
I got the message "unhandled exception 'module' object has no attribute
'LD_MD_R1'".

Reviewed-by: iustinp

130a6a6f 06/22/2008 01:57 pm Iustin Pop

Add a ‘tags’ field to instance and node listing

Currently there isn't any easy way to list all nodes or instance and
their tags; you have to query each node in turn, or list all the tags
via something like “gnt-cluster search-tags '.*'”. Of course, this is...

c6e911bc 06/17/2008 09:51 am Iustin Pop

Implement gnt-instance grow-disk

This patch exposes at command line level the grow-disk operation.

Reviewed-by: imsnah

917f91d5 06/01/2008 02:47 am Iustin Pop

Forward-port: Another for gnt-instance modify & HVM parameters

Another tiny fix. Anybody got a nice brown paper bag I can wear?

Author: schreiberal
Reviewed-by: iustinp

a8340917 06/01/2008 02:43 am Iustin Pop

Forward-port: show only parameters relevant to the instance

This patch modifies the code for "gnt-instance info .." to only display
instance parameters that actually apply to that instance, i.e. for PVM
instances no HVM parameters are shown and vice versa....

31a853d2 06/01/2008 02:14 am Iustin Pop

Forward-port: patch 2/4 extended HVM features for 1.2

This patch adds the commandline extensions and the code to store
and display the extended HVM features.

Author: schreiberal
Reviewed-by: iustinp

bdb7d4e8 05/15/2008 05:38 pm Michael Hanselmann

Update command line help and manpages with mandatory options

Reviewed-by: ultrotter

9a033156 05/13/2008 04:04 pm Iustin Pop

Revert "CLI: remove command opts/args in "gnt-X""

This reverts commit 976.

Reviewed-by: ultrotter

57d0151e 05/13/2008 03:24 pm Iustin Pop

CLI: remove command opts/args in "gnt-X"

[Forward-port of the 1.2 branch patch]

This patch removes all the parameters and options from the output
"gnt-X" (i.e. the subcommand list for command). This is done in order to
uniformize the output, currently only some parameters are shown and they...

48c4dfa8 05/05/2008 01:02 pm Iustin Pop

Improve the gnt-* list field selection

This patch allows the '-o' option to the list subcommands to add more
fields to the default list instead of replacing the default list by
prefixing the fields list with '+'.

The patch also moves the listing (in the help output) of the default...

fd38ef95 04/28/2008 03:15 pm Manuel Franceschini

Add check for major/minor in _FormatBlockDevInfo

bdev.FileStorage does not have major or minor fields, so gnt-instance
info for file backed instances fails with a TypeError. This patch
adds checks to prevent that and print 'N/A' instead.

Reviewed-by: imsnah

b6e82a65 04/24/2008 02:13 pm Iustin Pop

Implement replace secondary via the iallocator

This patch implements secondary replace via the iallocator. The new
opcode parameter 'iallocator' behaves like this: if passed, it will
always compute and assign a new secondary, behaving in effect as if the...

35a0d128 04/16/2008 05:07 pm Iustin Pop

A pure whitespace change for style compliance

Reviewed-by: amishchenko

538475ca 04/16/2008 04:57 pm Iustin Pop

IAllocator part 3: LUCreateInstance changes

This (final) patch allows the instance's nodes to be selected
automatically based on the passed allocator algorithm.

The patch changes the pnode opcode parameter from required to optional,
now either the pnode or the iallocator must be passed....

45873083 04/08/2008 07:01 pm Manuel Franceschini

Modify gnt-instance to support file backend

Reviewed-by: ultrotter

99e2be3b 04/01/2008 04:28 pm Guido Trotter

Fix gnt-instance failover help message

The message used to misleadingly say that failover just works with remote_raid1
instances, while of course it works for drbd as well. Since remote_raid1 has
been removed from the main development branch only drbd will be shown. Thanks...

7767bbf5 03/31/2008 03:04 pm Manuel Franceschini

parms->params Refactoring

- Substitute all occurences of name 'parms' with 'params'
- Small codestyle fix

Reviewed-by: ultrotter

5e66b7e6 03/27/2008 05:52 pm Iustin Pop

Fix a bug in interactive confirmation of instances

This oneliner fixes a bug in listing more than twenty instances for
multiple operations (shutdown, startup, etc.).

Reviewed-by: imsnah

51c6e7b5 03/27/2008 04:39 pm Michael Hanselmann

Add --print parameter to “gnt-instance console”

This enables us to run automated tests on “gnt-instance console”, at least
to some degree.

Reviewed-by: iustinp

0a80a26f 03/27/2008 04:39 pm Michael Hanselmann

Return first parameter of console command only once

Reviewed-by: iustinp

f9193417 03/25/2008 06:30 pm Iustin Pop

Remove the option to create md/drbd7 instances

This patch removes the options that allow to create local_raid1 or
remote_raid1 instances. It also modifies the documentation and removes
these disk templates from burnin and from qa.

Reviewed-by: imsnah

249069a1 03/25/2008 06:30 pm Iustin Pop

Remove the add/remove mirror operations

These two operations are related to md/drbd7 code (remote_raid1). Remove
them as part of the md/drbd7 removal.

Reviewed-by: imsnah

457697bc 03/06/2008 06:34 pm Guido Trotter

Fix gnt-instance replace-disks online help

The "quick" online help just reported the option to change secondary node. Add
the ones to just replace the disk locally on-primary or on-secondary. It is of
course impossible to espress in one line everything needed to use this command,...

7c0d6283 03/05/2008 04:39 pm Michael Hanselmann

Codestyle fixes: adding a few empty lines

Reviewed-by: ultrotter

5336d63d 02/28/2008 12:33 pm Alexander Schreiber

Clarify online help for xc-instance reinstall.

Reviewed-by: imsnah

00ce8b29 02/20/2008 01:17 pm Guido Trotter

Add another 1.1->1.2 compatibility alias

gnt-instance replace-disks used to be called replace_disks.

Reviewed-by: iustinp

d8052456 02/14/2008 05:53 pm Iustin Pop

Modify the default output of gnt-instance list

This patch adds a new field available for selection in gnt-instance list
names "status" which represents the combined value of "admin_state" and
"oper_state". Since this is much easier to parse (e.g. gnt-instance list...

f2e9e0e8 01/28/2008 06:22 pm Alexander Schreiber

tiny typo fix

Reviewed-by: iustinp

d8a4b51d 01/28/2008 04:32 pm Iustin Pop

Improve the documentation of query output fields

The gnt-node and gnt-instance list commands have a customizable list of
output fields, but the list is not up to date (in the man page) and not
easily understandable from the ‘--help’ output.

This patch updates the man pages and adds the available fields and...

d6d415e8 01/28/2008 01:51 pm Iustin Pop

Add option for the number of VCPUs in instance listing

Reviewed-by: ultrotter

40cece88 01/27/2008 07:08 pm Iustin Pop

Fix gnt-instance modify breakage due to hvm_boot_order

As reported by , this is missing a check on None. As we don't
care about uppercase, we keep the check simple by removing the lower() call.

Reviewed-by: ultrotter

536fda25 01/21/2008 06:29 pm Guido Trotter

Add a few aliases for startup/shutdown

These aliases are widely used to think of these operations and save some typing
too. Even though there is some thought to make start/stop the default operation
name I don't think this should happen for 1.2, for now adding it as an alias is...

dbfd89dd 01/21/2008 06:28 pm Guido Trotter

Add the first command alias

Alias activate_block_devs to activate-disks, for ganeti 1.1 compatibility.

Reviewed-by: iustinp

8ae6bb54 01/16/2008 06:01 pm Iustin Pop

Show the HVM boot order in instance info

This is a merge from the 1.2 branch

Reviewed-by: imsnah

25c5878d 01/11/2008 02:13 pm Alexander Schreiber

Support selecting the boot device order for HVM.

This patch adds support for specifying and changing the boot device order for
HVM instances. The boot device order specification is ignored for non HVM
instances.

Reviewed-by: iustinp

71aa8f73 01/08/2008 01:03 pm Iustin Pop

Make ‘gnt-instance info’ show kernel/initrd paths

This patch changes the info subcommand to nicely show the kernel and
initrd paths.

Reviewed-by: imsnah

3b6d8c9b 01/08/2008 01:03 pm Iustin Pop

Allow defining the kernel/initrd at creation time

This patch adds support for defining the kernel/initrd at instance
creation time, using the same interface as in instance modify.

Reviewed-by: imsnah

973d7867 01/08/2008 01:03 pm Iustin Pop

Add support for modifying the kernel/initrd path

This patch adds support in ‘gnt-instance modify’ to set the kernel and
initrd paths. The user can pass either 'default' or 'none' (none is not
valid for kernel).

Reviewed-by: imsnah

1862d460 12/27/2007 05:31 pm Alexander Schreiber

Allow instance MAC address to be set.

Allow the MAC address of an instance to be specified optionally during
instance creation and later to be changed via instance modify.

Reviewed-by: iustinp

58acb49d 12/17/2007 04:53 pm Alexander Schreiber

Add instance port support.

Extends the instance object by adding a port item, also adds changes
to print this port via gnt-instance info.

Reviewed-by: iustinp

f4bc1f2c 12/03/2007 04:03 pm Michael Hanselmann

Various code style fixes for strings.

- When line wrapping is needed, move spaces to the next line.
- Remove embedded line breaks from error messages.

Reviewed-by: schreiberal

12c3449a 11/21/2007 06:55 pm Michael Hanselmann

Replace disk template drbd8 with drbd where missing.

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

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

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