-
Notifications
You must be signed in to change notification settings - Fork 164
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
Main changes for kube/cluster-init.sh for multi-node cluster handling #4385
Main changes for kube/cluster-init.sh for multi-node cluster handling #4385
Conversation
naiming-zededa
commented
Oct 18, 2024
- create the cluster-utils.sh in pkg/kube for a number of functions
- get EdgeNodeClusterStatus from 'zedkube' for cluster status, cluster nodeip, cluster prefix, etc
- a background process to monitor the cluster mode changes
- implement cluster mode change logic and operations for change from single-node to cluster, or from cluster back to single-node
- save kube /var/lib at single-node first time setup for later use when the mode changes back from cluster mode to single node
- display eve-release string for get node OS-IMAGE field
- this patch tested still works in kubevirt single-node case.
- some of the external_boot_img changes in the patch is from Andrew's diff.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4385 +/- ##
=======================================
Coverage 20.93% 20.93%
=======================================
Files 13 13
Lines 2895 2895
=======================================
Hits 606 606
Misses 2163 2163
Partials 126 126 ☔ View full report in Codecov by Sentry. |
c030dfa
to
6871b98
Compare
6871b98
to
51911dd
Compare
51911dd
to
42a1e98
Compare
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.
This PR is including some changes from my PR, also yetus cleanup needed.
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.
A few more notes
pkg/kube/cluster-init.sh
Outdated
lhCfgPath=/var/lib/lh-cfg-${LONGHORN_VERSION}.yaml | ||
if [ ! -e $lhCfgPath ]; then | ||
curl -k https://raw.githubusercontent.com/longhorn/longhorn/${LONGHORN_VERSION}/deploy/longhorn.yaml > "$lhCfgPath" | ||
if [ ! -f /var/lib/longhorn_installing ]; then |
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.
This is also from #4363
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.
this looks resolved
a3b402e
to
8b3271c
Compare
Looks like it needs to be rebased. |
8b3271c
to
26158ac
Compare
- create the cluster-utils.sh in pkg/kube for a number of functions - get EdgeNodeClusterStatus from 'zedkube' for cluster status, cluster nodeip, cluster prefix, etc - a background process to monitor the cluster mode changes - implement cluster mode change logic and operations for change from single-node to cluster, or from cluster back to single-node - save kube /var/lib at single-node first time setup for later use when the mode changes back from cluster mode to single node - display eve-release string for get node OS-IMAGE field Signed-off-by: Naiming Shen <naiming@zededa.com>
26158ac
to
f176b77
Compare
Hi @deitch rebased in the update.
please check to see if this is in the intended place. |
@andrewd-zededa can you respond to this and take another look? |
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 think the original conflicts/overlap are resolved, just a small fix for a function not yet defined.
return 1 | ||
fi | ||
logmsg "Done applying Multus" | ||
ln -s /var/lib/cni/bin/multus /var/lib/rancher/k3s/data/current/bin/multus | ||
link_multus_into_k3s |
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.
link_multus_into_k3s
is not defined yet, its in an upcoming PR for pkg/kube/cluster-update.sh
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 can submit a quick PR to add a skeleton cluster-update.sh with just this defined to get this moving again.
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'm curious why shellcheck didn't find this
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 created #4445 to define the missing function
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.
LGTM