Add pre-install hook for networking-sfc package

Change-Id: If5472b8420e3e6746ebb7da3ad03522b07c3b9d9
This commit is contained in:
Bartosz Kupidura 2016-06-23 12:04:01 +02:00
parent b364844385
commit b1f668cb2d
5 changed files with 13 additions and 17 deletions

View File

@ -67,8 +67,7 @@ Networking SFC plugin configuration
Known issues
------------
1. Fuel plugin should be build on Ubuntu system (https://bugs.launchpad.net/networking-sfc/+bug/1593693).
2. Networking-SFC is very dynamic project, because of that we stick to last known working commit.
1. Networking-SFC is very dynamic project, because of that we stick to last known working commit.
Contributors
------------

View File

@ -42,14 +42,11 @@ if $use_neutron {
}
Package['python-networking-sfc'] -> Neutron_config <| |>
Neutron_config <| |> -> Exec <| title == 'Modify neutron-openvswitch-agent.conf' |>
Package['python-networking-sfc'] ~> Service['neutron-openvswitch-agent']
Neutron_config <| |> ~> Service['neutron-openvswitch-agent']
neutron_config { 'DEFAULT/service_plugins': value => $enabled_plugins }
neutron_config { 'sfc/drivers': value => 'ovs' }
exec { 'Modify neutron-openvswitch-agent.conf':
command => "sed -i 's|/usr/bin|/usr/local/bin|g' /etc/init/neutron-openvswitch-agent.conf",
path => '/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin',
notify => Service['neutron-openvswitch-agent']
}
}

View File

@ -54,8 +54,7 @@ if $use_neutron {
service {'neutron-openvswitch-agent':
ensure => running,
enable => true,
hasstatus => true,
provider => 'pacemaker'
}
package {'python-networking-sfc':
@ -73,14 +72,13 @@ if $use_neutron {
}
Package['python-networking-sfc'] -> Neutron_config <| |>
Neutron_config <| |> -> Exec <| title == 'Modify neutron-openvswitch-agent.conf' |>
Package['python-networking-sfc'] ~> Service['neutron-openvswitch-agent']
Package['python-networking-sfc'] ~> Service['neutron-server']
Neutron_config <| |> ~> Service['neutron-openvswitch-agent']
Neutron_config <| |> ~> Service['neutron-server']
neutron_config { 'DEFAULT/service_plugins': value => $enabled_plugins }
neutron_config { 'sfc/drivers': value => 'ovs' }
exec { 'Modify neutron-openvswitch-agent.conf':
command => "sed -i 's|/usr/bin|/usr/local/bin|g' /etc/init/neutron-openvswitch-agent.conf",
path => '/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin',
notify => [Service['neutron-openvswitch-agent'],Service['neutron-server']],
}
}

2
fpm-before-install Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
dpkg-divert --add --rename --divert /usr/bin/neutron-openvswitch-agent.vanilla /usr/bin/neutron-openvswitch-agent

View File

@ -36,7 +36,7 @@ git checkout $GIT_LAST_WORKING_COMMIT
popd
pushd "${DIR}/repositories/ubuntu/"
fpm --architecture all --force -s python --no-python-dependencies -t deb -m "${MAINTAINERS}" --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/networking-sfc/setup.py
fpm --prefix /usr --python-install-lib /lib/python2.7/dist-packages --before-install ../../fpm-before-install --architecture all --force -s python --no-python-dependencies -t deb -m "${MAINTAINERS}" ${TMP_DIR}/networking-sfc/setup.py
popd
if [ "$CLEANUP" != false ];then