Commit dfd6e56b authored by Hrvoje Ribicic's avatar Hrvoje Ribicic
Browse files

Merge branch 'stable-2.9' into stable-2.10

* stable-2.9
  Allow QA asserts to produce more messages
  Add messages about skipped QA disk template tests
  Fix list-drbd QA test
  Update installation guide wrt to DRBD version
  Update NEWS for 2.9.6
  Revision bump for 2.9.6

	NEWS - Combined both news files - Took the 2.10 version numbers
Signed-off-by: default avatarHrvoje Ribicic <>
Reviewed-by: default avatarKlaus Aehlig <>
parents 918baead b64f32c3
......@@ -228,6 +228,21 @@ before rc1.
- Issue 623: IPv6 Masterd <-> Luxid communication error
Version 2.9.6
*(Released Mon, 7 Apr 2014)*
- Improve RAPI detection of the watcher (Issue 752)
- gnt-cluster copyfile: accept relative paths (Issue 754)
- Make watcher submit queries low priority (Issue 772)
- Add reason parameter to RAPI client functions (Issue 776)
- Fix failing gnt-node list-drbd command (Issue 777)
- Properly display fake job locks in gnt-debug.
- Enable timeout for instance shutdown
- small fixes in documentation
Version 2.9.5
......@@ -248,7 +248,7 @@ your instances to DRBD to take advantage of the new features.
.. _DRBD:
Supported DRBD versions: 8.0-8.3. It's recommended to have at least
Supported DRBD versions: 8.0-8.4. It's recommended to have at least
version 8.0.12. Note that for version 8.2 and newer it is needed to pass
the ``usermode_helper=/bin/true`` parameter to the module, either by
configuring ``/etc/modules`` or when inserting it manually.
......@@ -100,6 +100,22 @@ def RunTest(fn, *args, **kwargs):
print _FormatHeader("%s time=%s %s" % (tstop, tdelta, desc))
def ReportTestSkip(desc, testnames):
"""Reports that tests have been skipped.
@type desc: string
@param desc: string
@type testnames: string or list of string
@param testnames: either a single test name in the configuration
file, or a list of testnames (which will be AND-ed together)
tstart =
# TODO: Formatting test names when non-string names are involved
print _FormatHeader("%s skipping %s, test(s) %s disabled" %
(tstart, desc, testnames))
def RunTestIf(testnames, fn, *args, **kwargs):
"""Runs a test conditionally.
......@@ -110,11 +126,8 @@ def RunTestIf(testnames, fn, *args, **kwargs):
if qa_config.TestEnabled(testnames):
RunTest(fn, *args, **kwargs)
tstart =
desc = _DescriptionOf(fn)
# TODO: Formatting test names when non-string names are involved
print _FormatHeader("%s skipping %s, test(s) %s disabled" %
(tstart, desc, testnames))
ReportTestSkip(desc, testnames)
def RunEnvTests():
......@@ -758,6 +771,12 @@ def RunInstanceTests():
test_desc = "Creating instances of template %s" % templ
if not qa_config.TestEnabled(test_name):
ReportTestSkip(test_desc, test_name)
ReportTestSkip(test_desc, "disk template %s" % templ)
def RunMonitoringTests():
......@@ -460,8 +460,17 @@ def TestNodeListDrbd(node, is_drbd):
# primary or one of the secondaries
if is_drbd:
# Invoked for both primary and secondary
drbd_node, _, _, _, _, drbd_peer = result_output.split()
AssertIn(node.primary, [drbd_node, drbd_peer])
per_disk_info = result_output.splitlines()
for line in per_disk_info:
drbd_node, _, _, _, _, drbd_peer = line.split()
except ValueError:
raise qa_error.Error("Could not examine list-drbd output: expected a"
" single row of 6 entries, found the following:"
" %s" % line)
AssertIn(node.primary, [drbd_node, drbd_peer],
msg="The output %s does not contain the node" % line)
# Output should be empty, barring newlines
AssertEqual(result_output.strip(), "")
......@@ -67,36 +67,47 @@ _QA_OUTPUT = pathutils.GetLogFilename("qa-output")
RETURN_VALUE) = range(1000, 1002)
def AssertIn(item, sequence):
def _RaiseWithInfo(msg, error_desc):
"""Raises a QA error with the given content, and adds a message if present.
if msg:
output = "%s: %s" % (msg, error_desc)
output = error_desc
raise qa_error.Error(output)
def AssertIn(item, sequence, msg=None):
"""Raises an error when item is not in sequence.
if item not in sequence:
raise qa_error.Error("%r not in %r" % (item, sequence))
_RaiseWithInfo(msg, "%r not in %r" % (item, sequence))
def AssertNotIn(item, sequence):
def AssertNotIn(item, sequence, msg=None):
"""Raises an error when item is in sequence.
if item in sequence:
raise qa_error.Error("%r in %r" % (item, sequence))
_RaiseWithInfo(msg, "%r in %r" % (item, sequence))
def AssertEqual(first, second):
def AssertEqual(first, second, msg=None):
"""Raises an error when values aren't equal.
if not first == second:
raise qa_error.Error("%r == %r" % (first, second))
_RaiseWithInfo(msg, "%r == %r" % (first, second))
def AssertMatch(string, pattern):
def AssertMatch(string, pattern, msg=None):
"""Raises an error when string doesn't match regexp pattern.
if not re.match(pattern, string):
raise qa_error.Error("%r doesn't match /%r/" % (string, pattern))
_RaiseWithInfo(msg, "%r doesn't match /%r/" % (string, pattern))
def _GetName(entity, fn):
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