History | View | Annotate | Download (21.9 kB)
Generalize 'TemporaryDisk' to handle any number of disks
... including different disk templates, accesses, and sizes.
Signed-off-by: Jose A. Lopes <jabolopes@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>
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 instanceinstallations. This patch also transforms this method into a functionand generalizes the error messages....
Filter disallowed compression tools
This patch makes import and export operations fail when anon-whitelisted compression type is used. The whitelisted tools have tobe specified manually via"gnt-cluster modify --custom-compression-tools=<tools>".
Signed-off-by: Hrvoje Ribicic <riba@google.com>...
Lift the Disk objects from the Instances
This patch replaces 'instance.disks' with 'GetInstanceDisks' everywherein the codebase. From now on, the function 'GetInstanceDisks' from theconfig file has to be used in order to get the disks of an instance.Also the functions 'AddInstanceDisk'/'RemoveInstanceDisk' have to be...
Get instance secondary nodes from config
Use 'GetInstanceSecondaryNodes' to get the secondary nodes of aninstance, instead of the 'secondary_nodes'.Annotate 'secondary_nodes' in rpc so that backend has access to it.
Signed-off-by: Ilias Tsitsimpis <iliastsi@grnet.gr>...
Override disks in BuildInstanceHookEnvByObject
The function BuildHooksEnv in LUInstanceRemove, calls the functionBuildInstanceHookEnvByObject which needs to query the config to getthe secondary_nodes/disks of an instance. The function BuildHooksEnvwill be called before and after the Exec function. The second time...
Complete zeroing
This patch will do all that is necessary to allow the helper VM to dowhatever 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 <riba@google.com>Reviewed-by: Jose A. Lopes <jabolopes@google.com>
Add timeout parameters to gnt-backup export
This patch adds the two parameters to gnt-backup export, documentingtheir meanings in the manual file as well.
Add zeroing function shell
This patch moves towards the actual zeroing by providing a functionthat determines the necessary size and creates and destroys a temporarydisk.
Add image size estimation function
To create a temporary disk, it is necessary to know just how big thisdisk must be. This patch adds a function that retrieves thisinformation for both data sources - a URL and a file.
Modify failing assert
The assert stating that the disk did not have to be activated madesense once the instance's disks were never completely deactivated. Withzeroing, the assumption no longer holds true, and should be replaced bya check that the disks of the instance are indeed active....
Lock node if zeroing is used in LUBackupExport
This patch adds a node lock if zeroing is used, preventing anyoperations that might interfere with the amount of available space.
Add the zeroing-image option
This patch adds the zeroing-image option to gnt-cluster and theOpBackupExport params. The many changes are all minor, yet necessary.
Add HV parameter checks
The first version of zeroing requires two things: that theself-initiated shutdown of the instance can be detected, and that theinstance boots from the first disk supplied to it. This patch checksfor these by examining the hypervisor parameters....
Add the zero-free-space option
Although unused for now, add the zero-free-space option to the backupexport opcode, and add a rudimentary check for whether it should beused.
Fix configuration calls for LUBackupExport
Re-read the instance in-memory objects from WConfd after calls thatchange its state.
Signed-off-by: Petr Pudlak <pudlak@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Export and network queries: remove opcodes and LUs
Removes the remains of the export (aka backup) and networkqueries.
Signed-off-by: Helga Velroyen <helgav@google.com>Reviewed-by: Hrvoje Ribicic <riba@google.com>
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 seriesit will be replaced completely.
Signed-off-by: Helga Velroyen <helgav@google.com>...
Remove hardcoded references to File, SharedFile templates
DTS_FILEBASED is a constant that exists and this commit makes surethat it is used whenever sensible, rather than resorting to hardcodingthe pair of templates in very many files.
Signed-off-by: Santi Raffa <rsanti@google.com>...
Honor compress parameter in remote backups
Use the specified compression mode not only for local exports, but alsofor remote ones.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Klaus Aehlig <aehlig@google.com>
Add local compression to OpBackupExport
OpBackupExport is extended by a compress parameter. This parameter(either 'none' or 'gzip') controls if instance disks are compressedbefore being sent over the network to the destination node.
Signed-off-by: Thomas Thrainer <thomasth@google.com>...
Add unit tests for LUBackupExport
This patch adds unit tests for LUBackupExport.
Signed-off-by: Thomas Thrainer <thomasth@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Use node names in LUBackupQuery
The result of LUBackupQuery has to be indexed by node name rather thanby node UUID, otherwise the automatically constructed filter won'treturn any results.
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 surethat the physical_id is up to date when transmitted over RPC.
Replace LD_* constants with DT_* constants
LD_* constants are basically like DT_* constants, exceptfor that both file and shared file were mapped to file.In order to not having to maintain three slightly differentsets of disk-related constants (DT, LD and ST), we merge...
Index instances by their UUID
No longer index instances by their name but by their UUID in the clusterconfig. This change changes large parts of the code, as the followingadjustments were necessary: * Change the index key to UUID in the configuration and the...
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 longerimmediately clear what's a field and what's a local variable), and canintroduce subtle bug (especially when not used consistently and when...
Index nodes by their UUID
No longer index nodes by their name but by their UUID in the clusterconfig. This change changes large parts of the code, as the followingadjustments were necessary: * Change the index key to UUID in the configuration and the ConfigWriter, including all methods....
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 gotactivated explicitly (and in a couple of other cases).It will be used by watcher to re-activate disks after a node reboot....
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 <thomasth@google.com>Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
cmdlib: Extract storage related functionality
Split instance.py further by extracting storage related logical unitsand functions to instance_storage.py.
Extract backup related logical units from cmdlib
All LUBackup* classes are extracted to backup.py.