Commit ee12ac98 authored by Petr Pudlak's avatar Petr Pudlak

Merge branch 'stable-2.11' into stable-2.12

* stable-2.11
  (no changes)

* 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:
      man/gnt-backup.rst
      src/Ganeti/Utils.hs
      test/hs/Test/Ganeti/Utils.hs

Resolution: Propagate changes in 2.10 (also to the files that have been
moved in 2.12).
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parents bb02b8f2 fda1a35b
......@@ -575,6 +575,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)
......
......@@ -1277,14 +1277,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)
......
......@@ -62,13 +62,12 @@ is used. The ``--zeroing-timeout-fixed`` and
determining the minimum time to wait, and the latter how much longer
to wait per MiB of data the instance has.
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.
......
......@@ -80,7 +80,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'
......
......@@ -58,7 +58,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)
testSuite "Utils/Statistics"
[ 'prop_stddev_update
......
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