feat: run update-core on cluster init and restore - #1199
Draft
DavidePrincipi wants to merge 4 commits into
Draft
Conversation
gsanchietti
approved these changes
Jun 10, 2026
gsanchietti
reviewed
Jun 10, 2026
| ) | ||
| if update_core_response['exit_code'] != 0: | ||
| print(agent.SD_ERR + "update-core failed", file=sys.stderr) | ||
| sys.exit(1) |
Member
There was a problem hiding this comment.
I'd prefer to not abort the create-cluster if the update fails.
Also make sure that is safe enough to call the update-core even if the cluster is not still completely configured.
DavidePrincipi
force-pushed
the
feat-8021-2
branch
from
June 10, 2026 15:54
a3ae91b to
18d5be9
Compare
When NS8 is installed from a prebuilt image, core and Traefik may be outdated. Add step 40update_cluster to create-cluster to force an update-core run immediately after cluster initialisation. This also covers the disaster-recovery path: restore-cluster already calls create-cluster as a sub-task, so the new step is reached in both scenarios without duplication. During core update the cluster agent receives SIGUSR1 and exits gracefully once all running actions complete, then systemd restarts it at the latest version. Assisted-by: copilot:claude-sonnet-4.6
The initialized flag was derived solely from cluster/network existing
in Redis, which is set early in create-cluster/50update. With the new
40update_cluster step running update-core (and restarting Traefik), a
page reload during that window would show the UI fully loaded while
the cluster was still being set up.
Set FIRST_CONFIGURATION=1 in the cluster agent environment during
install-finalize.sh, before any cluster action runs. get-cluster-status
returns initialized=false while FIRST_CONFIGURATION=1. At the end of
create-cluster/50update, unset_env removes the flag so that subsequent
calls to get-cluster-status correctly return initialized=true.
Existing clusters have no FIRST_CONFIGURATION key, so the expression
os.getenv('FIRST_CONFIGURATION') != '1' evaluates to True and they
are unaffected.
DavidePrincipi
force-pushed
the
feat-8021-2
branch
from
June 18, 2026 08:00
18d5be9 to
e5978d8
Compare
DavidePrincipi
force-pushed
the
feat-8021-2
branch
2 times, most recently
from
June 18, 2026 10:18
7ff5877 to
286d2e4
Compare
Retry the cluster status task submission when api-server returns "client idle check failed" during cluster agent restarts. Handle the retry in the shared axios interceptor and scope it to /cluster/tasks so concurrent node or module task requests do not consume the same retry budget. Assisted-by: copilot:gpt-5.4
DavidePrincipi
force-pushed
the
feat-8021-2
branch
from
June 18, 2026 10:22
286d2e4 to
b1986bb
Compare
Member
Author
|
I cannot merge this pull request: in my early tests the cluster-admin task progress (create-cluster, restore-cluster) hangs forever or logs out the user. I put the PR to draft, to investigate these behaviors further in a separate issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When NS8 is installed from a prebuilt image, core and Traefik may be outdated. Add step 40update_cluster to create-cluster to force an update-core run immediately after cluster initialisation.
This also covers the disaster-recovery path: restore-cluster already calls create-cluster as a sub-task, so the new step is reached in both scenarios without duplication.
During core update the cluster agent receives SIGUSR1 and exits gracefully once all running actions complete, then systemd restarts it at the latest version.
Refs
NethServer/dev#8021NethServer/dev#8052