Statistics
| Branch: | Tag: | Revision:

root / lib / cli.py @ 9c8c69bc

History | View | Annotate | Download (127.1 kB)

# Date Author Comment
9c8c69bc 04/11/2013 11:53 pm Helga Velroyen

Removes obsolete 'enabled storage types'

Since managing of different storage units is now done using
disk templates and not storage types, we remove the obsolete
enabled storage types.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Michele Tartara <>

66af5ec5 04/11/2013 11:52 pm Helga Velroyen

gnt-cluster modify: modify enabled disk templates

Adds setting of the list of enabled disk templates to 'gnt-cluster modify'.
Note that this does not yet include any verification regarding disk templates
currently used by instances.

Signed-off-by: Helga Velroyen <>...

f7f03738 04/04/2013 12:28 pm Bernardo Dal Seno

Remove unused code

After changing the way gnt-xxx info print their output,
cli.FormatParameterDict() is not used anymore.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

d00884a2 04/04/2013 12:27 pm Bernardo Dal Seno

Refactor out function to format instance policy

The new function can be used for group-level instance policies. Support for
roman numeral formatting has been dropped to make the code simpler. For
other info items it's already unsupported, and it's not exactly documented...

3438e1f8 04/02/2013 02:01 pm Klaus Aehlig

Add option --new-primary to gnt-instance modify

Extend gnt-instance modify by a new parameter --new-primary
that sets the pnode paramter of the opcode.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Guido Trotter <>

da5f09ef 03/27/2013 12:46 pm Bernardo Dal Seno

Refactor ispecs in ipolicy structures

Minimum and maximum instance specs are put together into a single element
of the instance policy. This is in preparation for introducing multiple
min/max specs.

Signed-off-by: Bernardo Dal Seno <>...

d948c101 03/27/2013 12:45 pm Bernardo Dal Seno

Refactor cli.CreateIPolicyFromOpts()

The code relative to instance specs has been moved into a different
function. This in preparation for further patches to have a more clear code
structure.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

eeaa5f6c 03/27/2013 12:45 pm Bernardo Dal Seno

Remove duplicate filling of instance policy

Instance policy fields were manually filled in CreateIPolicyFromOpts() and
then filled again by the caller. Now they are filled once inside the
function.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

4d99964c 03/26/2013 01:57 pm Bernardo Dal Seno

Generic function to print data for gnt-xxx info

The function produces a human-readable output, which is also a valid YAML
file, from an intermediate data structure. This will be used by "gnt-xxx
info" commands. The output of "gnt-xxx info" was almost YAML-compliant, and...

c270ee07 03/21/2013 05:41 pm Helga Velroyen

gnt-cluster modify: dis/enabling storage types

This patch extends the 'gnt-cluster modify' command to manipulate the list
of enabled storage types. Note that this currenlty does no validation
with respect to whether or not there are instances currently using a storage...

055d6ac0 02/22/2013 02:09 pm Iustin Pop

Add option to redirect luxi socket for debugging

Currently, the choice between masterd and conf/queryd is made
statically, based on whether a query is converted or not and whether
split queries are enabled. This makes it hard to test and develop
these new queries, so this patch adds an override for the socket....

a59d5fa1 02/19/2013 04:27 pm Michele Tartara

Infrastructure for specifying instance status change reason

This patch introduces some infrastructural modifications that will be used by
the following commits to implement the support for specifying the reason for
the last status change of an instance.
...

5cfa6c37 02/11/2013 05:31 pm Dimitris Aragiorgis

Remove network_type slot (Issue 363)

This slot was not used by Ganeti so the same info can be
provided via tags. In order not to break configuration data
we add a FromDict() method in Network config object that
removes the deprecated network_type (if found) and then invoke...

7f5edc60 02/11/2013 12:28 pm Iustin Pop

Show correct daemon name on Luxi connect errors

Since now confd also serves a Luxi endpoint, the current message in
cli.FormatError is misleading when actually failing to connect to
it. The patch adds a somewhat hackish way to show the right daemon
name....

b954f097 12/22/2012 11:47 am Constantinos Venetsanopoulos

Add the gnt-storage client

Add a new client called 'gnt-storage'.
The client interacts with the ExtStorage interface, similarly to
the way gnt-os interacts with the OS interface.

