Commit 84234ff6 authored by Klaus Aehlig's avatar Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

* stable-2.10
  Exclude archived jobs from configuration backup
  Expose early_release for ReplaceInstanceDisks
Signed-off-by: default avatarKlaus Aehlig <>
Reviewed-by: default avatarHelga Velroyen <>
parents ec0e3203 4d2b50f7
......@@ -1881,7 +1881,8 @@ def _UpgradeBeforeConfigurationChange(versionstring):
ToStdout("Backing up configuration as %s" % backuptar)
if not _RunCommandAndReport(["mkdir", "-p", pathutils.BACKUP_DIR]):
return (False, rollback)
if not _RunCommandAndReport(["tar", "cf", backuptar,
if not _RunCommandAndReport(["tar", "-cf", backuptar,
return (False, rollback)
......@@ -1216,7 +1216,8 @@ class GanetiRapiClient(object): # pylint: disable=R0904
(GANETI_RAPI_VERSION, instance)), query, None)
def ReplaceInstanceDisks(self, instance, disks=None, mode=REPLACE_DISK_AUTO,
remote_node=None, iallocator=None, reason=None):
remote_node=None, iallocator=None, reason=None,
"""Replaces disks on an instance.
@type instance: str
......@@ -1233,6 +1234,8 @@ class GanetiRapiClient(object): # pylint: disable=R0904
replace_auto mode)
@type reason: string
@param reason: the reason for executing this operation
@type early_release: bool
@param early_release: whether to release locks as soon as possible
@rtype: string
@return: job id
......@@ -1251,6 +1254,8 @@ class GanetiRapiClient(object): # pylint: disable=R0904
_AppendIf(query, remote_node is not None, ("remote_node", remote_node))
_AppendIf(query, iallocator is not None, ("iallocator", iallocator))
_AppendReason(query, reason)
_AppendIf(query, early_release is not None,
("early_release", early_release))
return self._SendRequest(HTTP_POST,
("/%s/instances/%s/replace-disks" %
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment