From 4b6522b5aa4f3a4cbcecaa804303c0304011f74b Mon Sep 17 00:00:00 2001 From: Francisco Redondo Marchena Date: Thu, 29 Jan 2015 16:20:22 +0000 Subject: Link all the neutron and openvswitch services --- openstack-neutron.configure | 30 +++++++++++++++++++----------- openvswitch.configure | 11 +++++++---- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/openstack-neutron.configure b/openstack-neutron.configure index 350d4ca9..f3c6aa8f 100644 --- a/openstack-neutron.configure +++ b/openstack-neutron.configure @@ -20,7 +20,7 @@ set -e ROOT="$1" ########################################################################## -# Substitutions in configuration files +# Substitutions in configuration files # ########################################################################## cat < "$ROOT"/etc/openstack-neutron-setup.sed @@ -41,19 +41,27 @@ sed -f "$ROOT"/etc/openstack-neutron-setup.sed -i \ "$ROOT"/usr/share/openstack/openstack-neutron-setup ########################################################################## +# Create the links to enable the neutron systemd services # +########################################################################## +services=("openstack-neutron-network-configuration-one-node.service" + "openvswitch-create-links-one-node.service" + "openstack-neutron-dhcp-agent.service" + "openstack-neutron-l3-agent.service" + "openstack-neutron-metadata-agent.service" + "openstack-neutron-network-configuration-one-node.service" + "openstack-neutron-ovs-cleanup.service" + "openstack-neutron-plugin-openvswitch-agent.service" + "openstack-neutron-server.service" + "openstack-neutron-setup.service") -ln -sf "/etc/systemd/system/openvswitch-create-links-one-node.service" \ - "$ROOT/etc/systemd/system/multi-user.target.wants/openvswitch-create-links-one-node.service" - -ln -sf "/etc/systemd/system/openstack-neutron-network-configuration-one-node.service" \ - "$ROOT/etc/systemd/system/multi-user.target.wants/openstack-neutron-network-configuration-one-node.service" - -ln -sf "/etc/systemd/system/openstack-neutron-setup.service" \ - "$ROOT/etc/systemd/system/multi-user.target.wants/openstack-neutron-setup.service" +for service in ${services[@]}; do + ln -sf "/etc/systemd/system/$service" \ + "$ROOT/etc/systemd/system/multi-user.target.wants/$service" +done ########################################################################## -# Add neutron to sudoers controlling which commands is running as a root -# using the openstack rootwrap. +# Add neutron to sudoers controlling which commands is running as a root # +# using the openstack rootwrap. # ########################################################################## install -D -m 0440 /proc/self/fd/0 <<'EOF' "$ROOT"/etc/sudoers.d/neutron-rootwrap neutron ALL=(root) NOPASSWD: /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf * diff --git a/openvswitch.configure b/openvswitch.configure index aec66bd2..ec219851 100644 --- a/openvswitch.configure +++ b/openvswitch.configure @@ -19,7 +19,10 @@ set -e ROOT="$1" -ln -sf "/etc/systemd/system/openvswitch-db-server.service" \ - "$ROOT/etc/systemd/system/multi-user.target.wants/openvswitch-db-server.service" -ln -sf "/etc/systemd/system/openvswitch.service" \ - "$ROOT/etc/systemd/system/multi-user.target.wants/openvswitch.service" +services=("openvswitch-setup.service" "openvswitch-db-server.service" + "openvswitch-initialize-db.service" "openvswitch.service") + +for service in ${services[@]}; do + ln -sf "/etc/systemd/system/$service" \ + "$ROOT/etc/systemd/system/multi-user.target.wants/$service" +done -- cgit v1.2.1