From b7d56c2c8740c53c5af86946d0f2e520c17d8e6b Mon Sep 17 00:00:00 2001 From: Ghe Rivero Date: Wed, 2 Jul 2014 08:53:38 +0000 Subject: [PATCH] Make use of openvswitch elements Neutron and network-utils elements now depends of the new openvswitch elements and delegate all openvswitch installation and configuration into the openvswitch elements. Closes-Bug: #1316985 Change-Id: Ib5c18e85317e6120b420d21790c26c21f4bbb0e4 --- elements/network-utils/element-deps | 1 + .../network-utils/install.d/70-network-utils | 22 +------------------ elements/neutron/element-deps | 1 + .../neutron-source-install/76-neutron | 6 ----- 4 files changed, 3 insertions(+), 27 deletions(-) create mode 100644 elements/network-utils/element-deps diff --git a/elements/network-utils/element-deps b/elements/network-utils/element-deps new file mode 100644 index 000000000..64796f72c --- /dev/null +++ b/elements/network-utils/element-deps @@ -0,0 +1 @@ +openvswitch diff --git a/elements/network-utils/install.d/70-network-utils b/elements/network-utils/install.d/70-network-utils index ac6e3b511..d703540ff 100755 --- a/elements/network-utils/install.d/70-network-utils +++ b/elements/network-utils/install.d/70-network-utils @@ -1,24 +1,4 @@ #!/bin/bash set -eux -install-packages openvswitch-switch python-netaddr - -if [ "$DIB_INIT_SYSTEM" == "systemd" ] ; then - os-svc-enable -n openvswitch-switch -fi - -if [ "$DIB_INIT_SYSTEM" == "upstart" ] ; then - echo "start on starting cloud-init-nonet" >> /etc/init/openvswitch-switch.override - if [ ! -f /etc/init/openvswitch-switch.conf ] ; then - cat << 'EOF' > /etc/init/openvswitch-switch.conf -# openvswitch-switch -# the purpose of this job is -# * start openvwitch-switch in upstart rather than SysV startup -pre-start script - export RUNLEVEL=2 - /etc/init.d/openvswitch-switch start -end script -post-stop exec /etc/init.d/openvswitch-switch stop -EOF - fi -fi +install-packages python-netaddr diff --git a/elements/neutron/element-deps b/elements/neutron/element-deps index 03eabbd71..1777d90bf 100644 --- a/elements/neutron/element-deps +++ b/elements/neutron/element-deps @@ -3,5 +3,6 @@ os-apply-config os-is-bootstrap-host os-refresh-config os-svc-install +openvswitch-datapath selinux source-repositories diff --git a/elements/neutron/install.d/neutron-source-install/76-neutron b/elements/neutron/install.d/neutron-source-install/76-neutron index ba3fe4a2b..88e2b784d 100755 --- a/elements/neutron/install.d/neutron-source-install/76-neutron +++ b/elements/neutron/install.d/neutron-source-install/76-neutron @@ -1,8 +1,6 @@ #!/bin/bash set -eux -install-packages openvswitch-switch openvswitch-datapath-dkms - # for BUG: https://bugs.launchpad.net/neutron/+bug/1225232 echo "qpid-python" | tee -a /opt/stack/neutron/requirements.txt @@ -21,8 +19,4 @@ echo "Defaults:neutron !requiretty" >> /etc/sudoers.d/neutron chmod 0440 /etc/sudoers.d/neutron visudo -c -if [ "$DIB_INIT_SYSTEM" == "systemd" ]; then - os-svc-enable -n openvswitch-switch -fi - add-selinux-path-substitution /usr/bin $NEUTRON_VENV_DIR/bin