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

wait for etcd to be ready before continuing with etcd api call #628

Merged
merged 2 commits into from
May 24, 2023

Conversation

aaronfern
Copy link
Contributor

@aaronfern aaronfern commented May 24, 2023

What this PR does / why we need it:
We notices that etcd backup restore does not wait for its corresponding etcd to be ready before making any etcd api call like UpdateMemberPeerURL which results in error in case of peerURL failed to get update with nonTLS -> TLS.

if err := m.UpdateMemberPeerURL(ctx, cli); err != nil {

This PR adds changes for etcd-backup-restore to wait for etcd to get ready before backup-restore try to update peerUrl for corresponding etcd.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

Backup-restore waits for its etcd to be ready before attempting to update peerUrl

@aaronfern aaronfern requested a review from a team as a code owner May 24, 2023 08:57
@gardener-robot gardener-robot added needs/review Needs review size/s Size of pull request is small (see gardener-robot robot/bots/size.py) labels May 24, 2023
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels May 24, 2023
@ishan16696
Copy link
Member

We notices that etcd backup restore does not wait for etcd to be ready before creating the MemberControl object as well as the LeaderElector object
This PR adds changes for etcd-backup-restore to wait for etcd to get ready before it can continue

I kindof disagree with the PR description ... please mention about the root cause this PR is solving which is when etcd is not up which make update PeerUrl api call fails.

@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels May 24, 2023
pkg/server/backuprestoreserver.go Outdated Show resolved Hide resolved
pkg/server/backuprestoreserver.go Outdated Show resolved Hide resolved
@ishan16696 ishan16696 changed the title wait for etcd to be ready before continuing with memberControl object… wait for etcd to be ready before continuing with etcd api call May 24, 2023
@ishan16696
Copy link
Member

Updated the PR description and release note, @aaronfern please check. hope that’s fine.

@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels May 24, 2023
@aaronfern
Copy link
Contributor Author

Thanks @ishan16696!
Description is very apt! I've also changed the release note slightly. Hope it still makes sense

Copy link
Contributor

@unmarshall unmarshall left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review labels May 24, 2023
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 24, 2023
Copy link
Contributor

@seshachalam-yv seshachalam-yv left a comment

Choose a reason for hiding this comment

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

/lgtm

@ishan16696 ishan16696 merged commit b3cb81c into gardener:master May 24, 2023
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label May 24, 2023
abdasgupta pushed a commit to abdasgupta/etcd-backup-restore that referenced this pull request May 25, 2023
…ner#628)

* wait for etcd to be ready before continuing with memberControl object creation

* address review comments
abdasgupta pushed a commit to abdasgupta/etcd-backup-restore that referenced this pull request May 25, 2023
…ner#628)

* wait for etcd to be ready before continuing with memberControl object creation

* address review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/s Size of pull request is small (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants