From 6e7516c48a01e8664ce4a0c6f98a36cbcc42cf71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Beims=20Br=C3=A4scher?= Date: Thu, 4 Mar 2021 06:19:24 -0300 Subject: [PATCH 1/2] kvm: Fix get_bridge_physdev where it returns "device:" instead of just "device" (#4740) When running get_bridge_physdev(brname) from security_group.py it is returned the bridge device as brname: instead of the expected brname. We experienced this issue on CloudStack 4.13.1.0 with Security Groups enabled for Advanced Networking. Additionally, KVM nodes are running on Ubuntu 18.04. PR #4303 (merged in 4.15) added support for Ubuntu 20.04 which turned out to fix get_bridge_physdev(brname); however, we faced the very same issue with the previous CloudStack and Ubuntu versions. Even though we might not get a 4.13.2, and CloudStack 4.14.1.0 has just been released, this PR proposes merging the fix into branch 4.13 and then get it forwarded into 4.14. Thus, allowing users to have this fix referenced and also opening the possibility of addressing this in case of a potential 4.14.2.0. --- scripts/vm/network/security_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vm/network/security_group.py b/scripts/vm/network/security_group.py index 1cb4a84b525..21f6f7e9210 100755 --- a/scripts/vm/network/security_group.py +++ b/scripts/vm/network/security_group.py @@ -149,7 +149,7 @@ def split_ips_by_family(ips): def get_bridge_physdev(brname): - physdev = execute("bridge -o link show | awk '/master %s / && !/^[0-9]+: vnet/ {print $2}' | head -1" % brname) + physdev = execute("bridge -o link show | awk '/master %s / && !/^[0-9]+: vnet/ {print $2}' | head -1 | cut -d ':' -f1" % brname) return physdev.strip() From f893c5c0e3864c6d04e8255fd819304b7c66aa8a Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 4 Mar 2021 15:00:41 +0530 Subject: [PATCH 2/2] cks: fix token TTL, set it to never expire (#4747) Signed-off-by: Abhishek Kumar --- .../kubernetes-service/src/main/resources/conf/k8s-master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-master.yml b/plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-master.yml index 14828578ed8..db7d7530ed8 100644 --- a/plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-master.yml +++ b/plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-master.yml @@ -204,7 +204,7 @@ write-files: fi retval=0 set +e - kubeadm init --token {{ k8s_master.cluster.token }} {{ k8s_master.cluster.initargs }} + kubeadm init --token {{ k8s_master.cluster.token }} --token-ttl 0 {{ k8s_master.cluster.initargs }} retval=$? set -e if [ $retval -eq 0 ]; then