Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib @ 809a055b

# Date Author Comment
809a055b 05/21/2014 11:51 am Klaus Aehlig

Initialize self.needed_locks

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Helga Velroyen <>

247837c3 05/20/2014 06:49 pm Klaus Aehlig

Merge branch 'stable-2.11' into stable-2.12

  • stable-2.11
    Add missing import
    Fix INicParams to include inicNetwork
    Improve KVM userspace access documentation
  • stable-2.10
    Add --no-locks option to gnt-debug dela
    Include design-performance-tests.rst in index...
a4f462bd 05/20/2014 05:40 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Add --no-locks option to gnt-debug delay
    Include design-performance-tests.rst in index
    Document the --force-failover option
    Support group evacuation by failover
    Add an option --force-failover...
aa112e9f 05/20/2014 01:59 pm Thomas Thrainer

Add --no-locks option to gnt-debug delay

Add the possibility to don't acquire locks during `gnt-debug delay`.
This allows to run many delay jobs in parallel instead of having
them run sequentially.

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

cbe82289 05/20/2014 12:53 pm Petr Pudlak

Flush the configuration before cluster verify

For this expose the flushing operation in Python ConfigWriter.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

d0cd1368 05/19/2014 01:53 pm Klaus Aehlig

Support group evacuation by failover

Support evacuating a node group not using migration.
This can be useful if the group evacuated to has different
hardware.

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

c812ab71 05/16/2014 12:18 pm Klaus Aehlig

Support sequential evacuation

Make gnt-group evacuate support the --sequential option,
which causes all evacuation moves to be execuated sequentially.
This can be used to avoid congestion on a possibly slow link
between the node groups.

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

c055e8dc 05/14/2014 12:17 pm Jose A. Lopes

Refactor instance create to accommodate unsafe OS scripts

This patch gives just the code structure. Implementation will follow.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

97fe2ecc 05/14/2014 12:17 pm Jose A. Lopes

Helper method to run OS scripts in a virtualized environment

This method temporarily changes the instance's disk to contain the
helper VM's boot disk and the target disk for the OS installation.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

168c7cc6 05/14/2014 12:17 pm Jose A. Lopes

Helper method to handle the OS install package

This helper method either picks up the package passed through the OS
parameters or creates a new package and updates the instance's OS
parameters. This allows users to add their own OS install package.

Signed-off-by: Jose A. Lopes <>...

eb4d938e 05/14/2014 12:17 pm Jose A. Lopes

Extract code that runs OS scripts to a separate method

... to make it simpler to introduced the install helper VM.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

b8dd2853 05/14/2014 12:17 pm Jose A. Lopes

Generalize 'TemporaryDisk' to handle any number of disks

... including different disk templates, accesses, and sizes.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

38519f22 05/14/2014 12:17 pm Jose A. Lopes

Move 'DetermineImageSize' to 'ganeti.cmdlib.common'

Move 'DetermineImageSize' from 'ganeti.cmdlib.backup' to
'ganeti.cmdlib.common' so it can be used by disk zeroing and instance
installations. This patch also transforms this method into a function
and generalizes the error messages....

a44114c9 05/14/2014 12:17 pm Jose A. Lopes

Add trusted/untrusted create scripts

  • Extend 'backend.DiagnoseRPC' to stat 'create_untrusted', which
    indicates the OS is untrusted.
  • Extend queries to include the 'trusted' field, which is calculated
    from the whether the OS contains a 'create_untrusted' script....
f5410303 05/14/2014 12:17 pm Jose A. Lopes

Add timeouts for OS install helper VM

Add timeout parameters to client, opcodes, LU, etc. The startup
timeout is similar to that one used in zeroing, but the shutdown
timeout is different because it is a single timeout that includes the
time needed to install plus shutdown....

1fbe43de 05/14/2014 12:17 pm Jose A. Lopes

