Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib / backup.py @ 809a055b

History | View | Annotate | Download (21.9 kB)

# Date Author Comment
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....

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

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

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

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

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

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

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

64981f25 11/26/2013 11:14 am Helga Velroyen

Export and network queries: remove opcodes and LUs

Removes the remains of the export (aka backup) and network
queries.

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

fbeb41e6 11/26/2013 11:13 am Helga Velroyen

Switch to haskell for export (aka backup) queries

This patch removes the python implementation of export
(aka backup) queries. So far, it is replaced by
'NotImplemented' exceptions, but later in this series
it will be replaced completely.

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

a09639d1 11/11/2013 10:29 pm Santi Raffa

Remove hardcoded references to File, SharedFile templates

DTS_FILEBASED is a constant that exists and this commit makes sure
that it is used whenever sensible, rather than resorting to hardcoding
the pair of templates in very many files.

Signed-off-by: Santi Raffa <>...

258de3fe 10/29/2013 03:56 pm Thomas Thrainer

Honor compress parameter in remote backups

Use the specified compression mode not only for local exports, but also
for remote ones.

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

896cc964 10/29/2013 03:56 pm Thomas Thrainer

Add local compression to OpBackupExport

OpBackupExport is extended by a compress parameter. This parameter
(either 'none' or 'gzip') controls if instance disks are compressed
before being sent over the network to the destination node.

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

70b634e6 10/15/2013 02:54 pm Thomas Thrainer

Add unit tests for LUBackupExport

This patch adds unit tests for LUBackupExport.

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

fb2278aa 10/15/2013 02:53 pm Thomas Thrainer

Use node names in LUBackupQuery

The result of LUBackupQuery has to be indexed by node name rather than
by node UUID, otherwise the automatically constructed filter won't
return any results.

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

a57e502a 09/24/2013 09:17 am Thomas Thrainer

Remove physical_id field from disk object

The 'physical_id' field of disk objects is no longer used, so remove it.
Also, all references are removed together with the code which made sure
that the physical_id is up to date when transmitted over RPC.

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

cd3b4ff4 08/28/2013 06:19 pm Helga Velroyen

Replace LD_* constants with DT_* constants

LD_* constants are basically like DT_* constants, except
for that both file and shared file were mapped to file.
In order to not having to maintain three slightly different
sets of disk-related constants (DT, LD and ST), we merge...

da4a52a3 06/20/2013 05:04 pm Thomas Thrainer

Index instances by their UUID

No longer index instances by their name but by their UUID in the cluster
config. This change changes large parts of the code, as the following
adjustments were necessary: * Change the index key to UUID in the configuration and the...

d0d7d7cf 06/13/2013 12:32 pm Thomas Thrainer

Inline simple "alias" variables

Remove variables in the form "var = self.var" throughout all LU's. Those
"alias" variables make it harder to read the code (it's no longer
immediately clear what's a field and what's a local variable), and can
introduce subtle bug (especially when not used consistently and when...

1c3231aa 06/13/2013 12:32 pm Thomas Thrainer

Index nodes by their UUID

No longer index nodes by their name but by their UUID in the cluster
config. This change changes large parts of the code, as the following
adjustments were necessary: * Change the index key to UUID in the configuration and the
ConfigWriter, including all methods....

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

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

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

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