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.2] fix(kms): set proper node regions in multi-dc setups #9041

Merged
merged 1 commit into from
Oct 23, 2024

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)
@vponomaryov vponomaryov merged commit ddca9d7 into branch-2024.2 Oct 23, 2024
7 checks passed
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.

1 participant