Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etcd: enable v2 support for various tests #216

Merged
merged 5 commits into from
Aug 25, 2021

Conversation

tormath1
Copy link
Contributor

@tormath1 tormath1 commented Aug 25, 2021

In this PR, we prepare the landing of flatcar-archive/coreos-overlay#1179 which brings etcd/v3 by default.

  • flannel does not support yet etcd/v3 so we enable v2 support
  • locksmith is WIP to support etcd/v3
  • cl.etcd-member.v2-backup-restore test the actual behavior of v2 backup so it requires v2 to be enabled

v2 support is done through this option: https://etcd.io/docs/v3.5/op-guide/configuration/#--enable-v2

Testing done

Tested against the current alpha and the image provided in flatcar-archive/coreos-overlay#1179 (arm64 in progress...)

sudo ./bin/kola run ... cl.etcd-member.v2-backup-restore cl.locksmith.cluster coreos.locksmith.tls cl.flannel.udp cl.flannel.vxlan

Mathieu Tortuyaux added 3 commits August 25, 2021 11:31
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 <mathieu@kinvolk.io>
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 <mathieu@kinvolk.io>
since we are testing v2 backup, we need to enable v2 support in case
we are running etcd v3.

Signed-off-by: Mathieu Tortuyaux <mathieu@kinvolk.io>
@tormath1 tormath1 requested a review from a team August 25, 2021 10:26
@tormath1 tormath1 self-assigned this Aug 25, 2021
@@ -113,7 +121,7 @@ func etcdMemberV2BackupRestore(c cluster.TestCluster) {

backup_to="$(mktemp -d)"

sudo etcdctl backup --data-dir=/var/lib/etcd \
sudo -E etcdctl backup --data-dir=/var/lib/etcd \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe limit it to just one env var?

Suggested change
sudo -E etcdctl backup --data-dir=/var/lib/etcd \
sudo --preserve-env=ETCD_ENABLE_V2 etcdctl backup --data-dir=/var/lib/etcd \

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, did not know that ! Thanks.

Mathieu Tortuyaux added 2 commits August 25, 2021 15:51
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 <mathieu@kinvolk.io>
`Error fetching backend: UDP backend is not supported on this
architecture`

Signed-off-by: Mathieu Tortuyaux <mathieu@kinvolk.io>
@tormath1 tormath1 merged commit 12b5a96 into flatcar-master Aug 25, 2021
@tormath1 tormath1 deleted the tormath1/fix-flannel-tests branch August 25, 2021 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants