Commit b5df6331 authored by Iustin Pop's avatar Iustin Pop
Browse files

Merge branch 'stable-2.6' into devel-2.6

* stable-2.6:
  Make stable-2.6 compatible with newer pep8
  Fix computation of disk sizes in _ComputeDiskSize
  Add verification of RPC results in _WipeDisks
  Add test for checking that all gnt-* subcommands run OK
  Fix double use of PRIORITY_OPT in gnt-node migrate
  Add new Makefile target to rebuild the whole dist
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarRené Nussbaumer <>
parents b8481ebf 2fefc557
......@@ -1318,9 +1318,17 @@ hs-check: htools/test htools/hpc-htools $(HS_BUILT_TEST_HELPERS)
HBINARY="./htools/hpc-htools" ./htools/
# E111: indentation is not a multiple of four
# E121: continuation line indentation is not a multiple of four
# (since our indent level is not 4)
# E125: continuation line does not distinguish itself from next logical line
# (since our indent level is not 4)
# E127: continuation line over-indented for visual indent
# (since our indent level is not 4)
# E122,E123,E126,E128,E262,E272,E502,E711,: added temporarily to not
# modify stable code; do NOT merge these into master!
# E261: at least two spaces before inline comment
# E501: line too long (80 characters)
PEP8_IGNORE = E111,E261,E501
PEP8_IGNORE = E111,E121,E122,E123,E125,E126,E127,E128,E261,E262,E272,E501,E502,E711
# For excluding pep8 expects filenames only, not whole paths
PEP8_EXCLUDE = $(subst $(space),$(comma),$(strip $(notdir $(BUILT_PYTHON_SOURCES))))
......@@ -1406,6 +1414,19 @@ distcheck-hook:
distcheck-release dist-release: export BUILD_RELEASE = 1
distcheck-release: distcheck
distrebuildcheck: dist
set -e; \
builddir=$$(mktemp -d $(abs_srcdir)/distrebuildcheck.XXXXXXX); \
trap "echo Removing $$builddir; cd $(abs_srcdir); rm -rf $$builddir" EXIT; \
cd $$builddir; \
tar xzf $(abs_srcdir)/$(distdir).tar.gz; \
cd $(distdir); \
./configure; \
$(MAKE) maintainer-clean; \
cp $(abs_srcdir)/vcs-version .; \
./configure; \
dist-release: dist
set -e; \
for i in $(DIST_ARCHIVES); do \
......@@ -1001,7 +1001,7 @@ commands = {
MigrateNode, ARGS_ONE_NODE,
"[-f] <node>",
"Migrate all the primary instance on a node away from it"
" (only for instances of type drbd)"),
......@@ -8888,6 +8888,7 @@ def _WipeDisks(lu, instance):
result = lu.rpc.call_blockdev_pause_resume_sync(node,
(instance.disks, instance),
result.Raise("Failed RPC to node %s for pausing the disk syncing" % node)
for idx, success in enumerate(result.payload):
if not success:
......@@ -8935,6 +8936,11 @@ def _WipeDisks(lu, instance):
(instance.disks, instance),
if result.fail_msg:
lu.LogWarning("RPC call to %s for resuming disk syncing failed,"
" please have a look at the status and troubleshoot"
" the issue: %s", node, result.fail_msg)
for idx, success in enumerate(result.payload):
if not success:
lu.LogWarning("Resume sync of disk %d failed, please have a"
......@@ -9080,7 +9086,7 @@ def _ComputeDiskSizePerVG(disk_template, disks):
def _ComputeDiskSize(disk_template, disks):
"""Compute disk size requirements in the volume group
"""Compute disk size requirements according to disk template
# Required free disk space as a function of disk and swap space
......@@ -9090,10 +9096,10 @@ def _ComputeDiskSize(disk_template, disks):
# 128 MB are added for drbd metadata for each disk
sum(d[constants.IDISK_SIZE] + DRBD_META_SIZE for d in disks),
constants.DT_FILE: None,
constants.DT_SHARED_FILE: 0,
constants.DT_FILE: sum(d[constants.IDISK_SIZE] for d in disks),
constants.DT_SHARED_FILE: sum(d[constants.IDISK_SIZE] for d in disks),
constants.DT_BLOCK: 0,
constants.DT_RBD: 0,
constants.DT_RBD: sum(d[constants.IDISK_SIZE] for d in disks),
if disk_template not in req_size_dict:
......@@ -70,3 +70,8 @@ $SCRIPTS/gnt-debug --version
>>>= 0
# test that verifies all sub-commands can be run with --help, checking
# that optparse doesn't reject the options list
set -e; for c in scripts/gnt-*; do for i in $($c --help|grep '^ [^ ]'|awk '{print $1}'); do echo Checking command ${c##/}/$i; $c $i --help >/dev/null; done; done
>>>= 0
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