Browse Source

Add pre-install hook for networking-sfc package

Change-Id: If5472b8420e3e6746ebb7da3ad03522b07c3b9d9
Bartosz Kupidura 2 years ago
parent
commit
b1f668cb2d

+ 1
- 2
README.md View File

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

+ 3
- 6
deployment_scripts/puppet/manifests/networking-sfc-compute.pp View File

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

+ 6
- 8
deployment_scripts/puppet/manifests/networking-sfc-controller.pp View File

@@ -54,8 +54,7 @@ if $use_neutron {
54 54
 
55 55
   service {'neutron-openvswitch-agent':
56 56
     ensure    => running,
57
-    enable    => true,
58
-    hasstatus => true,
57
+    provider  => 'pacemaker'
59 58
   }
60 59
 
61 60
   package {'python-networking-sfc':
@@ -73,14 +72,13 @@ if $use_neutron {
73 72
   }
74 73
 
75 74
   Package['python-networking-sfc'] -> Neutron_config <| |>
76
-  Neutron_config <| |> -> Exec <| title == 'Modify neutron-openvswitch-agent.conf' |>
75
+
76
+  Package['python-networking-sfc'] ~> Service['neutron-openvswitch-agent']
77
+  Package['python-networking-sfc'] ~> Service['neutron-server']
78
+  Neutron_config <| |> ~> Service['neutron-openvswitch-agent']
79
+  Neutron_config <| |> ~> Service['neutron-server']
77 80
 
78 81
   neutron_config { 'DEFAULT/service_plugins': value => $enabled_plugins }
79 82
   neutron_config { 'sfc/drivers': value => 'ovs' }
80 83
 
81
-  exec { 'Modify neutron-openvswitch-agent.conf':
82
-    command => "sed -i 's|/usr/bin|/usr/local/bin|g' /etc/init/neutron-openvswitch-agent.conf",
83
-    path    => '/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin',
84
-    notify  => [Service['neutron-openvswitch-agent'],Service['neutron-server']],
85
-  }
86 84
 }

+ 2
- 0
fpm-before-install View File

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

+ 1
- 1
pre_build_hook View File

@@ -36,7 +36,7 @@ git checkout $GIT_LAST_WORKING_COMMIT
36 36
 popd
37 37
 
38 38
 pushd "${DIR}/repositories/ubuntu/"
39
-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
39
+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
40 40
 popd
41 41
 
42 42
 if [ "$CLEANUP" != false ];then

Loading…
Cancel
Save