Fix multus configuration bug
If we use kubespray install, then 10-calico.conflist didn't have etcd
information, so we should use the original multus, not create by
ourselves.
Change-Id: Ib29fcce0901d222177fbc8c9cefbd2395a64fe7c
diff --git a/mcord/cni-config/04-sriov-device-plugin-configmap.yaml b/mcord/cni-config/04-sriov-device-plugin-configmap.yaml
index 591d971..a5f9d20 100644
--- a/mcord/cni-config/04-sriov-device-plugin-configmap.yaml
+++ b/mcord/cni-config/04-sriov-device-plugin-configmap.yaml
@@ -50,9 +50,10 @@
current-context: multus-context
EOF
install-multus-conf.sh: |
- # To keep the original config installed by default (e.g. multus-daemonset)
- if [ ! -f /host/etc/cni/net.d/00-multus.conf.original ]; then
- mv /host/etc/cni/net.d/00-multus.conf /host/etc/cni/net.d/00-multus.conf.original;
+ # If multus config is already exist on nodes (e.g. from kubespray installation)
+ # Then we don't need to create one by the script.
+ if [ -f /host/etc/cni/net.d/00-multus.conf ]; then
+ exit 0;
fi
# Select the mainly CNI plugin's configuration and insert into multus's config