Add 'install_image' to bootstrap, CLI, opcodes, and queries

  • Add 'install_image' to 'bootstrap.InitCluster' and cluster client
  • Add '--install-image' flag to 'gnt-cluster init'
  • Add '--install-image' flag to 'gnt-cluster modify'
  • Add param 'install_image' to 'OpClusterSetParams'...
3277b56a 05/14/2014 12:16 pm Jose A. Lopes

Fix 'IsInstanceRunning' to handle empty 'instance_info'

Instance info might return an empty dictionary in case the instance
does not exist. Fix 'IsInstanceRunning' to handle that fact.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

ac2f0fb4 05/14/2014 12:16 pm Jose A. Lopes

Fix var reference from 'instance' instead of 'lu.instance'

... given that 'lu.instance' does not exist in all LUs.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

0ce9b7b6 05/14/2014 12:16 pm Jose A. Lopes

Fix exception message to be consistent with others

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

047f59ce 05/13/2014 11:36 am Hrvoje Ribicic

Filter disallowed compression tools

This patch makes import and export operations fail when a
non-whitelisted compression type is used. The whitelisted tools have to
be specified manually via
"gnt-cluster modify --custom-compression-tools=<tools>".

Signed-off-by: Hrvoje Ribicic <>...

fe71113e 05/13/2014 11:36 am Hrvoje Ribicic

Add the compression tools parameter

This patch makes the myriad of changes necessary for the compression
tool parameter to be added. The filtering of compression tools for
suspicious entries has been added for this exact purpose.

Signed-off-by: Hrvoje Ribicic <>...

3648dad3 05/09/2014 03:05 pm Klaus Aehlig

Merge branch 'stable-2.11' into stable-2.12

  • stable-2.11
    Add hsqueeze to NEWS
    kvm: use a dedicated QMP socket for kvmd
    Add design-node-security.rst to docinput
  • stable-2.10
    Test parallel instance ops and plain instances
    Test parallel creation of DRBD instances...
866e1f76 05/09/2014 02:01 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Test parallel instance ops and plain instances
    Test parallel creation of DRBD instances
    Test parallel job submission performance
    Test parallel instance query operations
    Test parallel instance operations...
00828204 05/09/2014 12:08 pm Klaus Aehlig

Clean up remove_locks

Locks are now identified by their name, and no longer
a resource in the master daemon. In particular, there is
no more need for explicitly removing the locks; freeing
them is enough.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

d33d00ba 05/09/2014 09:27 am Thomas Thrainer

Fail in replace-disks if attaching disks fails

Previously, if attaching the new secondary during a replace-disks
operations failed, only a warning was emitted. The subsequent sync-disks
operation cannot finish in such a case, however.

Therefore, this patch changes the warning into an error. This way it's...

43b1f49f 05/05/2014 02:22 pm Ilias Tsitsimpis

Lift the Disk objects from the Instances

This patch replaces 'instance.disks' with 'GetInstanceDisks' everywhere
in the codebase. From now on, the function 'GetInstanceDisks' from the
config file has to be used in order to get the disks of an instance.
Also the functions 'AddInstanceDisk'/'RemoveInstanceDisk' have to be...

bca90008 05/05/2014 02:22 pm Ilias Tsitsimpis

Add 'instance_disks' parameter to 'CreateDisks'

Modify 'CreateDisks' function to accept the disks of an instance as an
extra parameter. Since the instance may not have been saved to the
config file yet, 'CreateDisks' can not query the config file for the...

5555dc25 05/05/2014 02:22 pm Ilias Tsitsimpis

Fix a 'map' application in ImageDisks

In the first branch of 'if' the 'disks' variable is of type
'list of tuples' whereas in the second branch ('else') it is
of type 'list of disk objects'. Fix the second one to agree
with the first.

Signed-off-by: Ilias Tsitsimpis <>...

e3e1804b 05/05/2014 02:22 pm Ilias Tsitsimpis

Get MapLVsByNode from config

Use 'GetInstanceLVsByNode' from config file instead of Instance's
MapLVsByNode method.

