Revision 896cc964
b/lib/cmdlib/backup.py | ||
---|---|---|
421 | 421 |
raise errors.OpExecError("Could not start instance: %s" % msg) |
422 | 422 |
|
423 | 423 |
if self.op.mode == constants.EXPORT_MODE_LOCAL: |
424 |
(fin_resu, dresults) = helper.LocalExport(self.dst_node) |
|
424 |
(fin_resu, dresults) = helper.LocalExport(self.dst_node, |
|
425 |
self.op.compress) |
|
425 | 426 |
elif self.op.mode == constants.EXPORT_MODE_REMOTE: |
426 | 427 |
connect_timeout = constants.RIE_CONNECT_TIMEOUT |
427 | 428 |
timeouts = masterd.instance.ImportExportTimeouts(connect_timeout) |
b/lib/masterd/instance.py | ||
---|---|---|
1218 | 1218 |
else: |
1219 | 1219 |
self._removed_snaps[disk_index] = True |
1220 | 1220 |
|
1221 |
def LocalExport(self, dest_node): |
|
1221 |
def LocalExport(self, dest_node, compress):
|
|
1222 | 1222 |
"""Intra-cluster instance export. |
1223 | 1223 |
|
1224 | 1224 |
@type dest_node: L{objects.Node} |
1225 | 1225 |
@param dest_node: Destination node |
1226 |
@type compress: string |
|
1227 |
@param compress: one of L{constants.IEC_ALL} |
|
1226 | 1228 |
|
1227 | 1229 |
""" |
1228 | 1230 |
instance = self._instance |
... | ... | |
1253 | 1255 |
dresults = TransferInstanceData(self._lu, self._feedback_fn, |
1254 | 1256 |
src_node_uuid, dest_node.uuid, |
1255 | 1257 |
dest_node.secondary_ip, |
1256 |
constants.IEC_NONE,
|
|
1258 |
compress,
|
|
1257 | 1259 |
instance, transfers) |
1258 | 1260 |
|
1259 | 1261 |
assert len(dresults) == len(instance.disks) |
b/src/Ganeti/OpCodes.hs | ||
---|---|---|
777 | 777 |
OpDoc.opBackupExport, |
778 | 778 |
[ pInstanceName |
779 | 779 |
, pInstanceUuid |
780 |
, pBackupCompress |
|
780 | 781 |
, pShutdownTimeout |
781 | 782 |
, pExportTargetNode |
782 | 783 |
, pExportTargetNodeUuid |
b/src/Ganeti/OpParams.hs | ||
---|---|---|
84 | 84 |
, pMoveTargetNode |
85 | 85 |
, pMoveTargetNodeUuid |
86 | 86 |
, pMoveCompress |
87 |
, pBackupCompress |
|
87 | 88 |
, pStartupPaused |
88 | 89 |
, pVerbose |
89 | 90 |
, pDebugSimulateErrors |
... | ... | |
1248 | 1249 |
defaultField [| None |] $ |
1249 | 1250 |
simpleField "compress" [t| ImportExportCompression |] |
1250 | 1251 |
|
1252 |
pBackupCompress :: Field |
|
1253 |
pBackupCompress = |
|
1254 |
withDoc "Compression mode to use for moves during backups" . |
|
1255 |
defaultField [| None |] $ |
|
1256 |
simpleField "compress" [t| ImportExportCompression |] |
|
1257 |
|
|
1251 | 1258 |
pIgnoreDiskSize :: Field |
1252 | 1259 |
pIgnoreDiskSize = |
1253 | 1260 |
withDoc "Whether to ignore recorded disk size" $ |
b/test/hs/Test/Ganeti/OpCodes.hs | ||
---|---|---|
330 | 330 |
OpCodes.OpBackupPrepare <$> genFQDN <*> return Nothing <*> arbitrary |
331 | 331 |
"OP_BACKUP_EXPORT" -> |
332 | 332 |
OpCodes.OpBackupExport <$> genFQDN <*> return Nothing <*> |
333 |
arbitrary <*> arbitrary <*> return Nothing <*> arbitrary <*>
|
|
334 |
arbitrary <*> arbitrary <*> arbitrary <*> genMaybe (pure []) <*>
|
|
335 |
genMaybe genNameNE |
|
333 |
arbitrary <*> arbitrary <*> arbitrary <*> return Nothing <*>
|
|
334 |
arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*>
|
|
335 |
genMaybe (pure []) <*> genMaybe genNameNE
|
|
336 | 336 |
"OP_BACKUP_REMOVE" -> |
337 | 337 |
OpCodes.OpBackupRemove <$> genFQDN <*> return Nothing |
338 | 338 |
"OP_TEST_ALLOCATOR" -> |
Also available in: Unified diff