webui icon indicating copy to clipboard operation
webui copied to clipboard

NAS-131326 / 25.04 / Simplify HA upgrade logic + NAS-131325: `system.reboot.info` and `failover.reboot.info` methods and events

Open bvasilenko opened this issue 1 year ago • 1 comments

Changes:

This PR contains changes for 2 tickets

  1. NAS-131325:system.reboot.info and failover.reboot.info methods and events

    here's what's implemented for this ticket:

    1. Calling new endpoints system.reboot.info and failover.reboot.info based on whether system is HA licensed,
    2. Showing Reboot Info non-blocking notification in the top right corner: (if there are items in the reboot_required_reasons field, the following dialog should appear)
      image
  2. NAS-131326: Simplify HA upgrade logic

    here's what's implemented for this ticket:

    1. usages of failover.upgrade_pending and failover.upgrade_finish methods and events were removed, they are not necessary anymore
    2. webUI calls with failover.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)
    3. UI only calls failover.become_passive when the user is ready to reboot the local controller, and thus the upgrade will be finished.

Testing:

  1. NAS-131325:system.reboot.info and failover.reboot.info methods and events

    To test the system.reboot.info and failover.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 to failover.reboot.info. For non-HA - the same thing, only system.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 than MISMATCH_VERSIONS, LOC_FIPS_REBOOT_REQ or REM_FIPS_REBOOT_REQ, the dialog is not shown.

  2. NAS-131326: Simplify HA upgrade logic

    To test the failover.upgrade job, follow these steps:

    1. Login into the HA-enabled server, for example at M40 (10.220.16.82)
    2. Go to System > Update
    3. Choose Manual Update , reject a prompt to make a backup, and choose the .update file
    4. In a new browser tab go to Dashboard page (or any other page)

    Now you can see the Reboot Info notification, shown in pt "1" of the description of this PR.

Downstream

Affects Reasoning
Documentation

bvasilenko avatar Sep 24 '24 18:09 bvasilenko

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.94%. Comparing base (8766977) to head (506bccb). Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10744      +/-   ##
==========================================
+ Coverage   81.80%   81.94%   +0.14%     
==========================================
  Files        1626     1627       +1     
  Lines       57324    57296      -28     
  Branches     5920     5923       +3     
==========================================
+ Hits        46892    46954      +62     
+ Misses      10432    10342      -90     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Sep 24 '24 19:09 codecov[bot]

Blocked by https://ixsystems.atlassian.net/browse/NAS-131916

bvasilenko avatar Oct 22 '24 06:10 bvasilenko

@RehanY147 middleware issue has been resolved, now the dialog is displayed

bvasilenko avatar Oct 30 '24 06:10 bvasilenko

@RehanY147 Now everything works as expected!

bvasilenko avatar Nov 14 '24 15:11 bvasilenko

This PR has been merged and conversations have been locked. If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

bugclerk avatar Nov 15 '24 15:11 bugclerk