-
Notifications
You must be signed in to change notification settings - Fork 15
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
Make discovery payload nullable in schema #2638
Conversation
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.
If it is possible to have a PR environment for this, I will test the corresponding image. If not, I approve it now and will test in rolling once merged.
PR env on the way! |
It looks good, maybe I'm saying something really weird but shouldn't we also apply some kind of check in the agent to guard against sending Anyway, if it's just a matter of adding a |
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.
LGTM
But sending |
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.
You're right @arbulu89, no other questions 👍
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.
I've tested this with the PR environment. Now I don't see errors in the agent journal. What I see is the following:
May 20 13:32:05 vmnwhso01 trento-agent[2238]: time="2024-05-20 13:32:05" level=info msg="ha_cluster_discovery discovery tick output: No HA cluster discovered on this host"
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.
Nice catch @arbulu89 @abravosuse ! LGTM
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.
👍
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/comment : If I understood this PR correctly OpenAPI 3.1 has no support for nullable
. However, I am not sure to what version of the OpenAPI spec the elixir library implementation (open-api-spex
; we are using version 3.11 of this library) maintains conformance. Something that needs further looking into, perhaps ?
By now it is compliant to |
Description
Make discovery payload nullable in schema.
This field can be null when for example a host doesn't have a cluster installed.
This bug affects the scenario when a cluster node is removed from the cluster, because we wouldn't remove it properly as the discovery fails. This is unlikely scenario. But it happens.
Besides that, we remove an "wrong" error log in the agent side.
This error in the agent:
FYI: @abravosuse
How was this tested?
Test added