diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 8edd9af847..9d2556edb5 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -403,6 +403,10 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install azure- sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install watchdog==0.10.3 {% if include_kubernetes == "y" %} +# Copy Flannel conf file into sonic-templates +# +sudo cp $BUILD_TEMPLATES/kube_cni.10-flannel.conflist $FILESYSTEM_ROOT_USR_SHARE_SONIC_TEMPLATES/ + # Install remote Container mgmt package # Required even if include_kubernetes != y, as it contains the # the container wrapper for docker start/stop/wait commands. diff --git a/src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py b/src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py index ba4f0057bd..49c11d2781 100755 --- a/src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py +++ b/src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py @@ -201,7 +201,7 @@ class MainServer: """ Modify entry for given table|key with given dict type data """ conn = self.db_connectors[db_name] tbl = swsscommon.Table(conn, table_name) - print("mod_db_entry: db={} tbl={} key={} data={}".format(db_name, table_name, key, str(data))) + log_debug("mod_db_entry: db={} tbl={} key={} data={}".format(db_name, table_name, key, str(data))) tbl.set(key, list(data.items())) @@ -242,7 +242,7 @@ class MainServer: if not UNIT_TESTING: raise Exception("Received error from select") else: - print("Skipped Exception; Received error from select") + log_debug("Skipped Exception; Received error from select") return for subscriber in self.subscribers: @@ -588,7 +588,7 @@ def main(): FeatureTransitionHandler(server) LabelsPendingHandler(server) server.run() - print("ctrmgrd.py main called") + log_debug("ctrmgrd.py main called") return 0 diff --git a/src/sonic-ctrmgrd/ctrmgr/kube_commands.py b/src/sonic-ctrmgrd/ctrmgr/kube_commands.py index 1ebfa606f0..db8cb348fc 100755 --- a/src/sonic-ctrmgrd/ctrmgr/kube_commands.py +++ b/src/sonic-ctrmgrd/ctrmgr/kube_commands.py @@ -22,6 +22,8 @@ KUBE_ADMIN_CONF = "/etc/sonic/kube_admin.conf" KUBELET_YAML = "/var/lib/kubelet/config.yaml" SERVER_ADMIN_URL = "https://{}/admin.conf" LOCK_FILE = "/var/lock/kube_join.lock" +FLANNEL_CONF_FILE = "/usr/share/sonic/templates/kube_cni.10-flannel.conflist" +CNI_DIR = "/etc/cni/net.d" # kubectl --kubeconfig label nodes #