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 6.2] fix(nemesis-target-pool): set method attribute for target pool #9527

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Dec 10, 2024

Decorator disrupt_method_wrapper rewrites target node pool and always set Nemesis.target_node_pool as data_nodes. This cause that target node is chosen from cluster.data_nodes always. This happemed because we have decorators chain:
disrupt_method_wrapper -> target
(data/zero/all)nodes -> disrupt*

Target node is chosen in disrupt_method_wrapper, and any changes in target_*_pool does not affect of target node if it is run in complex nemesis as SisyphusMonkey and also has affect in parallel nemesis run

Set method attribute disrupt_*.target_pool for later use in decorator disrupt_method_wrapper, allows correctly set target pool for disrupt nemesis

Fixes: #9448

Used solution from pr: #9502

Testing

  • Test run . Job marked as failed because nemesis was terminated

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 69ad0dd)

Parent PR: #9517

Decorator `disrupt_method_wrapper` rewrites target node pool and
always set Nemesis._target_node_pool as data_nodes. This cause
that target node is chosen from cluster.data_nodes always.
This happemed because we have decorators chain:
disrupt_method_wrapper -> target_(data/zero/all)_nodes -> disrupt_*

Target node is chosen in `disrupt_method_wrapper`, and any changes in
target_*_pool does not affect of target node if it is run in complex
nemesis as SisyphusMonkey and also has affect in parallel nemesis run

Set method attribute disrupt_*.target_pool for later use in
decorator `disrupt_method_wrapper`, allows correctly set
target pool for disrupt nemesis

Using solution from PR: #9502 to store pool type instead of
cache of filtered nodes

(cherry picked from commit 69ad0dd)
@fruch fruch merged commit 6be2880 into branch-6.2 Dec 11, 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.

2 participants