openvswitch not required to be kernel module

Change-Id: I2845230ad34e4a1463dd373302e3d720e0d311e3
Closes-Bug: 1693011
This commit is contained in:
Andrew Bruce 2017-05-24 17:03:39 -04:00 committed by Kevin Fox
parent 9449530b7a
commit b74926e7ea
1 changed files with 12 additions and 0 deletions

View File

@ -10,6 +10,10 @@
{{- $_ := set $c1 "retDict" $localVals }}
{{- $_ := set $c1 "retKey" "openvswitch_tcp" }}
{{- $_ := include "kolla_val_get_raw" $c1 }}
{{- $c2 := dict "key" "openvswitch_no_kernel_module" "searchPath" $searchPath "Values" .Values }}
{{- $_ := set $c2 "retDict" $localVals }}
{{- $_ := set $c2 "retKey" "openvswitch_no_kernel_module" }}
{{- $_ := include "kolla_val_get_raw" $c2 }}
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" $searchPath "Values" .Values ) }}
{{- $containerConfigDirectory := include "kolla_val_get_str" (dict "key" "container_config_directory" "searchPath" $searchPath "Values" .Values ) }}
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" $searchPath "Values" .Values ) }}
@ -80,9 +84,17 @@ spec:
"/bin/sh",
"-c",
"chown --recursive neutron.kolla /var/log/kolla;
{{- if $localVals.openvswitch_no_kernel_module }}
echo Waiting for openvswitch to be available;
{{- else }}
echo Waiting for openvswitch kernel module to load;
{{- end }}
while true; do
{{- if $localVals.openvswitch_no_kernel_module }}
loaded=$(timeout 5s ovs-vsctl show >/dev/null 2>&1 && echo 1 || echo 0);
{{- else }}
loaded=$(lsmod | grep openvswitch | wc -l);
{{- end }}
[ $loaded -ne 0 ] && break;
sleep 1;
done;