From 5ce1a6451d59eabf77b0e9f8d4097d4b5b7f5d91 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 25 Aug 2021 11:29:25 +0200 Subject: [PATCH 1/5] kola/test/flannel: fix etcd version to V2 with the upgrade to etcd/v3 by default, `flannel` tests are failing because it does not support etcd/v3 at the moment. we pin the `etcdctl` version to `V2` and run `etcd-member` with `v2` support. Signed-off-by: Mathieu Tortuyaux --- kola/tests/flannel/flannel.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/kola/tests/flannel/flannel.go b/kola/tests/flannel/flannel.go index c69ad4d08..f565bc64c 100644 --- a/kola/tests/flannel/flannel.go +++ b/kola/tests/flannel/flannel.go @@ -54,7 +54,16 @@ systemd: - name: 50-network-config.conf contents: | [Service] - ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{ \"Network\": \"10.254.0.0/16\", \"Backend\": {\"Type\": \"$type\"} }'`) + # to be changed when flannel will support etcd/V3 + Environment=ETCDCTL_API=2 + ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{ \"Network\": \"10.254.0.0/16\", \"Backend\": {\"Type\": \"$type\"} }' + - name: etcd-member.service + enabled: true + dropins: + - name: 10-enable-v2.conf + contents: | + [Service] + Environment=ETCD_ENABLE_V2=true`) ) func init() { From 5b6da9c82d378f3d88c442a268d578843ec3a5ce Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 25 Aug 2021 11:43:29 +0200 Subject: [PATCH 2/5] kola/test/locksmith: enable etcd v2 with the upgrade to etcd/v3, locksmith still relies on etcd/v2. While `locksmith` is being upgraded, we enable the `etcd` v2 support. Signed-off-by: Mathieu Tortuyaux --- kola/tests/locksmith/locksmith.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/kola/tests/locksmith/locksmith.go b/kola/tests/locksmith/locksmith.go index 37da4d157..8dc914466 100644 --- a/kola/tests/locksmith/locksmith.go +++ b/kola/tests/locksmith/locksmith.go @@ -44,7 +44,16 @@ etcd: advertise_client_urls: http://{PRIVATE_IPV4}:2379 initial_advertise_peer_urls: http://{PRIVATE_IPV4}:2380 listen_peer_urls: http://{PRIVATE_IPV4}:2380 - discovery: $discovery`), + discovery: $discovery +systemd: + units: + - name: etcd-member.service + enabled: true + dropins: + - name: 10-enable-v2.conf + contents: | + [Service] + Environment=ETCD_ENABLE_V2=true`), Distros: []string{"cl"}, ExcludePlatforms: []string{"qemu-unpriv"}, }) @@ -70,7 +79,7 @@ etcd: "name": "etcd-member.service", "dropins": [{ "name": "environment.conf", - "contents": "[Unit]\nAfter=certgen.service\nRequires=certgen.service\n[Service]\nEnvironment=ETCD_ADVERTISE_CLIENT_URLS=https://127.0.0.1:2379\nEnvironment=ETCD_LISTEN_CLIENT_URLS=https://127.0.0.1:2379\nEnvironment=ETCD_CERT_FILE=/etc/ssl/certs/etcd-cert.pem\nEnvironment=ETCD_KEY_FILE=/etc/ssl/certs/etcd-key.pem\nEnvironment=ETCD_TRUSTED_CA_FILE=/etc/ssl/certs/ca-locksmith-cert.pem\nEnvironment=ETCD_CLIENT_CERT_AUTH=true" + "contents": "[Unit]\nAfter=certgen.service\nRequires=certgen.service\n[Service]\nEnvironment=ETCD_ADVERTISE_CLIENT_URLS=https://127.0.0.1:2379\nEnvironment=ETCD_LISTEN_CLIENT_URLS=https://127.0.0.1:2379\nEnvironment=ETCD_CERT_FILE=/etc/ssl/certs/etcd-cert.pem\nEnvironment=ETCD_KEY_FILE=/etc/ssl/certs/etcd-key.pem\nEnvironment=ETCD_TRUSTED_CA_FILE=/etc/ssl/certs/ca-locksmith-cert.pem\nEnvironment=ETCD_CLIENT_CERT_AUTH=true\nEnvironment=ETCD_ENABLE_V2=true" }] }, { From f2d71d76fce67a4bbd67d2c47e2d1e1e2ae366ec Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 25 Aug 2021 12:01:54 +0200 Subject: [PATCH 3/5] kola/test/etcd: enable v2 for testing backup since we are testing v2 backup, we need to enable v2 support in case we are running etcd v3. Signed-off-by: Mathieu Tortuyaux --- kola/tests/etcd/discovery.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kola/tests/etcd/discovery.go b/kola/tests/etcd/discovery.go index cd40aa043..7e6120c22 100644 --- a/kola/tests/etcd/discovery.go +++ b/kola/tests/etcd/discovery.go @@ -53,7 +53,15 @@ etcd: listen_peer_urls: http://0.0.0.0:2380 initial_advertise_peer_urls: http://{PRIVATE_IPV4}:2380 discovery: $discovery -`), +systemd: + units: + - name: etcd-member.service + enabled: true + dropins: + - name: 10-enable-v2.conf + contents: | + [Service] + Environment=ETCD_ENABLE_V2=true`), ExcludePlatforms: []string{"esx", "qemu-unpriv"}, // etcd-member requires ct rendering and networking Distros: []string{"cl"}, }) From 5e71160b7babf3891ca300c7854d38f36f377ae0 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 25 Aug 2021 12:03:41 +0200 Subject: [PATCH 4/5] kola/test/discovery: use etcdctl/v2 in sudo mode if we don't provide the `--preserve-env` flag, we do not preserve the environment variable `ETCDCTL_API` in sudo mode. `backup` is ran against `etcdctl` v3 which does not know this command. Signed-off-by: Mathieu Tortuyaux --- kola/tests/etcd/discovery.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kola/tests/etcd/discovery.go b/kola/tests/etcd/discovery.go index 7e6120c22..295b35400 100644 --- a/kola/tests/etcd/discovery.go +++ b/kola/tests/etcd/discovery.go @@ -121,7 +121,7 @@ func etcdMemberV2BackupRestore(c cluster.TestCluster) { backup_to="$(mktemp -d)" - sudo etcdctl backup --data-dir=/var/lib/etcd \ + sudo --preserve-env=ETCDCTL_API etcdctl backup --data-dir=/var/lib/etcd \ --backup-dir "${backup_to}" etcdctl rm /$prefix/test From 9eb5b3334c908168d91c4c5d4fed4d4d8749b9ad Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 25 Aug 2021 13:40:12 +0200 Subject: [PATCH 5/5] kola/test/flannel: UDP is not supported on ARM64 `Error fetching backend: UDP backend is not supported on this architecture` Signed-off-by: Mathieu Tortuyaux --- kola/tests/flannel/flannel.go | 1 + 1 file changed, 1 insertion(+) diff --git a/kola/tests/flannel/flannel.go b/kola/tests/flannel/flannel.go index f565bc64c..29609cfd7 100644 --- a/kola/tests/flannel/flannel.go +++ b/kola/tests/flannel/flannel.go @@ -74,6 +74,7 @@ func init() { Distros: []string{"cl"}, ExcludePlatforms: []string{"qemu-unpriv"}, UserData: flannelConf.Subst("$type", "udp"), + Architectures: []string{"amd64"}, }) register.Register(®ister.Test{