Add pre-install hook for networking-sfc package
Change-Id: If5472b8420e3e6746ebb7da3ad03522b07c3b9d9
This commit is contained in:
parent
b364844385
commit
b1f668cb2d
|
@ -67,8 +67,7 @@ Networking SFC plugin configuration
|
||||||
Known issues
|
Known issues
|
||||||
------------
|
------------
|
||||||
|
|
||||||
1. Fuel plugin should be build on Ubuntu system (https://bugs.launchpad.net/networking-sfc/+bug/1593693).
|
1. Networking-SFC is very dynamic project, because of that we stick to last known working commit.
|
||||||
2. Networking-SFC is very dynamic project, because of that we stick to last known working commit.
|
|
||||||
|
|
||||||
Contributors
|
Contributors
|
||||||
------------
|
------------
|
||||||
|
|
|
@ -42,14 +42,11 @@ if $use_neutron {
|
||||||
}
|
}
|
||||||
|
|
||||||
Package['python-networking-sfc'] -> Neutron_config <| |>
|
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 { 'DEFAULT/service_plugins': value => $enabled_plugins }
|
||||||
neutron_config { 'sfc/drivers': value => 'ovs' }
|
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']
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,7 @@ if $use_neutron {
|
||||||
|
|
||||||
service {'neutron-openvswitch-agent':
|
service {'neutron-openvswitch-agent':
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
provider => 'pacemaker'
|
||||||
hasstatus => true,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package {'python-networking-sfc':
|
package {'python-networking-sfc':
|
||||||
|
@ -73,14 +72,13 @@ if $use_neutron {
|
||||||
}
|
}
|
||||||
|
|
||||||
Package['python-networking-sfc'] -> Neutron_config <| |>
|
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 { 'DEFAULT/service_plugins': value => $enabled_plugins }
|
||||||
neutron_config { 'sfc/drivers': value => 'ovs' }
|
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']],
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
dpkg-divert --add --rename --divert /usr/bin/neutron-openvswitch-agent.vanilla /usr/bin/neutron-openvswitch-agent
|
|
@ -36,7 +36,7 @@ git checkout $GIT_LAST_WORKING_COMMIT
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd "${DIR}/repositories/ubuntu/"
|
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
|
popd
|
||||||
|
|
||||||
if [ "$CLEANUP" != false ];then
|
if [ "$CLEANUP" != false ];then
|
||||||
|
|
Loading…
Reference in New Issue