Merge "Update ovs dpdk config when required"
This commit is contained in:
commit
6a8e6e9a35
@ -329,9 +329,27 @@ function process_dpdk_bonds {
|
|||||||
fi
|
fi
|
||||||
done < /tmp/nics_array
|
done < /tmp/nics_array
|
||||||
|
|
||||||
|
if [ "${UPDATE_DPDK_BOND_CONFIG}" == "true" ]; then
|
||||||
|
echo -e "NOTE: UPDATE_DPDK_BOND_CONFIG is set to true.\
|
||||||
|
\nThis might cause disruptions in ovs traffic.\
|
||||||
|
\nTo avoid this disruption set UPDATE_DPDK_BOND_CONFIG to false."
|
||||||
|
ovs-vsctl --db=unix:${OVS_SOCKET} set Bridge "${dpdk_bridge}" other_config:update_config=true
|
||||||
|
ovs_update_config=true
|
||||||
|
else
|
||||||
|
ovs_update_config=$(ovs-vsctl --columns=other_config --no-heading -d json list bridge "${dpdk_bridge}" \
|
||||||
|
| jq -r '.[1][] as $list | if $list[0] == "update_config" then $list[1] else empty end')
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ "${ovs_update_config}" == "true" ] || [ "${ovs_update_config}" == "" ];
|
||||||
|
then
|
||||||
|
ovs-vsctl --db=unix:${OVS_SOCKET} --if-exists del-port "${bond_name}"
|
||||||
|
ovs-vsctl --db=unix:${OVS_SOCKET} set Bridge "${dpdk_bridge}" other_config:update_config=false
|
||||||
ovs-vsctl --db=unix:${OVS_SOCKET} --may-exist add-bond "${dpdk_bridge}" "${bond_name}" \
|
ovs-vsctl --db=unix:${OVS_SOCKET} --may-exist add-bond "${dpdk_bridge}" "${bond_name}" \
|
||||||
${nic_name_str} \
|
${nic_name_str} \
|
||||||
"${ovs_options}" ${dev_args_str}
|
"${ovs_options}" ${dev_args_str}
|
||||||
|
fi
|
||||||
|
|
||||||
done < "/tmp/bonds_array"
|
done < "/tmp/bonds_array"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,6 +277,7 @@ data:
|
|||||||
rootwrap.conf: {{ $envAll.Values.conf.rootwrap | b64enc }}
|
rootwrap.conf: {{ $envAll.Values.conf.rootwrap | b64enc }}
|
||||||
auto_bridge_add: {{ toJson $envAll.Values.conf.auto_bridge_add | b64enc }}
|
auto_bridge_add: {{ toJson $envAll.Values.conf.auto_bridge_add | b64enc }}
|
||||||
dpdk.conf: {{ toJson $envAll.Values.conf.ovs_dpdk | b64enc }}
|
dpdk.conf: {{ toJson $envAll.Values.conf.ovs_dpdk | b64enc }}
|
||||||
|
update_dpdk_bond_config: {{ $envAll.Values.conf.ovs_dpdk.update_dpdk_bond_config | toString | b64enc }}
|
||||||
{{- if .Values.manifests.certificates }}
|
{{- if .Values.manifests.certificates }}
|
||||||
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.mpm_event "key" "mpm_event.conf" "format" "Secret" ) | indent 2 }}
|
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.mpm_event "key" "mpm_event.conf" "format" "Secret" ) | indent 2 }}
|
||||||
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.wsgi_neutron_server "key" "wsgi-server.conf" "format" "Secret" ) | indent 2 }}
|
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.wsgi_neutron_server "key" "wsgi-server.conf" "format" "Secret" ) | indent 2 }}
|
||||||
|
@ -104,6 +104,14 @@ spec:
|
|||||||
{{ tuple $envAll "neutron_openvswitch_agent" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "neutron_openvswitch_agent" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
{{ tuple $envAll $envAll.Values.pod.resources.agent.ovs | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
{{ tuple $envAll $envAll.Values.pod.resources.agent.ovs | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
{{ dict "envAll" $envAll "application" "neutron_ovs_agent" "container" "neutron_ovs_agent_init" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
{{ dict "envAll" $envAll "application" "neutron_ovs_agent" "container" "neutron_ovs_agent_init" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
||||||
|
{{- if .Values.conf.ovs_dpdk.enabled }}
|
||||||
|
env:
|
||||||
|
- name: UPDATE_DPDK_BOND_CONFIG
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: neutron-ovs-agent-default
|
||||||
|
key: update_dpdk_bond_config
|
||||||
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- /tmp/neutron-openvswitch-agent-init.sh
|
- /tmp/neutron-openvswitch-agent-init.sh
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
@ -2105,6 +2105,12 @@ conf:
|
|||||||
# because additional parameters are needed
|
# because additional parameters are needed
|
||||||
ovs_dpdk:
|
ovs_dpdk:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
# setting update_dpdk_bond_config to true will have default behavior,
|
||||||
|
# which may cause disruptions in ovs dpdk traffic in case of neutron
|
||||||
|
# ovs agent restart or when dpdk nic/bond configurations are changed.
|
||||||
|
# Setting this to false will configure dpdk in the first run and
|
||||||
|
# disable nic/bond config on event of restart or config update.
|
||||||
|
update_dpdk_bond_config: true
|
||||||
driver: uio_pci_generic
|
driver: uio_pci_generic
|
||||||
# In case bonds are configured, the nics which are part of those bonds
|
# In case bonds are configured, the nics which are part of those bonds
|
||||||
# must NOT be provided here.
|
# must NOT be provided here.
|
||||||
|
Loading…
Reference in New Issue
Block a user