From 4d8c03a377dbb819f28d199fe9fca7e4b576e7e3 Mon Sep 17 00:00:00 2001 From: Zhang Jinnan Date: Thu, 20 Aug 2015 10:00:20 -0400 Subject: [PATCH] Enable some serivce when on boot Solve the devstack ./rejoin-stack.sh when is reboot-safe in RHEL 7. Enable mysql, postgresql, rabbitmq-server, openvswitch service when on boot. Change-Id: I3ce9fc58ccc76092ad08314de1c3c9339ebfb3b5 Related-Bug: #1486833 --- lib/databases/mysql | 1 + lib/databases/postgresql | 3 +++ lib/neutron_plugins/ovs_base | 1 + lib/rpc_backend | 3 +++ 4 files changed, 8 insertions(+) diff --git a/lib/databases/mysql b/lib/databases/mysql index c2ab32e5b2..510da7541a 100644 --- a/lib/databases/mysql +++ b/lib/databases/mysql @@ -154,6 +154,7 @@ EOF fi elif is_fedora; then install_package mariadb-server + sudo systemctl enable mariadb elif is_ubuntu; then install_package mysql-server else diff --git a/lib/databases/postgresql b/lib/databases/postgresql index 78c7bedc90..261574f256 100644 --- a/lib/databases/postgresql +++ b/lib/databases/postgresql @@ -101,6 +101,9 @@ EOF install_package postgresql elif is_fedora || is_suse; then install_package postgresql-server + if is_fedora; then + sudo systemctl enable postgresql-server + fi else exit_distro_not_supported "postgresql installation" fi diff --git a/lib/neutron_plugins/ovs_base b/lib/neutron_plugins/ovs_base index b012683a6f..849d0b744b 100644 --- a/lib/neutron_plugins/ovs_base +++ b/lib/neutron_plugins/ovs_base @@ -65,6 +65,7 @@ function _neutron_ovs_base_install_agent_packages { restart_service openvswitch-switch elif is_fedora; then restart_service openvswitch + sudo systemctl enable openvswitch elif is_suse; then restart_service openvswitch-switch fi diff --git a/lib/rpc_backend b/lib/rpc_backend index 03eacd8674..2e1c89713c 100644 --- a/lib/rpc_backend +++ b/lib/rpc_backend @@ -48,6 +48,9 @@ function install_rpc_backend { # Install rabbitmq-server install_package rabbitmq-server fi + if is_fedora; then + sudo systemctl enable rabbitmq-server + fi } # restart the rpc backend