For now, only two commands are supported: 'info' and 'diagnose'.

'diagnose' calculates the node status of each provider on each node,...

c1912a48 12/21/2012 05:47 pm Michael Hanselmann

gnt-* list-fields: Show friendly field type

For people writing query filters (documented in ganeti(7)) knowing a field's
type can be useful.

$ gnt-instance list-fields name be/memory
Name Type Title Description
name Text Instance Instance name...

b8028dcf 12/19/2012 06:29 pm Michael Hanselmann

Replace frozenset with compat.UniqueFrozenset

This is not a trivial s/frozenset/compat.UniqueFrozenset/, but rather
only replaces “frozenset” where appropriate. Most of the places are
“static” information that doesn't change after the module has been
loaded....

d5b031dc 12/04/2012 07:32 pm Michael Hanselmann

Allow ignoring successful commands in "gnt-cluster command"

In some cases it is useful to ignore the output of and avoid mentioning
successful commands. One would be when looking for a certain string in
a file:

$ gnt-cluster command egrep -q '^testing$' /etc/......
3c286190 11/20/2012 07:51 pm Dimitris Aragiorgis

Fixes to pass pep8 (make lint)

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

8140e24f 11/20/2012 07:51 pm Dimitris Aragiorgis

Add tags in network objects

Support:
- gnt-network add --tags.
- gnt-network list-tags/add-tags/remove-tags/.
- gnt-network list -o +tags

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

9c784fb3 11/20/2012 07:51 pm Dimitris Aragiorgis

Introduce client support for networks

gnt-network is used to manipulate and handle networks that currently
provides the following operations:

  • Add a new network:
    gnt-network add --network=1.2.3.0/28 --gateway=1.2.3.1
    --add-reserved-ips=1.2.3.4,1.2.3.5 testnet...
d4117a72 11/20/2012 07:51 pm Apollon Oikonomopoulos

Modify instance client to support networks

Add --no-conflicts-check option.
Modify instance query methods to return nic's network info.

Signed-off-by: Apollon Oikonomopoulos <>
Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Iustin Pop <>

f92ed8ab 11/15/2012 02:30 pm Michael Hanselmann

Move gnt_cluster.SHOW_MACHINE_OPT to cli

This allows the option to be re-used in other places.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

bcd35e09 11/05/2012 09:50 pm Dato Simó

cli.py: use None as name for tag operations on the cluster

This change is mostly cosmetic. Previously, the literal "cluster" was
used for the 'name' field of tag operations on the cluster (as opposed
to a node or an instance). Since this field has a type of TMaybeString...

552328b8 10/25/2012 03:16 pm Michael Hanselmann

cli: Use callback for --priority

If the option is used elsewhere, the numeric value is directly
available.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

a4b247f0 10/18/2012 01:52 pm Michael Hanselmann

Merge branch 'devel-2.6'

  • devel-2.6:
    ensure-dirs: Don't accept arguments
    ensure-dirs: Fix program name on usage screen
    cli: Fix small typo

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

90efd920 10/17/2012 06:44 pm Michael Hanselmann

cli: Fix small typo

s/it/if/

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Dato Simó <>
Reviewed-by: Helga Velroyen <>

72043dac 10/11/2012 12:56 pm Michael Hanselmann

cli: Stop hardcoding /etc/hosts path

There is a constant for this purpose.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

d971402f 10/02/2012 10:35 pm Michael Hanselmann

cli: Exit with status 0 for --help

This patch is somewhat longer than was anticipated. Before, commands like
“gnt-instance --help” would exit with the status code 1 (failure). With
this patch, those commands exits with 0 (success) while unknown commands
still print the usage screen and exit with status 1....

052783ff 09/28/2012 03:14 pm Michael Hanselmann

Stop hardcoding root user

Some parts of the code still use a hardcoded user name: root. This patch
replaces all with a constant specified at build time. The end goal is to
make it possible to run a Ganeti cluster without any special privileges
(of course this will prevent some functionality from working)....

ee4a14c0 09/18/2012 06:09 pm Michael Hanselmann

Migrate lib/cli.py from constants to pathutils

File system paths moved from constants to pathutils.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

