Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib @ 0f68f7fa

# Date Author Comment
0f68f7fa 02/20/2014 04:45 pm Dimitris Aragiorgis

Export and import Disk/NIC name

Name of Disk/NIC were not exported during backup until now.
Use the exported info during gnt-backup import.

Signed-off-by: Dimitris Aragiorgis <>
Signed-off-by: Michele Tartara <>
Reviewed-by: Michele Tartara <>

0973f9ed 02/20/2014 04:45 pm Dimitris Aragiorgis

Fix backup import in case NIC is inside a network

Network UUID is written in .ini file during backup export
but is not used by _ReadExportParams(). This patch fixes it.

Please note that in case a network is given, link and mode should
not be included in NIC options....

054a9d17 01/20/2014 02:11 pm Hrvoje Ribicic

Add correct locking of master node to gnt-debug delay

The gnt-debug delay command required locks for all nodes except the
master - this patch fixes the issue by adding master to the locks
whenever needed.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Klaus Aehlig <>

36ccc662 12/16/2013 05:31 pm Hrvoje Ribicic

Make network tags searchable

This patch adds the network tags to the tags searched by gnt-cluster
search-tags, and in the process cleans up the code slightly.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Michele Tartara <>

e228ab9c 12/11/2013 01:27 pm Dimitris Aragiorgis

Support reseting arbitrary params of ext disks

If param=default and the param already exists then we remove
it from params dict. This is stolen by GetUpdatedParams() which
is used for hvparams modification/inheritance.

This means that 'default' value is not accepted for an arbitrary...

c5c72215 12/11/2013 01:27 pm Dimitris Aragiorgis

Allow modification of arbitrary params for ext

Disks of ext template are allowed to have arbitrary parameters
stored in the Disk object's params slot. Those parameters can be
passed during creation of a new disk, either in LUInstanceCreate()
or in LUInsanceSetParams(). Still those parameters can not be...

a63985f3 12/09/2013 02:51 pm Dimitris Aragiorgis

SetDiskID() before accepting an instance

SetDiskID() fills physical_id slot of a Disk object.

LUInstanceSetParams() does not invoke SetDiskID() upon creation of a
new disk. As a result the physical_id slot of the Disk object in
config data is missing.

In case of ext disk template, in AcceptInstance() we invoke...

8b9887c5 12/09/2013 01:59 pm Petr Pudlak

Lock group(s) when creating instances