Also remove all_lvs computation from config's 'AddInstance' method. In
order to compute the lvs we have to use the 'GetInstanceLVsByNode'...

921fd285 05/05/2014 02:22 pm Ilias Tsitsimpis

Get instance's nodes from config

Use 'GetInstanceNodes' to get the nodes of an instance, instead of the
'all_nodes' Instance property.

Signed-off-by: Ilias Tsitsimpis <>
Reviewed-by: Jose A. Lopes <>

45c044f4 05/05/2014 02:22 pm Ilias Tsitsimpis

Get instance secondary nodes from config

Use 'GetInstanceSecondaryNodes' to get the secondary nodes of an
instance, instead of the 'secondary_nodes'.
Annotate 'secondary_nodes' in rpc so that backend has access to it.

Signed-off-by: Ilias Tsitsimpis <>...

e8dd6643 05/05/2014 02:22 pm Ilias Tsitsimpis

Override disks in BuildInstanceHookEnvByObject

The function BuildHooksEnv in LUInstanceRemove, calls the function
BuildInstanceHookEnvByObject which needs to query the config to get
the secondary_nodes/disks of an instance. The function BuildHooksEnv
will be called before and after the Exec function. The second time...

f437a5f8 04/28/2014 11:17 am Petr Pudlak

Fix the order of configuration calls

Since _SetDrbdHelper calls methods on self.cfg, it's necessary to update
the configuration before it is called.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Helga Velroyen <>
Reviewed-by: Hrvoje Ribicic <>

d6f38e24 04/25/2014 06:38 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    Make GlusterFS tests dual-stack-aware
    Moving release date of 2.11.0 to 25th of April
    Revision bump for 2.11.0
    Prepare NEWS file for release of 2.11.0
    Fix Xen instance state
  • stable-2.10
    Fix failed DRBD disk creation cleanup...
5d863fad 04/25/2014 06:01 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Fix failed DRBD disk creation cleanup
    Fix lint errors introduced during cherry-pick
    Hooking up verification for shared file storage
    Fix --shared-file-storage-dir option of gnt-cluster modify...
462d6658 04/25/2014 12:04 pm Hrvoje Ribicic

Fix failed DRBD disk creation cleanup

When creating a DRBD disk, Ganeti reserves minor numbers on a per-node
basis. In case of a failed disk creation, these reservations should be
released. During the name/uuid refactoring, the invocation of the
function that releases the minors was not updated, resulting in no...

8c7864ba 04/22/2014 04:54 pm Helga Velroyen

Hooking up verification for shared file storage

As for the cluster modify, it was also forgotten to
hook up the verification of the shared file storage
paths despite all infrastructure was done already.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Klaus Aehlig <>

c02767f0 04/22/2014 04:54 pm Helga Velroyen

Fix --shared-file-storage-dir option of gnt-cluster modify

While all infrastructure to make shared-file storage
runtime-configurable was already submitted, the actual
setting of the path was forgotten. This patch fixes it.

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

dd6514c9 04/10/2014 04:03 pm Hrvoje Ribicic

Merge branch 'stable-2.11' into master

  • stable-2.11
    (no changes)
  • stable-2.10
    Revision bump for 2.10.3
    Update NEWS file for 2.10.3
    Warn in UPGRADE about not tar'ing exported insts
    Fix non-running test and remove custom_nicparams rename
    Acccount for NODE_RES lock in opportunistic locking...
7ddbfbaa 04/10/2014 02:57 pm Hrvoje Ribicic

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Revision bump for 2.10.3
    Update NEWS file for 2.10.3
    Warn in UPGRADE about not tar'ing exported insts
    Fix non-running test and remove custom_nicparams rename
    Acccount for NODE_RES lock in opportunistic locking...
d1482ea2 04/09/2014 08:51 pm Petr Pudlak

Add missing save/re-read cluster configuration

.. in LUClusterSetParams. Since _SetFileStorageDir updates the 'cluster'
variable directly, we need to re-read it and then save later (the other
calls use the configuration directly).