f2374060 08/28/2012 06:02 pm Iustin Pop

Enable tags query over the query socket

This patch adds the tags field to the objects which were missing it
(all except Cluster), implements handling the LuxiCall QueryTags, and
then enables the use of the query socket in cli.ListTags, used by all
commands, and in the RAPI client....

42ab9ac4 08/28/2012 06:00 pm Iustin Pop

Add configure-time switch for split queries

And expand cli.GetClient() to allow opening the query socket, instead
of the main master socket.

Finally, enable the query socket use in gnt-cluster version, since
that is already implemented fully in Queryd.hs/hconfd....

5ae4945a 08/23/2012 02:41 pm Iustin Pop

Bump pep8 version to 1.2

Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:

- bump version in the docs
- silence some new checks that are wrong due to our indent=2 instead of 4
- fix lots of errors in the code where the indentation was wrong by 1...

6f287cf3 08/07/2012 12:48 pm Iustin Pop

Add infrastructure for building numeric namefield filters

Currently, all the CLI helpers in qlang.py and cli.py assume that all
namefields are string, which leads to various breakage in case the're
actually not.

To improve the flexibility of the helpers, we add a bit of...

2cfbc784 08/02/2012 03:46 pm Iustin Pop

Fix uses of OpPrereqError without code info

A while back, we did cleanup the code and ensured (manually) that use
of OpPrereqError includes an errors.ECODE_* field as second
argument. Since we cannot automate the check for this, it turns out
that more and more such usage has crept over the years, including in...

f30d8165 07/05/2012 07:11 pm Iustin Pop

Add --wait-for-sync in gnt-instance

Note that this needs (like for the opcode) a new option, with the
default reverted (False instead of True).

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

a1cef552 05/29/2012 03:48 pm Iustin Pop

Document that the disk/hypervisor state is not used

This didn't get completed in time for 2.6, so we document that it's
not working as is. Well, it's not broken, just not used by anything.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

ef40c537 05/22/2012 02:01 pm René Nussbaumer

_MaybeParseUnit: The elements are dicts not arrays

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

cd415612 05/22/2012 11:25 am René Nussbaumer

Make it possible to reset vcpu/spindle ratio to default

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

ad5cc6bd 05/22/2012 10:56 am René Nussbaumer

cli: Add ipolicy_spindle_ratio to CreateIPolicyFromOpts

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

703fa9ab 05/15/2012 02:38 pm Iustin Pop

Move some ipolicy functions from objects to cli

