Skip to content

fix: get host arch using SSH for apply/run, apply/reset and apply/scale #1927

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

Merged
merged 3 commits into from
Oct 21, 2022

Conversation

SignorMercurio
Copy link
Contributor

@SignorMercurio SignorMercurio commented Oct 21, 2022

Should fix #1787.

I'm not sure if these changes cover all the related cases and whether I'm using SSH correctly though.

@cuisongliu PTAL.

@codecov
Copy link

codecov bot commented Oct 21, 2022

Codecov Report

Base: 67.69% // Head: 67.79% // Increases project coverage by +0.09% 🎉

Coverage data is based on head (b0d2714) compared to base (4c5dae8).
Patch coverage: 82.75% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1927      +/-   ##
==========================================
+ Coverage   67.69%   67.79%   +0.09%     
==========================================
  Files           6        6              
  Lines         486      503      +17     
==========================================
+ Hits          329      341      +12     
- Misses        130      134       +4     
- Partials       27       28       +1     
Impacted Files Coverage Δ
pkg/apply/utils.go 90.74% <61.53%> (-9.26%) ⬇️
pkg/apply/run.go 54.49% <100.00%> (+0.25%) ⬆️
pkg/apply/scale.go 71.51% <100.00%> (+0.50%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

clusterSSH := r.cluster.GetSSH()
sshClient := ssh.NewSSHClient(&clusterSSH, true)

r.setHostWithIpsPort(masters, []string{v2.MASTER, GetHostArch(sshClient, masters[0])})
Copy link
Collaborator

Choose a reason for hiding this comment

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

If there is something wrong with different nodes and different architectures, I feel traversed, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I do not quite understand what you mean. Does "different nodes and different architectures" means that we have masters with different arch or nodes with different arch? I think we currently only support masters/nodes with the same arch.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, I do not quite understand what you mean. Does "different nodes and different architectures" means that we have masters with different arch or nodes with different arch? I think we currently only support masters/nodes with the same arch.

At present, it is like this, but in the future, different nodes should be satisfied with different architectures.

Copy link
Member

Choose a reason for hiding this comment

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

We can handle the mixed architecture case in a single new feature

@fanux fanux merged commit 6954674 into labring:main Oct 21, 2022
@SignorMercurio SignorMercurio deleted the fix/1787 branch October 22, 2022 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: generate Clusterfile on arm host role is amd64
3 participants