diff options
author | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2015-01-29 16:20:22 +0000 |
---|---|---|
committer | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2015-01-29 16:20:22 +0000 |
commit | 4b6522b5aa4f3a4cbcecaa804303c0304011f74b (patch) | |
tree | 42291cd3b161f8156c50ddc4a082b670b566f89d | |
parent | e843a9ee85429d58840100fcee0e81087e83cc53 (diff) | |
download | definitions-4b6522b5aa4f3a4cbcecaa804303c0304011f74b.tar.gz |
Link all the neutron and openvswitch services
-rw-r--r-- | openstack-neutron.configure | 30 | ||||
-rw-r--r-- | 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 <<EOF > "$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 |