Commit fda1a35b authored by Petr Pudlak's avatar Petr Pudlak
Browse files

Merge branch 'stable-2.10' into stable-2.11



* stable-2.10
  Relax expectation of accuracy
  Improve rounding accuracty in updateStatistics
  Update gnt-backup manual to reflect real behavior
  Finalize local export only if successful

* stable-2.9
  Stop MonD when removing a node from a cluster

Conflicts:
	lib/backend.py - stop both daemons (Mond and KVMd)
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parents a16abe14 cdb0a458
......@@ -566,6 +566,7 @@ def LeaveCluster(modify_ssh_setup):
logging.exception("Error while removing cluster secrets")
utils.StopDaemon(constants.CONFD)
utils.StopDaemon(constants.MOND)
utils.StopDaemon(constants.KVMD)
# Raise a custom exception (handled in ganeti-noded)
......
......@@ -1269,14 +1269,22 @@ class ExportInstanceHelper(object):
assert len(dresults) == len(instance.disks)
self._feedback_fn("Finalizing export on %s" % dest_node.name)
result = self._lu.rpc.call_finalize_export(dest_node.uuid, instance,
self._snap_disks)
msg = result.fail_msg
fin_resu = not msg
if msg:
self._lu.LogWarning("Could not finalize export for instance %s"
" on node %s: %s", instance.name, dest_node.name, msg)
# Finalize only if all the disks have been exported successfully
if all(dresults):
self._feedback_fn("Finalizing export on %s" % dest_node.name)
result = self._lu.rpc.call_finalize_export(dest_node.uuid, instance,
self._snap_disks)
msg = result.fail_msg
fin_resu = not msg
if msg:
self._lu.LogWarning("Could not finalize export for instance %s"
" on node %s: %s", instance.name, dest_node.name,
msg)
else:
fin_resu = False
self._lu.LogWarning("Some disk exports have failed; there may be "
"leftover data for instance %s on node %s",
instance.name, dest_node.name)
return (fin_resu, dresults)
......
......@@ -52,13 +52,12 @@ The ``--remove`` option can be used to remove the instance after it
was exported. This is useful to make one last backup before
removing the instance.
The exit code of the command is 0 if all disks were backed up
successfully, 1 if no data was backed up or if the configuration
export failed, and 2 if just some of the disks failed to backup.
The exact details of the failures will be shown during the command
execution (and will be stored in the job log). It is recommended
that for any non-zero exit code, the backup is considered invalid,
and retried.
Should the snapshotting or transfer of any of the instance disks
fail, the backup will not complete and any previous backups will be
preserved. The exact details of the failures will be shown during the
command execution (and will be stored in the job log). It is
recommended that for any non-zero exit code, the backup is considered
invalid, and retried.
See **ganeti**\(7) for a description of ``--submit`` and other common
options.
......
......@@ -223,7 +223,7 @@ updateStatistics (SumStatistics s) (x, y) = SumStatistics $ s + (y - x)
updateStatistics (StdDevStatistics n s var) (x, y) =
let !ds = y - x
!dss = y * y - x * x
!dnnvar = n * dss - (2 * s + ds) * ds
!dnnvar = (n * dss - 2 * s * ds) - ds * ds
!s' = s + ds
!var' = max 0 $ var + dnnvar / (n * n)
in StdDevStatistics n s' var'
......
......@@ -348,7 +348,7 @@ prop_stddev_update =
direct = stdDev modified
in printTestCase ("Value computed by update " ++ show with_update
++ " differs too much from correct value " ++ show direct)
(abs (with_update - direct) < 1e-12)
(abs (with_update - direct) < 1e-10)
-- | Test list for the Utils module.
testSuite "Utils"
......
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