Signed-off-by: Petr Pudlak <>...

f7b0366c 04/08/2014 03:35 pm Hrvoje Ribicic

Complete zeroing

This patch will do all that is necessary to allow the helper VM to do
whatever it will do with the zeroing image in place - which is,
hopefully, to zero out the disks of the instance.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Jose A. Lopes <>

a81e84ff 04/08/2014 03:34 pm Hrvoje Ribicic

Add timeout parameters to gnt-backup export

This patch adds the two parameters to gnt-backup export, documenting
their meanings in the manual file as well.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Jose A. Lopes <>

03d56d40 04/08/2014 03:34 pm Hrvoje Ribicic

Add zeroing function shell

This patch moves towards the actual zeroing by providing a function
that determines the necessary size and creates and destroys a temporary
disk.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Jose A. Lopes <>

69683c7d 04/08/2014 03:34 pm Hrvoje Ribicic

Add image size estimation function

To create a temporary disk, it is necessary to know just how big this
disk must be. This patch adds a function that retrieves this
information for both data sources - a URL and a file.

Signed-off-by: Hrvoje Ribicic <>...

b1b4b282 04/08/2014 03:34 pm Hrvoje Ribicic

Modify failing assert

The assert stating that the disk did not have to be activated made
sense once the instance's disks were never completely deactivated. With
zeroing, the assumption no longer holds true, and should be replaced by
a check that the disks of the instance are indeed active....

b5e61bfd 04/08/2014 03:34 pm Hrvoje Ribicic

Introduce class for temporary disk creation

The instance zeroing requires that a virtual appliance capable of
performing it is used, and short of provisioning another VM, the best
Ganeti can do is reuse the virtualization environment of the instance.
To do this, a disk is needed to host the OS performing the zeroing, and...

4986c93b 04/08/2014 03:34 pm Hrvoje Ribicic

Factor out and alter the instance running check

Examining whether an instance is running is useful outside the instance
state check, especially as the check relies on the admin_state recorded
within the configuration, which the code treats as the desired rather...

d6e1e696 04/08/2014 03:34 pm Hrvoje Ribicic

Lock node if zeroing is used in LUBackupExport

This patch adds a node lock if zeroing is used, preventing any
operations that might interfere with the amount of available space.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Jose A. Lopes <>

0894ac48 04/08/2014 03:34 pm Hrvoje Ribicic

Add the zeroing-image option

This patch adds the zeroing-image option to gnt-cluster and the
OpBackupExport params. The many changes are all minor, yet necessary.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Jose A. Lopes <>

84ac8b54 04/08/2014 03:34 pm Hrvoje Ribicic

Factor out image validity check

The image validity check has been implemented as a part of the OS
installs, yet it could be useful for the zeroing image as well. This
patch factors the utility out.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Jose A. Lopes <>

8cd365d9 04/08/2014 03:34 pm Hrvoje Ribicic

Add HV parameter checks

The first version of zeroing requires two things: that the
self-initiated shutdown of the instance can be detected, and that the
instance boots from the first disk supplied to it. This patch checks
for these by examining the hypervisor parameters....

363f43eb 04/08/2014 03:34 pm Hrvoje Ribicic

Add the zero-free-space option

Although unused for now, add the zero-free-space option to the backup
export opcode, and add a rudimentary check for whether it should be
used.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Jose A. Lopes <>

a278ef7f 04/08/2014 03:31 pm Hrvoje Ribicic

Account for NODE_RES lock in opportunistic locking

This patch extends the opportunistic locking to take both the
NODE_RES and NODE locks into account when selecting nodes to be used
by the iallocator.

Signed-off-by: Gerard Oskamp <>
Reviewed-by: Hrvoje Ribicic <>

c1b512ca 04/08/2014 02:24 pm Thomas Thrainer

Fix request flooding of noded during disk sync

If a user manually pauses the DRBD sync, Ganeti started to poll the node
daemon without any waiting between request. This caused heavy load on
the node. This patch fixes this by waiting at least 5 secondes between...

246fa7d4 04/07/2014 02:37 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    (no changes)
  • stable-2.10
    KVM: use running HVPs to calc blockdev options
    KVM: reserve a PCI slot for the SCSI controller
    Check for LVM-based verification results only when enabled
    Fix "existing" typos...
c1cbe302 04/07/2014 12:34 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    KVM: use running HVPs to calc blockdev options
    KVM: reserve a PCI slot for the SCSI controller
    Check for LVM-based verification results only when enabled
    Fix "existing" typos
    Fix output of gnt-instance info after migration...
8c58dc45 04/02/2014 02:22 pm Jose A. Lopes

Update metadata on create, import, reinstall, modify

Note that create and import are the same LU, therefore, there are a
total of 3 calls, not 4.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

0ef72034 04/02/2014 02:22 pm Jose A. Lopes

Add helper function to modify metadata

This function is responsible for transforming the instance into a dict
and optionally overriding the OS parameters (public, private, secret).
Also, in case of failure it issues a warning.

Signed-off-by: Jose A. Lopes <>...

a4bbd52a 04/01/2014 12:22 pm Helga Velroyen

Check for LVM-based verification results only when enabled

This patch fixes a little glitch in 'gnt-cluster verify'.
If LVM-based storage was disabled, it would still check
LVM-related verification results and print a confusing
error message.

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

715a89c2 04/01/2014 12:18 pm Thomas Thrainer

Fix output of gnt-instance info after migration

After migrating a DRBD based instance, the output of gnt-instance info
was wrong wrt. DRBD minors. This patch fixes the output in such cases.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Hrvoje Ribicic <>

f6004843 03/31/2014 02:59 pm Petr Pudlak

Acquire config lock for RPC calls that check consistency

Since LUClusterVerifyGroup issues 3 RPC calls to get information from
nodes, and during every of these calls, the configuration can be
modified by somebody else, it's necessary to acquire a shared lock on...

c28d15f7 03/27/2014 04:43 pm Petr Pudlak

Fix configuration calls for LUBackupExport

Re-read the instance in-memory objects from WConfd after calls that
change its state.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

5a20e569 03/27/2014 04:43 pm Petr Pudlak

Fix configuration calls for LUInstanceRename

Re-read the instance in-memory objects from WConfd after calls
that change its state.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

48b37308 03/27/2014 04:43 pm Petr Pudlak

Fix configuration calls for LUInstanceReboot

Re-read the instance in-memory objects from WConfd after calls that
change its state.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

08390b40 03/27/2014 04:43 pm Petr Pudlak

Fix configuration calls for LUInstanceReinstall

Re-read the instance in-memory objects from WConfd after calls that
change its state.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

3a5c2c0e 03/27/2014 04:43 pm Petr Pudlak

Fix configuration calls for LUInstanceShutdown

Re-read the instance in-memory objects from WConfd after calls that
change its state.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

cb3ac71c 03/27/2014 04:43 pm Petr Pudlak

Fix configuration calls for LUInstanceStartup

Re-read the instance in-memory objects from WConfd after calls that
change its state.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

d9adac23 03/27/2014 04:43 pm Petr Pudlak

Instance storage: Mark functions that modify instances

.. in the configuration with comments.

Also re-read an instance object where needed.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

89179c36 03/27/2014 04:39 pm Petr Pudlak

Fix calls to Update in TLMigrateInstance

Instead of modifying the primary node on an object and calling 'Update',
a new method was added to ConfigWriter.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

3f3b6e7d 03/27/2014 04:39 pm Petr Pudlak

Fix calls to Update in LUNodeSetParams

Add calls to Update after modifying the node's configuration and move
some of the modifications so that they don't conflict with other calls
to ConfigWriter.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

66223061 03/27/2014 04:39 pm Petr Pudlak

Fix calls to Update in LUInstanceSetParams

In particular, move the call to Update so that it doesn't conflict with
calls to ConfigWriter methods that change the configuration state.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

