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

[Backport 2024.1] fix(kms): set proper node regions in multi-dc setups #9040

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Oct 23, 2024

The AWS-KMS code in DB node python class uses shared dictionary
from the DB cluster class for updating the KMS endpoint region.

It was not a problem when DB nodes setup was serial.
In this case shared object was changed by each node but had proper value in needed time frame.

After implementation of the parallel DB nodes setup (#7383)
we started getting problems that only one state of that shared object was being applied for all nodes.

In single-dc setups everything was correct just because there was no diff among DB node's region names.
But in multi-dc setups values from DB nodes started being applied to each other.

So, fix it by just deep-copying that shared dictionary to avoid updates of a shared object.

Closes: #9025

Testing

PR pre-checks (self review)

  • I added the relevant backport labels
  • I didn't leave commented-out/debugging code

Reminders

  • Add New configuration option and document them (in sdcm/sct_config.py)
  • Add unit tests to cover my changes (under unit-test/ folder)
  • Update the Readme/doc folder relevant to this change (if needed)

(cherry picked from commit ce56367)

Parent PR: #9026

The AWS-KMS code in DB node python class uses shared dictionary
from the DB cluster class for updating the KMS endpoint region.

It was not a problem when DB nodes setup was serial.
In this case shared object was changed by each node but had proper
value in needed time frame.

After implementation of the parallel DB nodes setup [1] we started
getting problems that only one state of that shared object was
being applied for all nodes.

In single-dc setups everything was correct just because there was no
diff among DB node's region names.
But in multi-dc setups values from DB nodes started being applied
to each other.

So, fix it by just deep-copying that shared dictionary to avoid
updates of a shared object.

[1] #7383

Closes: #9025
(cherry picked from commit ce56367)

# Conflicts:
#	sdcm/cluster.py
@mergify mergify bot added the conflicts label Oct 23, 2024
Copy link
Author

mergify bot commented Oct 23, 2024

Cherry-pick of ce56367 has failed:

On branch mergify/bp/branch-2024.1/pr-9026
Your branch is up to date with 'origin/branch-2024.1'.

You are currently cherry-picking commit ce56367bd.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   sdcm/cluster.py

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot marked this pull request as draft October 23, 2024 10:56
@vponomaryov
Copy link
Contributor

The fix is not required in the 2024.1 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant