-
Notifications
You must be signed in to change notification settings - Fork 357
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 server state incorrectly reported #987
Conversation
@rubenvp8510 can you review? |
@miq-bot add_label middleware |
@israel-hdez from what I can tell, the BZ is upstream only, so I labeled as |
@dclarizio why do you think the BZ is upstream only? |
@israel-hdez so the "Calculated" is coming from metrics? what if both are non empty? is it correct to take the first one? |
Not sure, I would think any upstream bugs would at least go back to Fine release. Maybe check with the reporter to see if they forgot to set the release field. |
@abonas Indeed, both values should be non empty most times. The "Calculated" is a combination of the availability metric and the state reported by inventory ("Server State"):
I understand that the UI is provider generic, so I kept both fields. This way, if some other middleware provider doesn't need to "calculate" the server status, it can just fill the "server status". But given that right now, hawkular is the only middleware provider, it will always take the first value. If this is noisy, I can just keep the "calculated" one. |
@israel-hdez can you put a short comment in the git commit that will explain what you explained so greatly above? your comment here won't be part of git log, so I'd like the explanation to be captured for whoever looks at the code and the commit why it is written that way. |
@miq-bot add_label fine/yes |
@miq-bot remove_label fine/no |
@israel-hdez @abonas re-ping me when the commit message is changed as this looks ready for merge. |
Hawkular's provider was reporting server state based only on inventory data, which is misleading when server is down. To fix this, a "calculated" field is added to the properties. The availability metric of the server is used to determine what value will have the "calculated" field: - When the availability metric reports that the server is "up", the "calculated" field will mirror the "Server State" field. - If the availability metric reports something else than "up", the "calculated" field will mirror the value of the availability metric. Hawkular provider will always fill the "calculated" field, and the UI will always show its value. If some other middleware provider does not need to use a "calculated" server status, it can leave it unassigned and the UI will show the "Server Satus" field. https://bugzilla.redhat.com/show_bug.cgi?id=1438816
Checked commit israel-hdez@29e5626 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@dclarizio The comment of the git commit is in place. Now, you can merge. |
Fix server state incorrectly reported (cherry picked from commit 9a70448)
Fine backport details:
|
Server state was being reported based only on inventory data. This will
report server state based on a combination of inventory data and
availability metrics, if EMS/provider features it.
https://bugzilla.redhat.com/show_bug.cgi?id=1438816
This PR goes together with ManageIQ/manageiq-providers-hawkular#6. Merge order is not important and is not required to merge simultaneously.
When server is running, inventory state is reported:
When server is down, availability metric state is reported: