Skip to content

fix: no run configure OS in exist node#3068

Merged
yongchuanzhou merged 1 commit intokubesphere:release-v3.1.0-rc.0from
redscholar:no-configureos-existnode
Apr 13, 2026
Merged

fix: no run configure OS in exist node#3068
yongchuanzhou merged 1 commit intokubesphere:release-v3.1.0-rc.0from
redscholar:no-configureos-existnode

Conversation

@redscholar
Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

Does this PR introduced a user-facing change?

no run configure OS in exist node

Additional documentation, usage docs, etc.:


Signed-off-by: redscholar <blacktiledhouse@gmail.com>
@kubesphere-prow kubesphere-prow Bot added release-note kind/bug Categorizes issue or PR as related to a bug. labels Apr 13, 2026
@kubesphere-prow
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: redscholar
Once this PR has been reviewed and has the lgtm label, please assign pixiake for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubesphere-prow kubesphere-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 13, 2026
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces logic to skip OS configuration tasks for nodes already present in the cluster by implementing a NodeInCluster check. To support this, the StatusModule was moved before the ConfigureOSModule in several pipelines, and the pipeline cache is now initialized with a default Kubernetes status. However, review feedback points out that this reordering is missing in several critical paths, including the main cluster creation branch and the K3s/K8e node addition pipelines, which will cause the skip logic to fail in those scenarios.

Comment on lines 70 to +71
&kubernetes.StatusModule{},
&os.ConfigureOSModule{Skip: runtime.Cluster.System.SkipConfigureOS},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The StatusModule is correctly moved before ConfigureOSModule here to ensure the cluster status is available for the NodeInCluster check. However, this change is missing in the main cluster creation branch (the else block starting at line 83), where ConfigureOSModule still precedes StatusModule. This inconsistency will cause the OS configuration to run on all nodes in standard installations, defeating the purpose of the PR.

&artifact.UnArchiveModule{Skip: noArtifact},
&os.RepositoryModule{Skip: noArtifact || !runtime.Arg.InstallPackages},
&binaries.NodeBinariesModule{},
&kubernetes.StatusModule{},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The StatusModule is added here to support the NodeInCluster check. Note that NewK3sAddNodesPipeline and NewK8eAddNodesPipeline in this file (lines 93 and 130) also use ConfigureOSModule but have not been updated to place their respective status modules before it. This will prevent the skip logic from working for K3s and K8e clusters.

@yongchuanzhou yongchuanzhou merged commit 2e75970 into kubesphere:release-v3.1.0-rc.0 Apr 13, 2026
5 of 6 checks passed
@redscholar redscholar deleted the no-configureos-existnode branch April 15, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. release-note size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants