-
Notifications
You must be signed in to change notification settings - Fork 83
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
fix(disrupt_terminate_and_replace_node): make it valid for gke #2810
Conversation
c9c1d12
to
eddb382
Compare
eddb382
to
701ce83
Compare
Congratulations 🎉. DeepCode analyzed your code in 2.434 seconds and we found no issues. Enjoy a moment of no bugs ☀️. 👉 View analysis in DeepCode’s Dashboard | Configure the bot |
a0bd52f
to
e3efc9e
Compare
sdcm/nemesis.py
Outdated
if isinstance(self.cluster, GkeScyllaPodCluster): | ||
terminate_method_name = random.choice(('terminate_k8s_host', 'terminate_k8s_node', 'terminate_node')) | ||
self.log.info(f"Terminate node via {terminate_method_name}") | ||
getattr(self.cluster, terminate_method_name)(self.target_node) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
break into two lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
sdcm/nemesis.py
Outdated
@@ -539,7 +540,12 @@ def _add_and_init_new_cluster_node(self, old_node_ip=None, timeout=HOUR_IN_SEC * | |||
return new_node | |||
|
|||
def _terminate_cluster_node(self, node): | |||
self.cluster.terminate_node(node) | |||
if isinstance(self.cluster, GkeScyllaPodCluster): | |||
terminate_method_name = random.choice(('terminate_k8s_host', 'terminate_k8s_node', 'terminate_node')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allow terminate_node for both GKE and Minikube, raise for all other methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
d964d9c
to
406883a
Compare
sdcm/cluster_gce.py
Outdated
@@ -77,6 +77,10 @@ def init(self): | |||
|
|||
super().init() | |||
|
|||
@property | |||
def instance_name(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create on the Base class too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to override it now...
406883a
to
2ba9a91
Compare
2ba9a91
to
6a8f466
Compare
This nemesis is currently failing on the GKE due to the scylla-operator issue - scylladb/scylla-operator#215
PR pre-checks (self review)
backport
labelsNew configuration option are added and documented (insdcm/sct_config.py
)I have added tests to cover my changes (Infrastructure only - underunit-test/
folder)I have updated the Readme/doc folder accordingly (if needed)