-
Notifications
You must be signed in to change notification settings - Fork 570
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
Display logmessage if two nodes run on different versions #8088
Display logmessage if two nodes run on different versions #8088
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.
You're not checking whether the node is your child/parent/...
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.
Just for testing:
Set the master version to 21204 and the sat one to 21102.
What happens?
a18b8ac
to
ae12f12
Compare
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 not checking whether the child runs a later version.
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 printing versions like 212. Print them like 2.12.x instead.
a61bc51
to
ccd0c98
Compare
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 have some duplicate code.
Make a (non-class) function above this one (prefix the function definition with the "static" keyword) taking an unsigned long
(e.g. 212) and a Log&
and writing "2.12.x" into the given Log&
.
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.
-
git reset --soft 3f22bebf2
-
git commit --amend --no-edit
-
git push -f origin bugfix/log-two-nodes-run-on-different-versions-8075
19be712
to
83567ab
Compare
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.
Write a test protocol.
Cover all valid cases and two invalid (too high/too low).
Testprotocol: Let us assume that the node is version 2.10.x and the master 2.12.x should then see a log message, because it is not allowed to use node that is 2 versions behind master. Version of Master
However, if the node has the same version as the master or is 1 version behind the master, we do not need a log message because it is allowed. The master can be 1 version before the node, but the node cannot be 1 version before the master. Version of Master
|
Uhm sorry not my expertise |
GCC bugs can occur, especially with older maintained versions. We should find a workaround to avoid the problem. |
This is likely #7149. |
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.
Rebase with -i. Keep only your commit.
7fe7c94
to
d5aebf8
Compare
d5aebf8
to
8eb4f2e
Compare
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.
Re-test #8088 (comment) (just to be sure).
Tested it and it works fine! [2021-01-11 08:51:25 +0100] information/ApiListener: Finished sending config file updates for endpoint 'satellite' in zone 'satellite'.
[2021-01-11 08:51:25 +0100] warning/ApiListener: Unexpected Icinga version of endpoint 'satellite': 2.10.x Expected one of: 2.12.x, 2.11.x |
resolves #8075