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

Modify URL parsing for advertise-urls used by etcd sidecar #715

Merged
merged 11 commits into from
Nov 13, 2024

Conversation

anveshreddy18
Copy link
Contributor

@anveshreddy18 anveshreddy18 commented Feb 27, 2024

What this PR does / why we need it:

This PR modifies the parsing logic for the etcd config parameters initial-advertise-peer-urls and advertise-client-urls as the druid PR #812 now uses proper URLs for these flags instead of @ as separator currently being used.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

The etcd configuration parameters `initial-advertise-peer-urls` and `advertise-client-urls` now accept a structured YAML format where URLs are listed per etcd instance. This replaces the previous unstructured string format with `@` as a separator. Existing configurations must be updated to match this new format. To know the new format in detail, check the example config file at `pkg/miscellaneous/testdata/valid_config.yaml`

@anveshreddy18 anveshreddy18 requested a review from a team as a code owner February 27, 2024 11:39
@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 Feb 27, 2024
@anveshreddy18 anveshreddy18 added kind/enhancement Enhancement, improvement, extension area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/cleanup Something that is not needed anymore and can be cleaned up and removed size/s Size of pull request is small (see gardener-robot robot/bots/size.py) labels Feb 27, 2024
@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 Feb 27, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added 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 Feb 27, 2024
@anveshreddy18 anveshreddy18 self-assigned this Feb 27, 2024
@shreyas-s-rao shreyas-s-rao added this to the v0.30.0 milestone Mar 26, 2024
@anveshreddy18 anveshreddy18 modified the milestones: v0.30.0, v0.31.0 Aug 21, 2024
@gardener-robot gardener-robot added the size/s Size of pull request is small (see gardener-robot robot/bots/size.py) label Sep 2, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 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 Sep 2, 2024
@anveshreddy18 anveshreddy18 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 needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Sep 9, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added 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 Sep 9, 2024
@anveshreddy18 anveshreddy18 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 Sep 11, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 removed 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 Sep 11, 2024
Copy link
Member

@renormalize renormalize left a comment

Choose a reason for hiding this comment

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

Thanks for your PR @anveshreddy18!

I'm personally not a fan of regular expressions so I've suggested a different way of doing it in my review. If you don't have any objections and think this method is clearer, please go ahead and adapt these changes to the two functions that are using regex.

Thanks.

pkg/miscellaneous/miscellaneous.go Outdated Show resolved Hide resolved
@gardener-robot gardener-robot added the needs/changes Needs (more) changes label Sep 12, 2024
@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 Sep 24, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed 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 Sep 24, 2024
Copy link
Member

@ishan16696 ishan16696 left a comment

Choose a reason for hiding this comment

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

few nits

pkg/member/member_control.go Outdated Show resolved Hide resolved
pkg/member/member_control.go Outdated Show resolved Hide resolved
pkg/miscellaneous/miscellaneous.go Show resolved Hide resolved
pkg/miscellaneous/miscellaneous.go Show resolved Hide resolved
@ishan16696
Copy link
Member

@anveshreddy18 please also resolves the merge conflicts.

@gardener-robot gardener-robot added needs/second-opinion Needs second review by someone else and removed reviewed/lgtm Has approval for merging labels Nov 8, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 removed 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 Nov 8, 2024
pkg/miscellaneous/miscellaneous.go Outdated Show resolved Hide resolved
@ishan16696
Copy link
Member

Is backup-restore parsing of config-map backward compatible ?
Will new configmap works if it's given to older backup-restore version ?

@anveshreddy18
Copy link
Contributor Author

Is backup-restore parsing of config-map backward compatible ?
Will new configmap works if it's given to older backup-restore version ?

It won't, in one of the meets between me, Sesha & Madhav, we decided to upgrade & downgrade druid along with the compatiable backup-restore versions. So if we have to downgrade backup-restore, then we need to downgrade etcd-druid as well. I hope this is fine as we do not downgrade as much and even if we do in rare case, we can downgrade both of them combined.

@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 Nov 11, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed 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 Nov 11, 2024
@ishan16696
Copy link
Member

ishan16696 commented Nov 11, 2024

currently the edge case which we found in our production can also affect this feature of updating the config-map, let me explain:

  1. etcd-druid updates the config map with new changes.
  2. One pod is already down due to some reason, druid waits until all pods become ready.
  3. Pod comes up with older backup-restore version and tries to parse the config map but config map has been updated, so backup-restore will fails

so, it's no longer about downgrading the druid, it can affect the upgrading as well.

@ishan16696
Copy link
Member

currently the edge case which we found in our production can also affect this feature of updating the config-map, let me explain:
etcd-druid updates the config map with new changes.
One pod is already down due to some reason, druid waits until all pods become ready.
Pod comes up with older backup-restore version and tries to parse the config map but config map has been updated, so backup-restore will fails
so, it's no longer about downgrading the druid, it can affect the upgrading as well.

Regarding this @anveshreddy18 and I had a call and we found that this case may not be possible but we need test this or any other edge case on similar line of thought.

Copy link
Member

@ishan16696 ishan16696 left a comment

Choose a reason for hiding this comment

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

LGTM!!

@anveshreddy18 anveshreddy18 merged commit f508408 into gardener:master Nov 13, 2024
9 checks passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Nov 13, 2024
@renormalize renormalize modified the milestones: v0.31.0, v0.32.0 Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/cleanup Something that is not needed anymore and can be cleaned up kind/enhancement Enhancement, improvement, extension needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/second-opinion Needs second review by someone else size/l Size of pull request is large (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.

9 participants