[meta-virtualization] [m-c-s][PATCH] python-neutron: Don't start the neutron services until init is done

Mark Asselstine mark.asselstine at windriver.com
Wed Apr 4 13:01:21 PDT 2018


Starting the various neutron services prior to completing the work as
part of neutron-init/neutron-init.service will only result in the
services spewing python errors. Disable the systemd services in the
recipe and have the neutron-init script enable these services for
subsequent boots.

Signed-off-by: Mark Asselstine <mark.asselstine at windriver.com>
---
 .../recipes-devtools/python/python-neutron/neutron-init   | 15 ++++++++++-----
 .../recipes-devtools/python/python-neutron_git.bb         |  7 +++++++
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/meta-openstack/recipes-devtools/python/python-neutron/neutron-init b/meta-openstack/recipes-devtools/python/python-neutron/neutron-init
index fe98dcb..d0ae023 100644
--- a/meta-openstack/recipes-devtools/python/python-neutron/neutron-init
+++ b/meta-openstack/recipes-devtools/python/python-neutron/neutron-init
@@ -44,8 +44,13 @@ sudo -u ${NEUTRON_USER} neutron-db-manage --config-file /etc/neutron/neutron.con
 HOME=${ROOT_HOME} rabbitmqctl add_user openstack ${ADMIN_PASSWORD}
 HOME=${ROOT_HOME} rabbitmqctl set_permissions openstack ".*" ".*" ".*"
 
-#systemctl restart nova-api
-systemctl restart neutron-server
-systemctl restart neutron-linuxbridge-agent
-systemctl restart neutron-dhcp-agent
-systemctl restart neutron-metadata-agent
+# enable and start the various services
+systemctl enable neutron-server
+systemctl enable neutron-linuxbridge-agent
+systemctl enable neutron-dhcp-agent
+systemctl enable neutron-metadata-agent
+
+systemctl start neutron-server
+systemctl start neutron-linuxbridge-agent
+systemctl start neutron-dhcp-agent
+systemctl start neutron-metadata-agent
diff --git a/meta-openstack/recipes-devtools/python/python-neutron_git.bb b/meta-openstack/recipes-devtools/python/python-neutron_git.bb
index edf9096..a054551 100644
--- a/meta-openstack/recipes-devtools/python/python-neutron_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-neutron_git.bb
@@ -418,5 +418,12 @@ SYSTEMD_SERVICE_${SRCNAME}-linuxbridge-agent = "neutron-linuxbridge-agent.servic
 SYSTEMD_SERVICE_${SRCNAME}-metadata-agent = "neutron-metadata-agent.service"
 SYSTEMD_SERVICE_${SRCNAME}-setup = "neutron-init.service"
 
+# Disable unconfigured services
+SYSTEMD_AUTO_ENABLE_${SRCNAME}-server = "disable"
+SYSTEMD_AUTO_ENABLE_${SRCNAME}-dhcp-agent = "disable"
+SYSTEMD_AUTO_ENABLE_${SRCNAME}-linuxbridge-agent = "disable"
+SYSTEMD_AUTO_ENABLE_${SRCNAME}-metadata-agent = "disable"
+
+
 MONITOR_SERVICE_PACKAGES = "${SRCNAME}"
 MONITOR_SERVICE_${SRCNAME} = "neutron"
-- 
2.7.4



More information about the meta-virtualization mailing list