From 9c6ab3b1f48a0e2ed26ec4d2eaa3460c4f72be56 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 7 Jan 2016 14:00:09 -0600 Subject: [PATCH 1/3] Fix: test: allow pacemaker_remote regression tests to be run via BasicSanity.sh This also reduces some code duplication and fixes minor other issues. --- BasicSanity.sh | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/BasicSanity.sh b/BasicSanity.sh index faf65f3245a..d00f337e64b 100755 --- a/BasicSanity.sh +++ b/BasicSanity.sh @@ -17,11 +17,35 @@ function error() { printf " * ERROR: $*\n" } +function run_as_root() { + CMD="$1" + shift + ARGS="$@" + + # Test might not be executable if run from source directory + chmod a+x $CMD + + CMD="$CMD $ARGS $verbose" + + if [ $EUID -eq 0 ]; then + $CMD + + elif [ -z $TRAVIS ]; then + # sudo doesn't work in builtbot, su doesn't work in travis + echo "Enter the root password..." + su root -c "$CMD" + + else + echo "Enter the root password if prompted..." + sudo -- $CMD + fi +} + info "Test home is:\t$test_home" while true ; do case "$1" in - all) tests="pengine cli lrmd fencing"; shift;; + all) tests="$tests pengine cli lrmd fencing"; shift;; pengine|lrmd|pacemaker_remote|fencing|cli) tests="$tests $1"; shift;; -V|--verbose) verbose="-V"; shift;; -v|--valgrind) valgrind="-v"; shift;; @@ -40,36 +64,22 @@ for t in $tests; do info "Executing the $t regression tests" info "============================================================" if [ -e $test_home/$t/regression.py ]; then - # Fencing, lrmd need root access - chmod a+x $test_home/$t/regression.py - echo "Enter the root password..." - # sudo doesn't work in builtbot, su doesn't work in travis - if [ x$TRAVIS = x ]; then - su root -c "$test_home/$t/regression.py $verbose" - else - sudo -- $test_home/$t/regression.py $verbose - fi + # fencing, lrmd need root access + run_as_root $test_home/$t/regression.py rc=$? elif [ $t == "pacemaker_remote" ] && [ -e $test_home/lrmd/regression.py ]; then # pacemaker_remote - chmod a+x $test_home/lrmd/regression.py - echo "Enter the root password..." - # sudo doesn't work in builtbot, su doesn't work in travis - if [ x$TRAVIS = x ]; then - su root -c "$test_home/$t/regression.py -R $verbose" - else - sudo -- $test_home/$t/regression.py -R $verbose - fi + run_as_root $test_home/lrmd/regression.py -R rc=$? - elif [ -e $test_home/$t ]; then + elif [ -e $test_home/$t/regression.sh ]; then # pengine, cli $test_home/$t/regression.sh $verbose $valgrind rc=$? elif [ $t = cli -a -e $test_home/tools ]; then - # Running cli tests from the source tree + # cli when run from the source tree t=tools $test_home/$t/regression.sh $verbose $valgrind rc=$? From 3453803a79c12d030efd6e158cad3ee04f0c0cb6 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 7 Jan 2016 14:28:52 -0600 Subject: [PATCH 2/3] Test: cts: update ignore patterns for RemoteStonithd test --- cts/CTStests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cts/CTStests.py b/cts/CTStests.py index 7599bf3943c..cc2decea4f9 100644 --- a/cts/CTStests.py +++ b/cts/CTStests.py @@ -3093,8 +3093,8 @@ def is_applicable(self): def errorstoignore(self): ignore_pats = [ r"Unexpected disconnect on remote-node", - r"crmd.*: error.*: Operation remote_.*_monitor", - r"pengine.*: Recover remote_.*\s*\(.*\)", + r"crmd.*:\s+error.*: Operation remote_.*_monitor", + r"pengine.*:\s+Recover remote_.*\s*\(.*\)", r"Calculated Transition .* /var/lib/pacemaker/pengine/pe-error", r"error.*: Resource .*ocf::.* is active on 2 nodes attempting recovery", ] From dd84eaa11ec9f23ab3dad00be6d7b513de8b0e71 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Thu, 7 Jan 2016 14:23:37 -0600 Subject: [PATCH 3/3] Doc: update change log for 1.1.14-rc5 --- ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index cb4307d8f15..03aa1932adc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +* Thu Jan 07 2016 Ken Gaillot Pacemaker-1.1.14-rc5-1 +- Update source tarball to revision: 3453803 +- Changesets: 22 +- Diff: 25 files changed, 80 insertions(+), 80 deletions(-) + +- Changes since Pacemaker-1.1.14-rc4 + + update SNMP MIB + + fix various misspellings in log messages + + fencing: use multiple topology levels properly + * Wed Dec 23 2015 Ken Gaillot Pacemaker-1.1.14-rc4-1 - Update source tarball to revision: 5f8a298 - Changesets: 18