Skip to content

etcdctl: use v3#213

Merged
tormath1 merged 4 commits intoflatcar-masterfrom
tormath1/fix-etcd-v3
Aug 24, 2021
Merged

etcdctl: use v3#213
tormath1 merged 4 commits intoflatcar-masterfrom
tormath1/fix-etcd-v3

Conversation

@tormath1
Copy link
Copy Markdown
Contributor

@tormath1 tormath1 commented Aug 20, 2021

Most of the tests rely on etcd and use the GetClusterHealth method to ensure the etcd cluster is up and running. In this PR; we upgraded etcd and it seems now the default etcdctl version is V3.

It should fix the following tests:

  • cl.etcd-member.discovery
  • cl.etcd-member.v2-backup-restore
  • google.kubernetes.basic.docker.v1.18.0
  • google.kubernetes.basic.docker.v1.16.8
  • google.kubernetes.basic.docker.v1.14.10
  • cl.locksmith.cluster
  • coreos.locksmith.tls
  • cl.etcd-member.etcdctlv3
  • kubeadm.*

Note for the reviewers

I first attended to support both v2/v3 but it becomes quickly an unmaintainable mess - so I removed the setKeys / checkKeys from the cl.etcd-member.discovery. REST APIs from v2 to v3 are not the same at all + v3 APIs between 3.3.35 (current etcd version that we ship) and 3.5 does not have the same prefix neither... Since this check is quite redundant with the others who are using etcdctl directly we can safely remove it.

How to use

sudo ./bin/kola run --board arm64-usr qemu --qemu-image flatcar_production_image.bin --qemu-bios flatcar_production_qemu_uefi_efi_code.fd cl.etcd-member.discovery ...

Testing done

@tormath1 tormath1 self-assigned this Aug 20, 2021
Signed-off-by: Mathieu Tortuyaux <mathieu@kinvolk.io>
@tormath1 tormath1 force-pushed the tormath1/fix-etcd-v3 branch from 5020554 to a47e9da Compare August 23, 2021 12:44
@tormath1 tormath1 changed the title [wip] etcd: support v2 and v3 [wip] etcd: use v3 Aug 23, 2021
@tormath1 tormath1 force-pushed the tormath1/fix-etcd-v3 branch from a47e9da to 9b0e064 Compare August 23, 2021 15:53
we currently ship etcdctl/v3 but it defaults to v2 so now we explicit
require to use v3

Signed-off-by: Mathieu Tortuyaux <mathieu@kinvolk.io>
@tormath1 tormath1 force-pushed the tormath1/fix-etcd-v3 branch from 9b0e064 to 0277ef6 Compare August 23, 2021 16:24
Mathieu Tortuyaux added 2 commits August 24, 2021 10:52
this check is quite redundant with the other tests - beside it heavily relies
on V2 HTTP api which is quite painful to maintain accross the various
version of etcd.

Signed-off-by: Mathieu Tortuyaux <mathieu@kinvolk.io>
Signed-off-by: Mathieu Tortuyaux <mathieu@kinvolk.io>
@tormath1 tormath1 requested a review from a team August 24, 2021 09:56
@tormath1 tormath1 changed the title [wip] etcd: use v3 etcd: use v3 Aug 24, 2021
@tormath1 tormath1 changed the title etcd: use v3 etcdctl: use v3 Aug 24, 2021
@tormath1 tormath1 marked this pull request as ready for review August 24, 2021 09:56
@tormath1 tormath1 merged commit cd2ed54 into flatcar-master Aug 24, 2021
@tormath1 tormath1 deleted the tormath1/fix-etcd-v3 branch August 24, 2021 12:16
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