From 926348fe2476051f9ca825916db333f81c0139b7 Mon Sep 17 00:00:00 2001 From: Hemachandra Reddy Date: Sun, 6 Oct 2019 16:40:51 +0000 Subject: [PATCH] Add DPDK check for readiness probe This change makes sure that "ovs-vsctl get Open_vSwitch . dpdk_initialized" is true before making the pod ready Change-Id: Ie88f74a1e7a84afb3fbca55b500009255b4f6991 --- openvswitch/templates/daemonset-ovs-vswitchd.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openvswitch/templates/daemonset-ovs-vswitchd.yaml b/openvswitch/templates/daemonset-ovs-vswitchd.yaml index 5ea8849fe..fe0dc4343 100644 --- a/openvswitch/templates/daemonset-ovs-vswitchd.yaml +++ b/openvswitch/templates/daemonset-ovs-vswitchd.yaml @@ -21,11 +21,19 @@ exec: - bond/list {{- end }} {{- define "ovsvswitchreadinessProbeTemplate" }} +{{- if not .Values.conf.ovs_dpdk.enabled }} exec: command: - /bin/bash - -c - - '! /usr/bin/ovs-vsctl show | grep -q error:' + - '/usr/bin/ovs-vsctl show' +{{- else }} +exec: + command: + - /bin/bash + - -c + - '/usr/bin/ovs-vsctl show && [ $(ovs-vsctl get Open_vSwitch . dpdk_initialized) == true ]' +{{- end }} {{- end }} {{- if .Values.manifests.daemonset_ovs_vswitchd }}