-
Notifications
You must be signed in to change notification settings - Fork 17
Refine cluster start/stop policy #3914
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
base: main
Are you sure you want to change the base?
Conversation
|
The preview environment for this pull request is ready at 3914.prenv.trento.suse.com. |
nelsonkopliku
left a comment
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.
Hey @balanza thanks a lot!
Besides the inline comments what I am wondering is whether we can have some policy specific tests in the policy test and possibly simplify controller tests.
I am aware, though, that test arrangement would be actually very similar if not the same and what would change is the assertion.
| assert %{ | ||
| assigns: %{ | ||
| cluster: %{ | ||
| hosts: [host_data] | ||
| } | ||
| } | ||
| } = posted_conn | ||
|
|
||
| assert %{ | ||
| id: ^host_id, | ||
| database_instances: ^database_instances, | ||
| application_instances: ^application_instances, | ||
| cluster_id: ^cluster_id | ||
| } = host_data |
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.
question: this assertion should be true for all the operations available on a cluster host, correct?
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.
Yes.
Ideally, we might want to separate tests for any operation from tests specific to an operation, like in #3890.
I didn't have the spark to make this refactoring this time
Very same, but with more mocks :) |
nelsonkopliku
left a comment
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.
Hey @balanza thanks again!
I left a few more minor comments/questions, but in general I think we're there.
As long as @abravosuse has tested the latest changes in this PR and we have his green light as well, then let merge.
I am realizing that we might need to look for ways to improve testing different layers without having to actually duplicate test arrangement, but this is for another time.
After reviewing the scenarios, we decided that:
|
abravosuse
left a comment
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.
Based on the tests performed against different HANA clusters, it LGTM. See https://jira.suse.com/browse/TRNT-4044 for details.
fc1e8a6 to
3373fb2
Compare
In HANA cluster, allow secondary nodes to be started only when the primary is already online (and vice versa)