From 6d8d114e127027a807f19e2f08ebda154eb792d4 Mon Sep 17 00:00:00 2001 From: "David M. Johnson" Date: Tue, 31 May 2016 22:38:53 -0600 Subject: [PATCH] Install openstack-slothd as a systemd service on Liberty. --- setup-controller.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/setup-controller.sh b/setup-controller.sh index 126fe95..0fe759f 100755 --- a/setup-controller.sh +++ b/setup-controller.sh @@ -2718,6 +2718,35 @@ if [ -z "${SETUP_BASIC_DONE}" ]; then echo "SETUP_BASIC_DONE=\"1\"" >> $SETTINGS fi +# +# Install and startup the slothd-for-openstack idleness detector +# +if [ $OSVERSION -ge $OSLIBERTY ]; then + cp -p $DIRNAME/openstack-slothd.py $OURDIR/ + + cat </etc/systemd/system/openstack-slothd.service +[Unit] +Description=OpenStack Slothd +After=network.target network-online.target local-fs.target +Wants=network.target +Before=rabbitmq-server.service +Requires=rabbitmq-server.service + +[Service] +Type=simple +RemainAfterExit=no +ExecStart=$OURDIR/openstack-slothd.py +StandardOutput=journal+console +StandardError=journal+console + +[Install] +WantedBy=multi-user.target +EOF + + systemctl enable openstack-slothd.service + systemctl restart openstack-slothd.service +fi + RANDPASSSTRING="" if [ -e $OURDIR/random_admin_pass ]; then RANDPASSSTRING="We generated a random OpenStack admin and instance VM password for you, since one wasn't supplied. The password is '${ADMIN_PASS}'" -- GitLab