Skip to content
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

Centralized unit update management #800

Closed
12 tasks done
Tbaile opened this issue Sep 27, 2024 · 4 comments
Closed
12 tasks done

Centralized unit update management #800

Tbaile opened this issue Sep 27, 2024 · 4 comments
Assignees
Labels
verified All test cases were verified successfully

Comments

@Tbaile
Copy link
Contributor

Tbaile commented Sep 27, 2024

From the Controller it should be possible to update the Unit seamlessly (packages and/or image).

This is due the feature added in the controller that avoids UI - API version mismatch and inherently avoids accidental misconfigurations.

Here's the list of the actions that are to be implemented in the controller:

  • Unit Actions Section

    • Add the action to schedule an update
    • Add the action to abort an update
    • Add the action to reschedule an update
    • Optional Add the action to force pull and install the packages
  • Bulk Actions Section

    • Add the action to update Unit Image (scheduled or now)
  • Add next to the version a warning sign indicating that there's an image update available for the unit alternatively a clock indicating that there's a scheduled update planned for the unit


PRs:

@Tbaile
Copy link
Contributor Author

Tbaile commented Oct 7, 2024

While it's not completed and merged, the changes are only needed to be made to the controller.
Testing is enabled doing so:

  1. On a NS8 machine, install and configure the controller with
add-module ghcr.io/nethserver/nethsecurity-controller:unit-remote-update
  1. Prepare 3 units that are 1.0.1, 1.1.0 and 1.2.0.
  2. Connect all units to the controller, manually refresh the info for each unit, then the following must apply:
    3.1: Unit 1.0.1 and 1.1.0 must show a Update available
    3.2: Unit 1.2.0 mustn't show any labels.

QA:

  1. Check if scheduling an update works, this can be done on both 1.0.1 and 1.1.0
  2. Try to cancel a scheduled upgrade
  3. For one unit, launch a image update directly and wait for it to boot up, try to access the unit (careful, openWRT sessions are long, unit might still appear connected while not so.). In addition the unit won't be having any info fetched because it's a cron, a "Update available" might still be there.
  4. Check if fetching package update works. (on 1.2.0 due to a restart of ns-api-server this might trigger a issue, ONCE)
  5. Try the "Update units" batch command.

@Tbaile Tbaile added testing Packages are available from testing repositories feature labels Oct 7, 2024
@gsanchietti gsanchietti self-assigned this Oct 8, 2024
@gsanchietti gsanchietti removed the testing Packages are available from testing repositories label Oct 10, 2024
@gsanchietti
Copy link
Member

The feature works well, but the controller's UI is not very clear and does not provide immediate feedback, which could confuse the user and generate support requests.

These are the current issues:

  • when I start the immediate update of the unit, the update takes a few seconds to start (in my case at least a minute because I have a slow connection for the download); I have no feedback in the UI and cannot understand which unit I tried to update if I have many that require updating
  • after the update, a unit remains marked as "to be updated" until the data is refreshed (which can take up to 30 minutes), or until I try to update it again, in which case the status is updated immediately and the "to be updated" label disappears.
  • I schedule an update from the controller, the "scheduled update" label appears; I go to the unit and remove the scheduled update; the change is not reflected on the controller until the information is refreshed (30 minutes).
  • I schedule an update from the controller, the "scheduled update" label appears; the unit performs the update; the "scheduled update" label remains until the unit communicates the data (30 minutes).

@Tbaile
Copy link
Contributor Author

Tbaile commented Oct 10, 2024

NSEC Version: 23.05.5-ns.1.2.99-alpha1-74-g49bad6b4eb
Controller: ghcr.io/nethserver/nethsecurity-controller:main

@Tbaile Tbaile added the testing Packages are available from testing repositories label Oct 10, 2024
@gsanchietti
Copy link
Member

All previous issues are now addressed with latest image.
Please note that when using the controller with old images, some glitches may still appear.

@gsanchietti gsanchietti added verified All test cases were verified successfully and removed testing Packages are available from testing repositories labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified All test cases were verified successfully
Projects
Archived in project
Development

No branches or pull requests

2 participants