Statistics
| Branch: | Tag: | Revision:

root / scripts / gnt-backup @ cc5b94db

History | View | Annotate | Download (4.6 kB)

# Date Author Comment
e588764d 04/12/2010 04:57 pm Iustin Pop

Add a identify-defaults options for import

When importing an instance, all the saved valued will be used as
explicitly specified values, overriding the cluster defaults. This means
export+import will change the status (from default to explicitly
specified) of parameters....

400ca2f7 02/11/2010 01:49 pm Iustin Pop

Update scripts to pass 'opts' to SubmitOpCode

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

30e4e741 01/04/2010 11:20 am Iustin Pop

Fix unused imports or add silences where needed

In some cases pylint doesn't parse the import correctly, so we add
silences; but there are also many cases of unused imports, which we
simply remove.

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

2d54e29c 01/04/2010 11:17 am Iustin Pop

Further pylint disables, mostly for Unused args

Many of our functions have to follow a given API, and thus we have to
keep a given signature, but pylint doesn't understand this. Therefore,
we silence this warning.

The patch does a few other cleanups.

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

f4ad2ef0 01/04/2010 11:15 am Iustin Pop

Remove more unused variables

This removes unused variables in the rest of the code (outside lib/).

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

7260cfbe 01/04/2010 11:15 am Iustin Pop

Add targeted pylint disables

This patch should have only:

- pylint disables
- docstring changes
- whitespace changes

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

460d22be 12/16/2009 11:54 am Iustin Pop

Command line/RAPI support for --no-name-check

This patch adds --no-name-check to gnt-instance add and gnt-backup
import. This is opposite to the opcode parameter (name_check) as it is
similar to ip_check and start.

It also adds it to RAPI and gnt-instance batch-create as a parameter in...

4d98c565 10/13/2009 04:02 pm Guido Trotter

gnt-* use the correct opcode slot to build opcodes

gnt-* scripts were building wrong opcodes for commands which had the
shutdown_timeout slot (due to missing testing after renaming). Fixing.

Also change SHUTDOWN_TIMEOUT_OPT dest field name to "shutdown_timeout":...

17c3f802 10/13/2009 01:24 pm Guido Trotter

Add timeout options to other LUs

All the LUs that shut down the instance need to be able too pass the
timeout parameter as well.

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

d77490c5 09/18/2009 05:00 pm Iustin Pop

Unify the instance creation code

Currently the AddInstance in gnt-instance and ImportInstance in
gnt-backup duplicate all of their code except the actual opcode creation
(the parameters to it). By moving this to cli.py (not optimal location,
but we don't have another one), we can use a single copy of the code,...

44c44832 09/18/2009 01:53 pm Iustin Pop

Move the “--no-shutdown” option to cli.py

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

6ea815cf 09/18/2009 01:53 pm Iustin Pop

Change indentation style in commands definitions

Currently, the indentation level for a command's definition depends on
the command name length, and this makes the commands dict unpleasant to
the eye. This patch changes it so that a new line begins right after the...

064c21f8 09/18/2009 01:53 pm Iustin Pop

Remove explicit DEBUG_OPT and add it by default

Since >90% of the commands take the “--debug” option, and all should
actually take it (the gnt-job command is currently missing it), it makes
sense to simply remove this and add it by default in cli.py.

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

df62e5db 09/18/2009 01:53 pm Iustin Pop

Move the “--src-…” options to cli.py

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

91e0748c 09/18/2009 01:53 pm Iustin Pop

Unify the “--no-ip-check” option

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

7d3a9fab 09/18/2009 01:53 pm Iustin Pop

Unify the “--net” option

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

e3876ccb 09/18/2009 01:53 pm Iustin Pop

Unify the “--disk” (identkeyval) option

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

ff00c1a7 09/18/2009 01:53 pm Iustin Pop

Unify the “--os-size” option

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

990b7886 09/18/2009 01:53 pm Iustin Pop

Unify the “--node” (as instance placement) option

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

7edc4637 09/18/2009 01:53 pm Iustin Pop

Unify the “--node” (as list of nodes) option

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

f36d7d81 09/18/2009 01:53 pm Iustin Pop

Unify the last “--node” (single node) option

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

4f365444 09/18/2009 01:53 pm Iustin Pop

Unify the “--disk-template” option

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

26023ecd 09/18/2009 01:53 pm Iustin Pop

Unify the “--no-nics” option

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

4a25828c 09/18/2009 01:53 pm Iustin Pop

Unify the “--file-storage-dir” option

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

0f87c43e 09/18/2009 01:53 pm Iustin Pop

Unify the “--file-driver” option

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

4eb62659 09/18/2009 01:53 pm Iustin Pop

Unify the “--iallocator” option

This patch also changes the gnt-debug's “--algorithm” into
IALLOCATOR_OPT, since it was the only non-standard use of this (due to
historical reasons). Since it's just a debug option,
backwards-compatibility is not critical here....

087ed2ed 09/18/2009 01:53 pm Iustin Pop

Unify the “--backend-parameters” option

This is not straight-forward. First, gnt-cluster had
“--backend-parameters” wheres the rest of the script had just
“--backend”. I settled on the full form, since one can always abbreviate
options, but not vice-versa....

236fd9c4 09/18/2009 01:53 pm Iustin Pop

Unify the “--hypervisor” (with name) option

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

3f75b4f3 09/18/2009 01:53 pm Iustin Pop

Unify the “--no-wait-for-sync” option

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

2d3ed64b 09/04/2009 06:58 pm Michael Hanselmann

Add bash completion for --node node1[:node2]

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

a52ba89d 08/28/2009 06:24 pm Michael Hanselmann

Add more bash completion metadata for options

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

4a265c08 08/24/2009 06:01 pm Michael Hanselmann

Re-introduce constants for most often used arguments

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

224b89fa 08/24/2009 04:53 pm Michael Hanselmann

Add more auto-completion metadata

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

c38c44ad 08/24/2009 04:53 pm Michael Hanselmann

Make all options use cli_option

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

a8005e17 08/24/2009 04:52 pm Michael Hanselmann

Change scripts to use new argument definitions

This can be used to generate the bash completion script automatically.
In the future it may allow for better command line validation as well.

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

552c8dff 08/18/2009 11:54 am Michael Hanselmann

cli: Merge ikv_option and keyval_option into cli_option

Merging them gets rid of two public functions in cli.py and optparse explicitly
supports more than one option type per class.

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

b142ef15 08/13/2009 02:41 pm Iustin Pop

Merge commit 'origin/next' into branch-2.1

  • commit 'origin/next': (28 commits)
    Fix a typo in InitCluster
    Ignore results from drained nodes in iallocator
    Ship the ethers hook
    Ethers hook, compatibility with old lockfile
    Remove a few unused imports from noded/masterd...
084f05a5 08/05/2009 02:19 pm Iustin Pop

export: add meaningful exit code

Currently ‘gnt-backup export’ always returns exit code zero, even in the
face of complete failure during backup (only failure to stop/start the
instance will cause job failure and thus non-zero exit code). This is
bad, since one cannot script the backup....

dc922da0 08/04/2009 04:27 pm Iustin Pop

Fix instance import net option

This is identical to dc30b0e4 but applied to gnt-backup. Thanks to user
ocaner for catching it.

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

8b46606c 06/29/2009 05:26 pm Guido Trotter

check_ident_key_val, handle no_ and - prefixes

If an ident member of an IdentKeyVal relationship starts with no_ or -,
handle it the same way we do for a key. Some unittests are added to
check that check_ident_key_val behaves as expected.

This patch also changes ForceDictType to, for now, fail on such an...

77921a95 04/06/2009 11:21 am Iustin Pop

Disable synchronous (locking) queries

This patch raises an error in the master daemon in case the user
requests a locking query; accordingly, all clients were modified to send
only lockless queries. This is short-term fix, for proper fix the
clients should be modified to submit a job when the user request a...

c0e4a2c3 02/13/2009 05:34 pm Iustin Pop

Implement the backward-compatible ‘-s’ disk option

This patch adds back to the instance creation command (gnt-instace add,
gnt-backup import) the ‘-s’ short form option for specifying a
single-disk instance.

Also a small bug in gnt-backup import is fixed....

a5728081 02/10/2009 05:06 pm Guido Trotter

Instance parameters: force typing

We want all the hv/be parameters to have a known type, rather than a
random mix of empty string, boolean values, and None, so we declare the
type of each variable and we enforce/convert it.

- Add some new constants for enforceable value types...

ec79568d 02/04/2009 12:30 pm Iustin Pop

Implement lockless query operations

This patch adds the framework for, and enables lockless OpQueryInstances. This
means that instances will be shown in ERROR_up or ERROR_down state, even though
this is not an error (but just an in-progress job).

The framework is implemented as follows:...

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

021f5d6f 12/02/2008 12:19 pm Guido Trotter

Update gnt-backup online help

--src-node and --src-dir are not mandatory anymore

Reviewed-by: iustinp

50a707fa 11/27/2008 05:13 am Iustin Pop

instance import: adapt to multi-disk/nic world

This is mostly a copy from gnt-instance add; import works, but it's not
optimal - device count/parametrs should be able to be reused.

Reviewed-by: ultrotter

48de3413 10/28/2008 01:19 am Iustin Pop

Documentation updates for gnt-backup

Reviewed-by: imsnah

d70b3058 10/28/2008 01:19 am Iustin Pop

Change exit code of gnt-backup list

Currently gnt-backup list exits with the same error code even if can't
contact som nodes for backup information.

The patch changes it to return 1 instead in this case.

Reviewed-by: imsnah

3c8886a9 10/20/2008 04:43 pm Guido Trotter

Add mac option to gnt-backup import

Before 'auto' was the only allowed possibility

Forward-port-of: r1885, Reviewed-by: iustinp

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

b03efa30 10/14/2008 07:34 pm Guido Trotter

gnt-backup: update for cluster parameters

- add backend and hypervisor parameters
- fix beparams validation/passing
- pass hypervisor and hvparams
- remove deprecated flags

Reviewed-by: iustinp

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

e1d2aa39 09/02/2008 07:23 pm Alexander Schreiber

merge r1569 from branches/ganeti/ganeti-1.2

Implement more options for gnt-backup import

Reviewed-by: ultrotter

8bb66978 08/08/2008 02:29 pm Michael Hanselmann

Use new query function for exports in gnt-backup

Reviewed-by: iustinp

726a7f7f 07/14/2008 06:43 pm Iustin Pop

Fix a syntax error in gnt-backup

I broke gnt-backup in rev 1035, sorry :(

Reviewed-by: imsnah

abdf0113 05/30/2008 01:55 pm Iustin Pop

Complete removal of md/drbd 0.7 code

This patch removes the last of the md and drbd 0.7 code. Cluster which
have the old device types will be broken if they have this applied.

Reviewed-by: imsnah

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

93cb65c5 04/28/2008 06:24 pm Manuel Franceschini

Add file backend storage options to ImportInstance

This patch adds the file storage options to gnt-backup import which
would otherwise fail since the values of file_storage_dir and
file_driver are accessed in LUCreateInstance.

Reviewed-by: ultrotter

9ac99fda 04/23/2008 05:51 pm Guido Trotter

Add gnt-backup remove functionality

This patch also fixes the LUExportInstance Prereq docstring.

Reviewed-by: iustinp

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

b5401f2f 03/31/2008 04:12 pm Iustin Pop

Change the gnt-backup export help text

Reviewed-by: ultrotter

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

Codestyle fixes: adding a few empty lines

Reviewed-by: ultrotter

1fb101fe 01/30/2008 01:14 pm Guido Trotter

Fix online help for gnt-backup import

The help string missed drbd as a disk template option. Adding it.

Reviewed-by: iustinp

461f0538 01/21/2008 06:17 pm Guido Trotter

Check that we have a valid export list

Before iterating over the list of exports present on a node, check that what
ganeti returned is actually a list. This solves the case when one of the nodes
is down, and an error value is returned.

This fixes issue 21...

147af04d 01/16/2008 06:01 pm Iustin Pop

Two small style fixes

This is a merge from the 1.2 branch

Reviewed-by: imsnah

c19dfc03 01/14/2008 02:22 pm Guido Trotter

Add mac="auto" at import time

Mac is now a mandatory option for OpCreateInstance. Add it when we call this
opcode at import time too. This is a quick fix for the code, but probably more
work needs to be done to integrate mac addresses with the import/export...

d5687e89 01/10/2008 01:41 pm Guido Trotter

Fix gnt-backup import -s option

Update gnt-backup import to be in line with gnt-instance add about the os disk
size option. Thanks to Gunnar Wagenknecht for spotting the issue.

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

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

Remove --secondary-node option.

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

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

Pass required ip_check parameter to OpCreateInstance in gnt-backup.

Reviewed-by: ultrotter

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

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

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

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

Add the gnt-backup script and man-pages.

Reviewed-by: imsnah