These are only used in CLI programs to parse command line options and
such they do not belong in object.py (I will change them more and I
don't want to add more code in objects.py).

Signed-off-by: Iustin Pop <>...

d67e0a94 05/15/2012 02:38 pm Iustin Pop

Allow units in ipolicy disk/mem CLI changes

This makes "gnt-cluster modify --specs-mem-size max=16g" work. The
downside (due to how we iterate) is that error messages are not very
clear:

$ gnt-cluster modify --specs-mem-size max=16a
Failure: prerequisites not met for this operation:...
64da5a53 05/11/2012 05:20 pm René Nussbaumer

cli: Make FormatParameterDict recursive

This is useful if you have nested parameter dicts like in diskparams.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>

ef8270dc 04/26/2012 06:41 pm Iustin Pop

Add absolute grow-disk mode at CLI level

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

f037e9d7 04/13/2012 04:20 pm Michael Hanselmann

gnt-job list: Add options for commonly used filters

While “gnt-job list” would also accept filters on the command line (e.g.
“'status == "error"'”, having shortcuts in the form of options comes in
handy.

Signed-off-by: Michael Hanselmann <>...

5ad68a23 04/13/2012 04:19 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5: (29 commits)
    gnt-* {add,list,remove}-tags: Unify options
    Bump version for 2.5.0 final release
    configure.ac: Fix “too many arguments” error
    Fix extra whitespace
    Further fixes concerning drbd port release
    Fix a bug concerning TCP port release...
6bc3ed14 04/12/2012 08:53 pm Michael Hanselmann

gnt-* {add,list,remove}-tags: Unify options

- Listing tags is a query, so neither “--priority” nor “--submit” make
sense
- Support both options for adding/removing tags
- Also remove “--submit” from “gnt-node health”; it doesn't work and
doesn't make sense for listing node health...

03ec545a 03/30/2012 03:02 pm Michael Hanselmann

qlang.MakeFilter: Enable use of different name field

Jobs don't have a “name” field, so we must be able to control
the field used for simple filters.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

26a72a48 03/30/2012 03:02 pm Michael Hanselmann

Merge cli.FormatTimestamp and utils.FormatTime

… to some degree at least. Unittests are included.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

956631b6 02/17/2012 06:54 pm Michael Hanselmann

cli: Handle negative numbers when parsing key-value assignments

To remove the last disk, or to add a NIC to the end, one can use the
index 1. This wouldn't work as intended as “” is a special prefix.

Signed-off-by: Michael Hanselmann <>...

8c0b16f6 01/26/2012 06:33 pm Guido Trotter

cli/opcodes: add a --no-runtime-changes migrate opt

This will be used for now to avoid ballooning memory at live migration time.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

976b78ba 01/26/2012 03:34 pm Iustin Pop

Add ipolicy_vcpu_ratio to command line

This allows changing this value from the command line.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

d04c9d45 01/24/2012 06:39 pm Iustin Pop

Rename ispecs-disk-templates to ipolicy-disk-templates

The ispecs (min/std/max) are different from the other ipolicy
variables (disk templates for now, more in the future). As such, let's
rename the ispecs-disk-templates to ipolicy-disk-templates for
consistency with this logical difference....

e53ea88d 01/23/2012 01:21 pm Michael Hanselmann

Unbreak build after merge 2ea64524ce

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

2ea64524 01/20/2012 07:48 pm Guido Trotter

Merge branch 'devel-2.5'

  • devel-2.5:
    Migrate: don't check for free memory on cleanup
    Revert "cli: Disable abbreviation matching for options"

Conflicts:
lib/cli.py
- trivial
lib/cmdlib.py
- merge new condition

Signed-off-by: Guido Trotter <>...

c1f19851 01/20/2012 07:12 pm Michael Hanselmann

cli: Log fully quoted command line

Instead of logging the concatenated arguments, with this patch every
command will properly quote its full command line. This makes it easier
to just copy-and-paste commands from “commands.log” to re-run them. Also
remove a case of “x = a or b” for non-boolean values....

bf5338b3 01/19/2012 06:43 pm Michael Hanselmann

Revert "cli: Disable abbreviation matching for options"

This reverts commit 232aab3f4f602a19f1226e85c3a3ecb245d60af4. We
shouldn't change the parsing of command line options in the middle of
the 2.5.x series.

Signed-off-by: Michael Hanselmann <>...

59d81cb3 01/19/2012 03:14 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5:
    Fix wrong option names in QA and cluster-merge
    Bump version to 2.5.0~rc5, update NEWS
    Add UnescapeAndSplit unittest for multi-escapes
    Fix a bug in command line option parsing code
    cli: Disable abbreviation matching for options...
232aab3f 01/18/2012 08:42 pm Michael Hanselmann

cli: Disable abbreviation matching for options

Python's “optparse” module does option name prefix matching by default.
Since this can lead to confusing behaviour, e.g. by specifying “--force”
for a command which only has a “--force-multi” option, this patch...

2c0af7da 01/18/2012 06:03 pm Guido Trotter

gnt-instance modify -m|--runtime-memory

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

0ce212e5 01/13/2012 03:16 pm Iustin Pop

Move the instance specs options to cli.py

Currently these are defined twice, instead of a single time in
cli.py. Also adds the new disk_templates option to the common block,
even though it's not yet used.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

12c3d3f6 01/13/2012 03:16 pm Iustin Pop

Add a new disk-template ipolicy option

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

499eb088 01/13/2012 03:16 pm Iustin Pop

Add a new CLI option type 'list'

This simply splits the value in the option parser, instead of needing
to do it in the client code.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

10889e0c 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding instance policy to add

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

b6aaf437 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding instance policy to failover

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

519fafa1 12/20/2011 12:07 pm Andrea Spadaccini

Fix parameters for QueryJob in JobExecutor

When gnt-job submit is used with the --each option, it sends as
parameters for QueryJobs a list of lists, each containing a job ID.
While this works now, it is not the intended format for QueryJobs.

This patch fixes this behavior, by making it send a list of job IDs....

32017174 12/08/2011 07:23 pm Agata Murawska

Instance policy command line support

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>

38f29a36 12/08/2011 10:48 am René Nussbaumer

cli: Add common command flags for hv/disk state

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

bc5d0215 12/01/2011 01:03 pm Andrea Spadaccini

Add basic support for disk parameters

objects.py: * add disk parameters to Disk, Cluster, NodeGroup.

constants.py: * add dictionaries that will hold types and default values for disk
parameters (for now, empty).

test/ganeti.constants_unittest.py:...

b2e233a5 11/22/2011 07:55 pm Guido Trotter

Remove BE_MEMORY from beparams but keep compatibility

Queries are already compatible (be/memory is an alias for be/maxmem) and
import/exports work. This patch patch fixes it for cluster init, modify
and instance add/start/modify.

Signed-off-by: Guido Trotter <>...

57de31c0 11/16/2011 03:15 pm Agata Murawska

Transition into and out of offline instance state

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>

bf689b7a 11/14/2011 05:18 pm Andrea Spadaccini

Add --use-external-mip-script flag

- add a command line flag to gnt-cluster init and modify to change the
value of the cluster parameter use_external_mip_script;
- add two constants representing the paths of the default script and of
the external script;...

ef9fa5b9 11/02/2011 05:28 pm René Nussbaumer

Make it possible to pass in flags using ENV variables

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

0aee8ee9 10/18/2011 05:21 pm Guido Trotter

Revert "Implementation of TLS-protected SPICE connections"

This reverts commit b6267745ede04b3c943bc02e004bdb9347e0f564.
This commit will be readded on master.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

727274dd 10/12/2011 02:36 pm Iustin Pop

Tiny optimisation related to filter parsing

Currently, we get a luxi Client, then parse the filter, then execute
the query. If parsing the filter fails, we connected to the masterd
needlessly.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

2e5c33db 10/12/2011 02:01 pm Iustin Pop

Rename filter and filter_ to qfilter

We currently use 'filter' as the OpCode, QueryRequest and RAPI field
name for representing a query filter. However, since 'filter' is a
built-in function, we actually have to use filter_ throughout the code
in order to not override the built-in function....

93f2399e 10/05/2011 03:17 pm Andrea Spadaccini

Add --ignore-errors parameter to cluster verify

lib/cli.py
- add IGNORE_ERROR_OPT;

client/gnt_cluster.py
- pass the ignore_errors parameter to the opcodes

lib/opcode.py
- update OpClusterVerifyConfig, OpClusterVerify and OpClusterVerifyGroup
to accept the ignore_errors parameter...

5a8648eb 10/05/2011 12:05 pm Andrea Spadaccini

Add cluster netmask parameter

Add the master_netmask cluster parameter, that represents the netmask of
the master IP, encoded as a CIDR suffix.

This parameter can be set via the --master-netmask of gnt-cluster init
and gnt-cluster modify. The default behaviour is to be consistent with...

a080bab8 10/04/2011 09:32 pm Andrea Spadaccini

Merge branch 'stable-2.5' into devel-2.5

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: René Nussbaumer <>

11705e3d 09/30/2011 06:47 pm Iustin Pop

Optimise cli.JobExecutor with many pending jobs

In the case we submit many pending jobs (> 100) to the masterd, the
JobExecutor 'spams' the master daemon with status requests for the
status of all the jobs, even though in the end it will only choose a
single job for polling....

b6267745 09/20/2011 05:04 pm Andrea Spadaccini

Implementation of TLS-protected SPICE connections

Added support for TLS-protected SPICE connections:

client/gnt_cluster.py, cli.py:
  • added three new parameters to renew-crypto (--new-spice-certificate,
    --spice-certificate, --spice-ca-certificate) and their validation....
b459a848 08/30/2011 11:24 am Andrea Spadaccini

DeprecationWarning fixes for pylint

In version 0.21, pylint unified all the disable-* (and enable-*)
directives to disable (resp. enable). This leads to a lot of
DeprecationWarning being emitted even if one uses the recommended
version of pylint (0.21.1, as stated in devnotes.rst)....

e687ec01 08/25/2011 01:53 pm Michael Hanselmann

PEP8 style fixes

Identified using the “pep8” utility.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

f8638e28 08/08/2011 06:42 pm Michael Hanselmann

Detect globbing patterns as query arguments

Short: this patch enables the use of “gnt-instance list '*.site'”.

Detailed description: This patch changes the command line interface code
to try to deduce the kind of filter from the arguments to a “list”
command. If it's a list of plain names an old-style name filter is used....

16e0b9c9 08/04/2011 01:28 pm Michael Hanselmann

ganeti-watcher: Split for node groups

This patch brings a huge change to ganeti-watcher to make it aware of
node groups. Each node group is processed in its own subprocess,
reducing the impact of long-running operations.

The global watcher state file, $datadir/ganeti/watcher.data, is replaced...

21ee2318 07/29/2011 04:04 pm Michael Hanselmann

cli: Add constant for node group option

ganeti-watcher will use this constant to pass the option to itself for
processing all node groups.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

4474f112 07/28/2011 11:19 am Iustin Pop

Revert "cli.JobExecutor: Feedback function for info output"

This reverts commit 7421df8e5f2cf31022085b332d1300640ba5854b.

The feedback_fn argument to JobExecutor is used for PollJob, and thus
has a fixed signature: a single arg, tuple of (timestamp, log type,...

7421df8e 07/26/2011 01:53 pm Michael Hanselmann

cli.JobExecutor: Feedback function for info output

This will be used in the watcher where we don't want to
pollute stdout unless in debug mode.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

a3ac3243 07/26/2011 11:31 am Iustin Pop

Add another name for the --yes-do-it option

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

d0c8c01d 07/25/2011 04:55 pm Iustin Pop

Most boring patch ever

s/'/"/ in (hopefully) the right places.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

47099cd1 07/21/2011 02:20 pm Michael Hanselmann

Rename *_STATUS_WAITLOCK to …_WAITING

This patch renames the {JOB,OP}_STATUS_WAITLOCK constants to {JOB,OP}_STATUS_WAITING, as per design document for chained jobs.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

f6eb380d 07/21/2011 12:39 pm Michael Hanselmann

gnt-group: Add command to evacuate whole group

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

05484a24 07/12/2011 06:23 pm Michael Hanselmann

cli.GetOnlineNodes: Support node group filter, use query2

This patc changes cli.GetOnlineNodes to use query2, which does the
filtering in the master daemon, and adds a new parameter to filter by
node group.

Unittests were added for the old implementation and then adopted to...

323f9095 07/08/2011 03:15 pm Stephen Shirley

Add gnt-instance start --pause

Creates the instance, but pauses execution before booting. This combined
with 'gnt-instance console' unpausing instances means that the entire
boot process can be viewed and monitored.

Signed-off-by: Stephen Shirley <>...

aafee533 07/06/2011 12:31 am Michael Hanselmann

Change “gnt-node evacuate” to use new opcode

By default it'll now evacuate all instances from the node, not
just secondaries.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

0f8810df 06/07/2011 03:31 pm Michael Hanselmann

Fix issue with tags on instance creation

Commit 720f56c85a added the ability to specify tags when creating an
instance. The “tags” attribute of an instance object needs to be a set,
but the patch's code saved it as a list, causing breakage in other parts...

a57981c5 06/01/2011 08:24 pm Apollon Oikonomopoulos

Add tagging option to gnt-instance create

Add TAG_ADD_OPT option to cli.py and use it in gnt-instance. Modify
cli.GenericInstanceCreate() accordingly.

Signed-off-by: Apollon Oikonomopoulos <>
Signed-off-by: Iustin Pop <>...

8d99a8bf 05/25/2011 06:50 pm Michael Hanselmann

cli.JobExecutor: Handle empty name, allow adding job IDs

With LU-generated jobs only the ID is known.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

60452edf 05/25/2011 06:50 pm Michael Hanselmann

cli.JobExecutor: Use counter for indexing jobs

If “SubmitPending” were mixed with calls to “QueueJob”, jobs in the
internal structures will get duplicate indices. With this change each
queued job is assigned a unique index, which will be used for sorting...