-
Notifications
You must be signed in to change notification settings - Fork 309
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
NAS-131326 / 25.04 / Simplify HA upgrade logic + NAS-131325: system.reboot.info
and failover.reboot.info
methods and events
#10744
base: master
Are you sure you want to change the base?
Conversation
system.reboot.info
and failover.reboot.info
methods and eventssystem.reboot.info
and failover.reboot.info
methods and events
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #10744 +/- ##
==========================================
+ Coverage 82.04% 82.20% +0.15%
==========================================
Files 1616 1617 +1
Lines 57001 56987 -14
Branches 5894 5900 +6
==========================================
+ Hits 46767 46844 +77
+ Misses 10234 10143 -91 ☔ View full report in Codecov by Sentry. |
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.
Code looks OK. I am getting the notification but a few points should be addressed
- I expected the dialog to be centered and follow the styles of webui's typical dialogs. However, it was stuck to the top right corner and looks weird.
- I expected there to be a "Reboot" button on the dialog itself that I can click and reboot right away. There's no action buttons on the notification dialog.
- The title can say "Reboot required" instead of "Reboot Info"
@@ -39,8 +39,19 @@ | |||
|
|||
<ix-truecommand-button></ix-truecommand-button> | |||
|
|||
@if (hasRebootRequiredReasons) { |
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.
We can make hasRebootRequiredReasons
a signal.
export const rebootInfoLoaded = createAction( | ||
'[Reboot Info API] Reboot Info Loaded', | ||
props<{ | ||
thisNodeInfo: SystemRebootInfo | null; |
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.
These keys should have reboot
keyword in there somewhere. They are not node-info. They are specifically node-reboot-info. So, just calling them thisNodeInfo
and otherNodeInfo
can cause confusion in the future.
(state) => state, | ||
); | ||
|
||
export const selectThisNodeInfo = createSelector( |
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.
Here as well. Let's add reboot
keyword in the variable name so it's clear it's only the node specific reboot info.
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.
The notification doesn't come up at all. See attached video.
Screen.Recording.2024-10-04.at.12.04.17.AM.mov
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.
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.
The build is failing
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 am waiting for a system to test the HA part of this ticket. In the meantime, we should add a "Cancel" type button on the dialog as well.
It looks good for a simple system. Need an HA system to test the HA part of this ticket.
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.
The failover.reboot.info
subscription doesn't seem to be working properly. See video. The event is either not emitted by middleware or not captured by UI.
Screen.Recording.2024-10-18.at.10.45.39.AM.mov
@RehanY147 middleware issue has been resolved, now the dialog is displayed |
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 see reboot and failover dialogs pop up at once. Which is confusing. Only one should appear. This is on an HA system.
Screen.Recording.2024-10-30.at.5.50.34.PM.mov
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.
Now no dialog shows up when I enter the command to create a reason for reboot
Screen.Recording.2024-11-01.at.3.43.35.PM.mov
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.
Running into some issue with the jenkins vms. Waiting for that to be resolved as this PR also needs to be tested on HA system
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 merged with master
because I was getting issues with the 2fa calls. Once merged, I can add a reason and the dialog shows up. But once I refresh the page, I see the following error in the browser console and the reboot dialog doesn't show up. I am not sure if this is because of some other merged commit or if it is because of this PR. It looks like it is a related problem. This is an HA system.
Changes:
This PR contains changes for 2 tickets
NAS-131325:
system.reboot.info
andfailover.reboot.info
methods and eventshere's what's implemented for this ticket:
system.reboot.info
andfailover.reboot.info
based on whether system is HA licensed,(if there are items in the
reboot_required_reasons
field, the following dialog should appear)NAS-131326: Simplify HA upgrade logic
here's what's implemented for this ticket:
failover.upgrade_pending
andfailover.upgrade_finish
methods and events were removed, they are not necessary anymorefailover.upgrade
method and waits for middleware to upgrade both local and remote controllers, then reboots the remote controller and wait it to come online, then webUI will display a reboot reason (see pt "1" in the description of this PR)failover.become_passive
when the user is ready to reboot the local controller, and thus the upgrade will be finished.Testing:
NAS-131325:
system.reboot.info
andfailover.reboot.info
methods and eventsTo test the
system.reboot.info
andfailover.reboot.info
methods and events, follow these steps:Login into the HA-enabled server, for example at M40 (10.220.16.82)
Expected result: When logging into the HA system, a call to
failover.reboot.info
must be made, and then a subscription tofailover.reboot.info
. For non-HA - the same thing, onlysystem.reboot.info
.If the call response or subscription contains items in
reboot_required_reasons
, a dialog is shown with a proposal to restart the corresponding node.However, if the
failover.disabled.reasons
response contains reasons other thanMISMATCH_VERSIONS
,LOC_FIPS_REBOOT_REQ
orREM_FIPS_REBOOT_REQ
, the dialog is not shown.NAS-131326: Simplify HA upgrade logic
To test the
failover.upgrade
job, follow these steps:Now you can see the Reboot Info notification, shown in pt "1" of the description of this PR.
Downstream