summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Saha <asaha@redhat.com>2013-10-02 06:30:30 +0000
committerGerrit Code Review <gerrit@beaker-project.org>2013-10-02 06:30:30 +0000
commit5f9267117b73c23349fafad83210bbae2afe54d5 (patch)
tree32b05d9190925da2c6c99df07c897fff74346abc
parent12481d25293e86c3bc7d74371f3da4a53354e7d4 (diff)
parent69e09b7128c59a7591fa50d6518a29127f6bf9e3 (diff)
Merge "/distribution/beaker/setup" into developbeaker-distribution-beaker-setup-1_4_2-1
-rw-r--r--Tasks/distribution/beaker/setup/Makefile2
-rwxr-xr-xTasks/distribution/beaker/setup/runtest.sh58
2 files changed, 46 insertions, 14 deletions
diff --git a/Tasks/distribution/beaker/setup/Makefile b/Tasks/distribution/beaker/setup/Makefile
index 2988f9f..60aad22 100644
--- a/Tasks/distribution/beaker/setup/Makefile
+++ b/Tasks/distribution/beaker/setup/Makefile
@@ -26,7 +26,7 @@ PACKAGE_NAME=beaker
RELATIVE_PATH=setup
# Version of the Test. Used with make tag.
-export TESTVERSION=1.4.1
+export TESTVERSION=1.4.2
# The combined namespace of the test.
export TEST=/$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
diff --git a/Tasks/distribution/beaker/setup/runtest.sh b/Tasks/distribution/beaker/setup/runtest.sh
index 3fa4293..ff3925b 100755
--- a/Tasks/distribution/beaker/setup/runtest.sh
+++ b/Tasks/distribution/beaker/setup/runtest.sh
@@ -19,6 +19,14 @@
. /usr/bin/rhts-environment.sh
. /usr/share/beakerlib/beakerlib.sh
+function CheckDistro()
+{
+ rlIsFedora '>=18' || rlIsRHEL '>=7'
+ future_distro=$?
+}
+
+CheckDistro
+
function BuildBeaker ()
{
rlPhaseStartTest "Build Beaker from git"
@@ -84,7 +92,7 @@ __EOF__
function generate_proxy_cfg()
{
cat << __EOF__ > /etc/beaker/labcontroller.conf
-HUB_URL = "https://$SERVER/bkr/"
+HUB_URL = "http://$SERVER/bkr/"
AUTH_METHOD = "password"
USERNAME = "host/$HOSTNAME"
PASSWORD = "testing"
@@ -151,9 +159,13 @@ __EOF__
rlPhaseEnd
fi
- rlPhaseStartTest "Configure iptables"
+ rlPhaseStartTest "Configure firewall"
# XXX we can do better than this
- rlServiceStop iptables
+ if [[ $future_distro -eq 0 ]]; then
+ rlServiceStop firewalld
+ else
+ rlServiceStop iptables
+ fi
rlPhaseEnd
if [ -n "$GRAPHITE_SERVER" ] ; then
@@ -174,14 +186,18 @@ __EOF__
rlPhaseStartTest "Add lab controllers"
rlRun "curl -f -s -o /dev/null -c cookie -d user_name=admin -d password=testing -d login1 http://$SERVER/bkr/login" 0 "Log in to Beaker"
for CLIENT in $CLIENTS; do
- rlRun "curl -f -s -o /dev/null -b cookie -d fqdn=$CLIENT -d lusername=host/$CLIENT -d lpassword=testing -d email=root@$CLIENT http://$SERVER/bkr/labcontrollers/save" 0 "Add lab controller $CLIENT"
+ rlRun -c "curl -f -s -o /dev/null -b cookie -d fqdn=$CLIENT -d lusername=host/$CLIENT -d lpassword=testing -d email=root@$CLIENT http://$SERVER/bkr/labcontrollers/save" 0 "Add lab controller $CLIENT"
done
rlPhaseEnd
rlPhaseStartTest "Enable rsync for fake archive server"
generate_rsync_cfg
- rlRun "chkconfig rsync on" 0
- rlRun "service xinetd restart" 0
+ if [[ $future_distro -eq 0 ]]; then
+ rlRun "systemctl enable rsyncd"
+ else
+ rlRun "chkconfig rsync on"
+ rlServiceStart xinetd
+ fi
rlPhaseEnd
if [ -n "$ENABLE_COLLECTD" ] ; then
@@ -230,14 +246,24 @@ function LabController()
rlPhaseStartTest "Fetch netboot loaders"
# Using cobbler to get the netboot loaders..
rlServiceStart httpd cobblerd
- rlRun "cobbler get-loaders" 0 "get network boot loaders"
- rlRun "cobbler sync" 0 "sync boot loaders to tftpboot"
+ # XXX for some reason cobblerd fails to
+ # to start with rlServiceStart under systemd
+ if [[ $future_distro -eq 0 ]]; then
+ rlRun -c "systemctl start cobblerd" 0 "Start cobblerd"
+ fi
+
+ rlRun -c "cobbler get-loaders" 0 "get network boot loaders"
+ rlRun -c "cobbler sync" 0 "sync boot loaders to tftpboot"
rlServiceStop cobblerd
rlPhaseEnd
- rlPhaseStartTest "Configure iptables"
+ rlPhaseStartTest "Configure firewall"
# XXX we can do better than this
- rlServiceStop iptables
+ if [[ $future_distro -eq 0 ]]; then
+ rlServiceStop firewalld
+ else
+ rlServiceStop iptables
+ fi
rlPhaseEnd
rlPhaseStartTest "Wait for SERVERREADY"
@@ -245,9 +271,15 @@ function LabController()
rlPhaseEnd
rlPhaseStartTest "Start services"
- rlRun "chkconfig xinetd on" 0
- rlRun "chkconfig tftp on" 0
- rlServiceStart xinetd
+ if [[ $future_distro -eq 0 ]]; then
+ rlRun -c "systemctl enable tftp.socket"
+ rlRun -c "systemctl start tftp.socket"
+ else
+ rlRun "chkconfig xinetd on" 0
+ rlRun "chkconfig tftp on" 0
+ rlServiceStart xinetd
+ fi
+
# There is beaker-transfer as well but it's disabled by default
for service in httpd beaker-proxy beaker-watchdog beaker-provision ; do
rlRun "chkconfig $service on" 0