4c04ae43 03/27/2014 04:39 pm Petr Pudlak

Fix calls to Update in LUClusterSetParams

Since this LU intersperses calls ConfigWriter methods with modifying
objects directly, it's necessary to call 'Update' and/or re-read them at
appropriate places.

Also a new ConfigWriter method is created for modifying the instance...

f47b32a8 03/27/2014 04:39 pm Petr Pudlak

Make configuration per job/thread

Previously there was one shared configuration object for all jobs,
threads and other tasks. This patch creates separate ConfigWrite
instances for distinct jobs/threads.

All exported methods of ConfigWriter are now wrapped in calls that...

e1374a9e 03/27/2014 04:39 pm Petr Pudlak

Use explicit configuration for nodes in GanetiContext

This way, each call to AddNode or RemoveNode uses a passed configuration
object that belongs to the appropriate job.

This is required to subsequently get rid of the single shared
ConfigWriter object....

f0c7c333 03/21/2014 05:19 pm Petr Pudlak

Move utility functions for candidate certs. to ConfigWriter

In particular AddNodeToCandidateCerts and RemoveNodeFromCandidateCerts.

Calling 'cfg.Update(cluster)' causes problems in WConfd, as
it doesn't operate on a shared configuration object any more....

7f37f0ca 03/21/2014 12:22 pm Dimitris Bliablias

Show OS variant information in gnt-os info

Currently, the non-standard/modified per-OS hypervisor parameters, or
OS specific parameters can be listed only by the 'gnt-cluster info'
command, which is a non-standard place to show them. Extend the
'gnt-os info' command to display the available/supported OS variants...

83fc0ab6 03/20/2014 04:56 pm Jose A. Lopes

Skip rename when OS scripts are absent

When an instance does not have OS scripts because, for example, it
uses an OS image, do not rename the instance after an import.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

3473fb81 03/20/2014 04:56 pm Jose A. Lopes

Use raw disks in import/export when OS scripts are absent

When an instance does not have OS scripts because, for example, it has
an OS image, then the import/export should not try to run the OS
scripts. Instead, it should use raw import/export.

Signed-off-by: Jose A. Lopes <>...

6ea039ef 03/18/2014 01:52 pm Petr Pudlak

Add a thread ID to the WConfd client id

This allows to distinguish threads that don't have a job id, which is
needed for answering queries.

Since Python thread IDs aren't guaranteed to be unique, in future it'd
be preferable to use a different, unique identifier....

a3a19a06 03/17/2014 04:07 pm Jose A. Lopes

Remove unused functions to check OS variants

... as this is now performed on the node.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Petr Pudlak <>

703f9a66 03/17/2014 04:07 pm Jose A. Lopes

Remove calls to 'CheckNodeHasOS'

... because 'CheckOSParams' already checks the OS variant.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Petr Pudlak <>

ff030c75 03/17/2014 04:07 pm Jose A. Lopes

Add 'force_variant' to RPC 'os_validate'

Move function 'CheckOSVariant' to the node and add parameter
'force_variant' to RPC 'os_validate', thus making the node verify the
OS variant together with the rest of the OS params.

Signed-off-by: Jose A. Lopes <>...

3360026f 03/14/2014 04:03 pm Jose A. Lopes

Remove SSH copyfile from LU and assume the file exists

According to Ganeti design, files should not be copied from master to
nodes and instead they are assumed to exist and it is the user's
responsibility to assure that the file does exist.

Signed-off-by: Jose A. Lopes <>...

d46dbe0a 03/14/2014 04:03 pm Jose A. Lopes

Fix OS image detection on master

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

87ed6b79 03/13/2014 02:49 pm Klaus Aehlig

Make mcpu acquire WConfD locks

So far, the mcpu acquires locks that live in memory
of masterd. This design does not fit with our jobs-as-processes
goal. So make mcpu acquire the corresponding locks in WConfD
instead.

Note that this implies changes in various other files that call...

83f54caa 03/11/2014 05:09 pm Jose A. Lopes