This is required to prevent race conditions such as removing a network
from a group and adding an instance at the same time. (See issue 621#2.)

Signed-off-by: Petr Pudlak <>
Reviewed-by: Thomas Thrainer <>...

77b0d264 12/05/2013 11:39 am Michele Tartara

Add default file_driver if missing

If the file driver of an instance with file based storage is not specified, the
default one is automatically added by the UpgradeConfig function.

Fixes Issue 571.

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

4eef428e 12/02/2013 12:03 pm Dimitris Aragiorgis

Fix a bug in InstanceSetParams concerning names

In case no name is passed in disk modifications we should
keep the old one. If name=none then set disk name to None.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Jose A. Lopes <>

4289f617 11/27/2013 02:44 pm Thomas Thrainer

Fix NODE/NODE_RES locking in LUInstanceCreate

Both NODE and NODE_RES locks were acquired opportunistically if so
requested by the user. LUInstanceCreate requires, however, that the
actually locked elements on NODE and NODE_RES level are the same.

This patch changes the locking of NODE_RES such that those locks are not...

34ea8da3 11/04/2013 05:30 pm Michele Tartara

Improve error message for replace-disks

In some conditions, replace-disks will fail if the disks are not properly
activated. Improve the error message suggesting to run activate-disks before
executing replace-disks.

Fixes Issue 606.

Signed-off-by: Michele Tartara <>...

ff34fb97 09/16/2013 02:25 pm Michele Tartara

Add a default to file-driver when unspecified over RAPI

The file-driver value, used by file-based instances, had a default value when
an instance was being created over the CLI, but not when the instance was
created through the RAPI.

This patch introduces a default value for the remote API and, while doing so,...

125e1230 08/20/2013 03:18 pm Thomas Thrainer

Allow instance mods if only osparams are given

osparams are now recognized as changes, so changing only those without
other changes works too now.

(cherry picked from commit 5eae613c2e1e65101c5d5f7d2e8ffd7cc6edc7d5)

Signed-off-by: Thomas Thrainer <>...

0c072225 08/07/2013 02:29 pm Thomas Thrainer

Merge branch 'stable-2.7' into stable-2.8

  • stable-2.7
    Fix documentation of gnt-instance batch-create
    Support multi instance allocs without iallocator
    Document --no-conflicts-check for gnt-network
    Check disk template in right dict when copying
    ganeti.backend_unittest: chmod restricted cmd dir...
026f444f 08/06/2013 04:32 pm Thomas Thrainer

Include VCS version in `gnt-cluster version`

Also print the VCS version in the output of `gnt-cluster version`. This
makes the VCS version also available over RAPI, etc.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

a5b9e2f2 08/01/2013 06:30 pm Thomas Thrainer

Check for luxid permission during verify config

confd no longer needs access to the noded certificate file, but luxid
does. Change the check to use the right user.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Michele Tartara <>

f06af3ca 08/01/2013 09:16 am Thomas Thrainer

Check disk template in right dict when copying

Due to the structure of the code this condition can't possibly be true.
We have to look in the new_diskparams dict instead, otherwise it'd be
possible to try to update a non-existing entry.

(The same patch is in stable-2.7 as 106441d already)....

aa7a5c90 07/30/2013 04:12 pm Michele Tartara

Add cleanup parameter to instance failover

Most of the code is shared with instance migrate, so we actually only need
to add the parameter and pass its value along the the common code.

Also, tests and harep are updated to support the right set of options to...

75f2ff7d 07/15/2013 12:10 pm Michele Tartara

Allow modify_etc_hosts to be changed

The modify_etc_hosts options, enabling the cluster to modify the /etc/hosts
files of nodes, and to keep them in sync, could only be set at cluster init
time.

With this commit it can now be changed through modify_etc_hosts as well....

69ac3b74 07/09/2013 07:41 pm Michele Tartara

Cluster verify checks server.pem permissions

Currently, ConfD must be able to access server.pem (though this is likely to
change in the future). If this is not true, all sorts of weird things happen,
such as "gnt-node list" printing lots of question marks instead of actual...

fe782deb 06/24/2013 03:41 pm Helga Velroyen

gnt-cluster info (py): add enabled disk templates

This fixes issue 485. In the python implementation of
the cluster config info, the enabled_disk_templates
were missing.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Guido Trotter <>

f2b58d93 06/21/2013 06:09 pm Thomas Thrainer

Merge branch 'stable-2.7' into stable-2.8

  • stable-2.7:
    Add a warning about the restriction of gnt-node evacuate
    Fix permissions of the queue archive dir
    Fix daemon QA tests
    grow disk: call SetDiskID before blockdev_getsize
    Catch DeviceCreationError unhandled exceptions...
e5c92cfb 06/04/2013 09:06 pm Klaus Aehlig

Add a force option to the ClusterSetParams Opcode

If set, the op code will, in particular, try to set the master IP
on the new netdev, even if shutting down the master IP on the old
netdev failed.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Michele Tartara <>

8a348b15 06/04/2013 12:59 pm Christos Stavrakakis

Export device UUIDs to hooks and OS scripts

Export UUIDs and names of instance NICs and disks to the environment
of OS scripts and instance related hooks.

Signed-off-by: Christos Stavrakakis <>
Signed-off-by: Klaus Aehlig <>...

1d4a4b26 05/28/2013 04:05 pm Thomas Thrainer

Add disks_active to configuration

This flag tracks if the disks of an instace are supposed to be active.
That's the case when an instance is running or when its disks got
activated explicitly (and in a couple of other cases).
It will be used by watcher to re-activate disks after a node reboot....

328201a5 05/24/2013 02:26 pm Guido Trotter

Merge branch 'stable-2.7' into stable-2.8

  • stable-2.7:
    Bump up version for 2.7.0~rc2 release
    Add NEWS entry for SO_PEERCRED fix
    Workaround missing SO_PEERCRED
    Add debugging clause to _ExpandCheckDisks error
    Mention hail network incompatibility in manpages...
a365b47f 05/17/2013 03:04 pm Bernardo Dal Seno

Merge branch 'stable-2.7' into stable-2.8

  • stable-2.7:
    Update NEWS with disk creation fixes
    Don't fail to deactivate master IP if already down
    Add QA for recreating single instance disks
    Add QA for gnt-instance modify --disk
    Clean up when "gnt-instance modify" fails to create a disk...
5eacbcae 05/17/2013 12:32 pm Thomas Thrainer

cmdlib: Cleanup public/private functions

All functions/classes which are used outside of their defining module
(with tests as an exception) no longer have a leading underscore.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

8aa8f6b1 05/17/2013 12:32 pm Thomas Thrainer

cmdlib: Extract instance query related functionality

Split instance.py further by extracting instance querying related
logical units and functions to instance_query.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

13f6af81 05/17/2013 12:32 pm Thomas Thrainer

cmdlib: Extract instance operation functionality

Split instance.py further by extracting instance operations
(start/stop/reboot/etc.) related logical units and functions to
instance_operation.py.

The extracted operations have in common that they affect the operating...

87e25be1 05/17/2013 12:32 pm Thomas Thrainer

cmdlib: Extract migration related functionality

Split instance.py further by extracting migration related logical units
and functions to instance_migration.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

763ad5be 05/17/2013 12:32 pm Thomas Thrainer

cmdlib: Extract storage related functionality

Split instance.py further by extracting storage related logical units
and functions to instance_storage.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

8701dfb0 05/17/2013 12:32 pm Thomas Thrainer

Reformat and define exports in cmdlib/__init__.py

cmdlib/__init__.py now simply defines the interface of the cmdlib module
by importing all classes which should be visible to clients.

Also don't ignore C0302 (Too many lines in module) any more.

Signed-off-by: Thomas Thrainer <>...

814386b7 05/17/2013 12:32 pm Thomas Thrainer

Extract miscellaneous logical units from cmdlib

All remaining classes in init.py are extracted to misc.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

1be6b00e 05/17/2013 12:32 pm Thomas Thrainer

Extract os related logical units from cmdlib

All LUOs* classes are extracted to operating_system.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

ec3cc4a8 05/17/2013 12:32 pm Thomas Thrainer

Extract query related logical units from cmdlib

All LUQuery* classes are extracted to query.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

7ecd5e87 05/17/2013 12:32 pm Thomas Thrainer

Extract backup related logical units from cmdlib

All LUBackup* classes are extracted to backup.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

22b7f6f8 05/17/2013 12:31 pm Thomas Thrainer

Extract instance related logical units from cmdlib

All LUInstance* classes are extracted to instance.py. Common functions
are moved to common.py if used by non-instance logical units as well.
Additionally, helper functions which are only used by LUBackup* and...

31b836b8 05/17/2013 12:31 pm Thomas Thrainer

Extract node related logical units from cmdlib

All LUNode* classes are extracted to node.py. Common functions are moved
to common.py if used by non-node logical units as well.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

f380d53c 05/17/2013 12:31 pm Thomas Thrainer

Extract group related logial units from cmdlib

All LUGroup* classes are moved to group.py. Common functions are
extracted to common.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

7352d33b 05/17/2013 12:31 pm Thomas Thrainer

Extract cluster related logical units from cmdlib

All LUCluster* classes are extracted to cluster.py. Shared functions are
extracted to common.py, helper functions only used by LUCluster* are
extracted to cluster.py.

Signed-off-by: Thomas Thrainer <>...

1d870e0d 05/17/2013 12:31 pm Thomas Thrainer

Extract test logical units from cmdlib

LUTest* are moved to test.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

37dc17e3 05/17/2013 12:31 pm Thomas Thrainer

Extract network related logical units from cmdlib

LUNetwork* and associated helper functions are extracted to network.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

fb3891d0 05/17/2013 12:31 pm Thomas Thrainer

Extract tags related logical units from cmdlib

LUTags* and their base class, TagsLU, are extracted to tags.py. An
additional shared function, _ShareAll, is extracted to common.py for
shared usage.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

1a732a74 05/17/2013 12:31 pm Thomas Thrainer

Extract base classes from cmdlib

Base classes holding common functionality is extracted into base.py.
Utility functions used by both base classes and subclasses is moved to
common.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

1da489e2 05/13/2013 10:56 am Guido Trotter

Move cmdlib.py to cmdlib/__init__.py

cmdlib.py has grown really too much. Move it into its own package to
allow splitting it further.

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