Description of problem: Since the latest upgrade of Beaker 22.2. The side of Beaker (BEAH) hangs during automated testing when tasks calls rhts-reboot. Version-Release number of selected component (if applicable): ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: beah noarch 0.7.9-1.el6 beaker-harness 323 k beakerlib noarch 1.11-1.el6 beaker-harness 130 k rhts-test-env noarch 4.69-1.el6 beaker-harness 46 k Installing for dependencies: PyXML i686 0.8.4-19.el6 beaker-Server 892 k SOAPpy noarch 0.11.6-11.el6 beaker-Server 207 k python-fpconst noarch 0.7.3-6.1.el6 beaker-Server 16 k python-twisted-core i686 8.2.0-4.el6 beaker-Server 2.0 M python-twisted-web i686 8.2.0-3.2.el6 beaker-Server 633 k python-zope-filesystem i686 1-5.el6 beaker-Server 4.9 k python-zope-interface i686 3.5.2-2.1.el6 beaker-Server 116 k rhts-python noarch 4.69-1.el6 beaker-harness 57 k ================================================================================ How reproducible: Always Steps to Reproduce: 1. Provision OS 2. run task /kernel/misc/reboot Actual results: https://beaker.engineering.redhat.com/jobs/1276153 All recipes hit LWD/EWD They are hung at: RHTS test /distribution/kernelinstall wants to reboot your system Press Enter to reboot or hit CTRL-C to stop Expected results: Additional info: I believe it has to do with this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1298934 I tried to review the testing of this but the task in Comment#8[1] of BZ#1298934 But that job has been deleted. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1298934#c8 Note: this works with restraint. But fails with BEAH.
commit 06015afd8a579859f3fe795cdf09d09225ae1164 Author: Dan Callaghan <dcallagh> Date: Mon Jan 18 17:29:20 2016 +1000 rhts-reboot: don't invoke beahsh if we are not run inside a task Bug: 1298934 Change-Id: I483e8a674e3a8645e8a3078fe3ffc97fb44eadd1 diff --git a/bin/rhts-reboot b/bin/rhts-reboot index d75ca6d..5ce80a4 100755 --- a/bin/rhts-reboot +++ b/bin/rhts-reboot @@ -17,7 +17,7 @@ PATH=/sbin:/usr/sbin:$PATH -if [ "$RESULT_SERVER+is_not_set" = "+is_not_set" ]; then +if [ -n "$RESULT_SERVER" ] ; then echo "RHTS test $TEST wants to reboot your system" echo -n "Press Enter to reboot or hit CTRL-C to stop" read Dummy @@ -42,7 +42,9 @@ if efibootmgr &>/dev/null ; then fi fi -beahsh rebooting "Rebooting from task" +if [ -n "$RESULT_SERVER" ] ; then + beahsh rebooting "Rebooting from task" +fi /sbin/shutdown -r now # Wait for the shutdown to kill us.. we don't want control to go back
Seems like backwards logic in the above commit which was for bug 1298934. The first conditional should be -z not -n. I think this also goes to show that we really can't keep patching beah and rhts without proper automated functional regression tests to prove that they actually do what they're supposed to do in a Beaker environment.
As a workaround you can force rhts-test-env to be downgraded: <ks_appends> <ks_append><![CDATA[ %post yum -y downgrade rhts-test-env-4.68 rhts-python-4.68 %end ]]></ks_append> </ks_appends>
http://gerrit.beaker-project.org/4760
Tagged as rhts 4.70.
Steps to verify: 1. Run a job containing /kernel/misc/reboot, or /distribution/utils/reboot or equivalent. Check that the system reboots properly and there is no prompt as per comment 0. 2. Run rhts-reboot outside a Beaker task (for example in a VM). It should prompt before rebooting.
rhts 4.70 has been released.