Instance reinstall with OS images

This patch allows instances to be reinstalled using OS images:
  • extract OS scripts installation to a separate method
  • add a new method to handle OS image installation
  • refactor 'LUInstanceReinstall.Exec'

Signed-off-by: Jose A. Lopes <>...

1c4910f7 03/11/2014 05:09 pm Jose A. Lopes

OS images in 'LUInstanceCreate' and OS scripts optional

  • Use the empty string in 'ganeti.objects.Instance.os' to signify that
    the instance does not use OS scripts.
  • Make several calls related to OS scripts first test whether OS
    scripts are being used....
2329ffdd 03/11/2014 05:09 pm Jose A. Lopes

Instance create with OS image

Extend 'LUInstanceCreate' to image the instance's first disk if an OS
image is specified via the OS params. If the OS image is a file, it
will be copied to the node via SSH. If ths OS image is a URL, it will
be passed directly to the node, which will then download the file....

7bc4d6ac 03/11/2014 05:09 pm Jose A. Lopes

Function to check if the OS image parameter is valid

Add helper function to check if the OS image parameter contained in
the OS parameters of an opcode is valid.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

0247d20f 03/11/2014 05:09 pm Jose A. Lopes

Function to image disks while ensuring that disks are paused

  • Add 'ImageDisks' that actually calls the 'blockdev_image' RPC in a
    context where disk sync is paused.
  • Add 'ImageOrCleanupDisks' which is just a wrapper around the
    previous function that cleans up if an exception occurs....
987ec378 03/11/2014 05:09 pm Jose A. Lopes

Function to remove instance if disks are degraded

  • Extract code, into '_RemoveDegradedDisks', that checks if the disks
    of an instance are degraded and, if so, remove the instance.
  • Add a nice comment

Signed-off-by: Jose A. Lopes <>...

3cf06dd4 03/11/2014 05:09 pm Jose A. Lopes

Fix docstrings

Fix several docstrings.

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

8436d0da 03/07/2014 08:54 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    (no changes)
  • stable-2.10
    Revision bump for the 2.10.1 release
    Update NEWS file for 2.10.1
    Use node UUIDs for executing LU hook
    Add PreparePostHookNodes to LUs
    Fix error propagation in post-commit hooks...
205d3309 03/07/2014 08:33 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Revision bump for the 2.10.1 release
    Update NEWS file for 2.10.1
    Use node UUIDs for executing LU hook
    Add PreparePostHookNodes to LUs
    Fix error propagation in post-commit hooks
  • stable-2.9...
9dc47292 03/05/2014 11:21 am Hrvoje Ribicic

Make gnt-debug delay interruptible

The gnt-debug delay command could be useful as a means of acquiring
locks for testing purposes. In practice, to be useful it should be
interruptible, otherwise we risk race conditions or long delays.

This patch follows the examples of the move-instance command and the...

c346d0ac 03/05/2014 11:21 am Hrvoje Ribicic

Factor Unix domain socket creation into helper class

As the delay class will also have to start using domain sockets,
extract the functionality into a helper class.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

8631b46b 03/05/2014 11:21 am Hrvoje Ribicic

Handle incorrect duration more elegantly

The previous version of the LUTestDelay opcode relied on the utility
function complaining about the negative duration. As this function has
been removed for now, do the check ourselves, and issue a more
appropriate exception....

36870aa1 03/05/2014 11:21 am Hrvoje Ribicic

Make gnt-debug delay command run in parallel

The gnt-debug delay command executes the delay first on the master, and
only then on all the other nodes, causing a significant delay. This
patch makes the command treat the master as it would all other nodes....

ec3a7362 03/05/2014 10:58 am Jose A. Lopes

Remove duplicated '_CheckOSVariant'

It seems '_CheckOSVariant' was moved from 'ganeti.cmdlib.instance' to
'ganeti.cmdlib.instance_utils' but the source was never deleted. This
patch deletes the source copy if this function.

Signed-off-by: Jose A. Lopes <>...