Skip to contentSkip to conversation

python-neutron: Don't start the neutron services until init is done

PATCH New Mark Asselstine 1 participant 1 message Apr 4, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python-neutron: Don't start the neutron services until init is done

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.

---
 .../recipes-devtools/python/python-neutron/neutron-init   | 15 ++++++++++-----
 .../recipes-devtools/python/python-neutron_git.bb         |  7 +++++++
 2 files changed, 17 insertions(+), 5 deletions(-)
meta-openstack/recipes-devtools/python/python-neutron/neutron-init +10 -5
index fe98dcb..d0ae023 100644
@@ -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
meta-openstack/recipes-devtools/python/python-neutron_git.bb +7 -0
index edf9096..a054551 100644
@@ -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"
Signature · 1 line
2.7.4