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

feat: add and delete master or worker nodes with different ssh settings #3525

Merged
merged 4 commits into from Jul 24, 2023

Conversation

yangxggo
Copy link
Contributor

feature:
support add and delete master or worker nodes with different ssh settings.

for example:
sealos add --masters 10.10.12.19 -p test@2
sealos add --nodes 10.10.12.17 -p test@4
sealos add --nodes 10.10.12.32 -p test@3

and delete command does not need to specify the different password:
sealos delete --masters 10.10.12.19 --nodes 10.10.12.17,10.10.12.32

my solution:

  1. set the ssh configs in hosts.ssh if the hosts have different configs from the cluster common one.
  2. in add nodes, use hosts.ssh if it is not nil, or use the common ssh.
  3. in delete nodes, deliver both desired spec and current spec to the "Runtime", IN CASE THAT the deleting nodes have different ssh configs.

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Jul 18, 2023

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 908
✅ Successful 343
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 564
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

@yangxggo
Copy link
Contributor Author

I will submit the test report later

@yangxggo
Copy link
Contributor Author

issue #3492

@sealos-ci-robot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


issue #3492

@fengxsong
Copy link
Collaborator

IMO, it's unnecessary to modify the interface

GetExecer(name string) ssh.Interface
and
type Mounter interface {
, please checkout https://github.com/labring/sealos/blob/main/pkg/ssh/clusterclient.go

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Patch coverage: 42.62% and project coverage change: -5.06 ⚠️

Comparison is base (d4ca6cc) 72.97% compared to head (180e23c) 67.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3525      +/-   ##
==========================================
- Coverage   72.97%   67.92%   -5.06%     
==========================================
  Files           8        8              
  Lines         618      664      +46     
==========================================
  Hits          451      451              
- Misses        132      171      +39     
- Partials       35       42       +7     
Impacted Files Coverage Δ
pkg/apply/scale.go 55.60% <38.59%> (-15.91%) ⬇️
pkg/apply/args.go 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yangxggo
Copy link
Contributor Author

IMO, it's unnecessary to modify the interface

GetExecer(name string) ssh.Interface

and

type Mounter interface {

, please checkout https://github.com/labring/sealos/blob/main/pkg/ssh/clusterclient.go

let me have a look

Signed-off-by: fengxsong <fengxsong@outlook.com>
@cuisongliu cuisongliu added this to the v4.3 milestone Jul 22, 2023
@cuisongliu cuisongliu linked an issue Jul 22, 2023 that may be closed by this pull request
Copy link
Collaborator

@fengxsong fengxsong left a comment

Choose a reason for hiding this comment

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

LGTM

@cuisongliu cuisongliu merged commit 3a0dc73 into labring:main Jul 24, 2023
80 of 82 checks passed
@sealos-ci-robot
Copy link
Member

/cherry-pick release-v4.3

@sealos-ci-robot
Copy link
Member

🤖 says: cherry pick action finished successfully 🎉!
See: https://github.com/labring/sealos/actions/runs/5640205833

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Failed to add nodes to the cluster using diff ssh options
4 participants