Browse code

Merge "Don't install openvswitch-datapath-dkms on newer kernels"

Jenkins authored on 2014/06/27 06:05:37
Showing 8 changed files
1 1
deleted file mode 100644
... ...
@@ -1,2 +0,0 @@
1
-openvswitch-datapath-dkms # NOPRIME
2
-openvswitch-switch # NOPRIME
3 1
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+fakeroot
1
+make
2
+openvswitch-switch
0 3
deleted file mode 100644
... ...
@@ -1,3 +0,0 @@
1
-openvswitch # NOPRIME
2
-openvswitch-switch # NOPRIME
3
-
4 1
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+openvswitch
1
+openvswitch-switch
2
+
0 3
deleted file mode 100644
... ...
@@ -1 +0,0 @@
1
-openvswitch # NOPRIME
2 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+openvswitch
... ...
@@ -32,26 +32,24 @@ function neutron_ovs_base_cleanup {
32 32
     done
33 33
 }
34 34
 
35
+function _neutron_ovs_base_install_ubuntu_dkms {
36
+    # install Dynamic Kernel Module Support packages if needed
37
+    local kernel_version=$(uname -r)
38
+    local kernel_major_minor=`echo $kernel_version | cut -d. -f1-2`
39
+    # From kernel 3.13 on, openvswitch-datapath-dkms is not needed
40
+    if [ `vercmp_numbers "$kernel_major_minor" "3.13"` -lt "0" ]; then
41
+        install_package "dkms openvswitch-datapath-dkms linux-headers-$kernel_version"
42
+    fi
43
+}
44
+
35 45
 function _neutron_ovs_base_install_agent_packages {
36
-    local kernel_version
37 46
     # Install deps
38
-    # FIXME add to ``files/apts/neutron``, but don't install if not needed!
47
+    install_package $(get_packages "openvswitch")
39 48
     if is_ubuntu; then
40
-        kernel_version=`cat /proc/version | cut -d " " -f3`
41
-        ovs_packages="make fakeroot dkms openvswitch-switch"
42
-        # From kernel 3.13 on, openvswitch-datapath-dkms is not needed
43
-        kernel_major_minor=`echo $kernel_version | cut -d. -f1-2`
44
-        if [ `vercmp_numbers "$kernel_major_minor" "3.13"` -lt "0" ]; then
45
-            ovs_packages="$ovs_packages openvswitch-datapath-dkms"
46
-        fi
47
-        ovs_packages="$ovs_packages linux-headers-$kernel_version"
48
-        install_package $ovs_packages
49
+        _neutron_ovs_base_install_ubuntu_dkms
49 50
     elif is_fedora; then
50
-        install_package openvswitch
51
-        # Ensure that the service is started
52 51
         restart_service openvswitch
53 52
     elif is_suse; then
54
-        install_package openvswitch-switch
55 53
         restart_service openvswitch-switch
56 54
     fi
57 55
 }
... ...
@@ -122,22 +122,10 @@ function install_opendaylight {
122 122
     unzip -u $ODL_PKG
123 123
 }
124 124
 
125
-# install_opendaylight-compute - Make sure OVS is install
125
+# install_opendaylight-compute - Make sure OVS is installed
126 126
 function install_opendaylight-compute {
127
-    local kernel_version
128
-    # Install deps
129
-    # FIXME add to ``files/apts/neutron``, but don't install if not needed!
130
-    if is_ubuntu; then
131
-        kernel_version=`cat /proc/version | cut -d " " -f3`
132
-        install_package make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version
133
-    elif is_fedora; then
134
-        install_package openvswitch
135
-        # Ensure that the service is started
136
-        restart_service openvswitch
137
-    elif is_suse; then
138
-        install_package openvswitch-switch
139
-        restart_service openvswitch-switch
140
-    fi
127
+    # packages are the same as for Neutron OVS agent
128
+    _neutron_ovs_base_install_agent_packages
141 129
 }
142 130
 
143 131
 # start_opendaylight() - Start running processes, including screen