eks-anywhere icon indicating copy to clipboard operation
eks-anywhere copied to clipboard

Expose CLI flag to tell Smee (Boots) on which interface to bind

Open Gedulis12 opened this issue 1 year ago • 2 comments

Issue #, if available:

Description of changes:

Added a cli flag option --smee-bind-ip, which tells smee service on which interface to bind it's services for serving pxe boot binaries (http, tftp etc..)

Currently EKS-A uses the default smee behaviour, which binds it's services on the first available hosts public interface. This causes an issue with the admin host if it is using multiple interfaces, as the "first" interface in the list is not necessarily the the one that's intended to be used as EKS-A network.

Testing (if applicable): Added a test case for TestTinkerbellStackInstallWithDifferentOptions in pkg/providers/tinkerbell/stack/stack_test.go which checks the docker run command for boots service.

Additionally added validations in SetupAndValidateCreateCluster() which checks if the provided IP is valid and bound to any network interface on the host.

All unit tests pass.

Documentation added/planned (if applicable): Updated docs/content/en/docs/reference/eksctl/anywhere_create_cluster.md with the new CLI option

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Gedulis12 avatar Sep 13 '24 11:09 Gedulis12

Hi @Gedulis12. Thanks for your PR.

I'm waiting for a aws member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

eks-distro-bot avatar Sep 13 '24 11:09 eks-distro-bot

Hey @Gedulis12 , thanks for this contribution! If i understand what you're wanting, this functionality already exists with the flag --tinkerbell-bootstrap-ip (reference). Maybe you want to try it and see? Please let me know, thanks!

jacobweinstock avatar Oct 22 '24 17:10 jacobweinstock

Hi @jacobweinstock , thanks for the response. I have tested it before raising this PR, unfortunately --tinkerbell-bootstrap-ip flag does achieve the required results. It does not have an effect on the 'smee' components behaviour in regards to which network interface it binds it's dhcp services to.

Gedulis12 avatar Oct 23 '24 11:10 Gedulis12

Ah, i see from your PR that it looks like it's not the binding to an interface thats a problem but the IP used in DHCP packets for syslog, tftp, http, etc. As you've found, we're not setting the appropriate CLI flags for Smee in order for network booting to happen properly. The --tinkerbell-bootstrap-ip flag is actually what you'll want to use instead of introducing a new flag.

jacobweinstock avatar Oct 23 '24 16:10 jacobweinstock

@jacobweinstock Thanks for the feedback. I will work on amendment for the PR so that the functionality lands in --tinkerbell-bootstrap-ip flag.

Gedulis12 avatar Oct 24 '24 19:10 Gedulis12

Hi @jacobweinstock, I have done changes to this PR and moved the functionality to the --tinkerbell-bootstrap-ip flag. Let me know if you have any further feedback.

Gedulis12 avatar Oct 27 '24 21:10 Gedulis12

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.46%. Comparing base (f3c0828) to head (c8401df). Report is 163 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8760      +/-   ##
==========================================
- Coverage   72.38%   69.46%   -2.93%     
==========================================
  Files         578      672      +94     
  Lines       45469    49360    +3891     
==========================================
+ Hits        32915    34286    +1371     
- Misses      10824    13288    +2464     
- Partials     1730     1786      +56     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Oct 30 '24 01:10 codecov[bot]

Fixed golanggci-lint errors via 323e34 need an approval to run tests again.

Gedulis12 avatar Oct 30 '24 09:10 Gedulis12

Hey @jacobweinstock i'm not super familiar with the PR process for this project, so just checking in. I see the checks have passed, is there any further pending actions on me?

Gedulis12 avatar Nov 07 '24 13:11 Gedulis12

Hey @jacobweinstock i'm not super familiar with the PR process for this project, so just checking in. I see the checks have passed, is there any further pending actions on me?

Hey, apologies. I just had one comment and we should be able to get this merged. Thanks for the contribution!

jacobweinstock avatar Nov 07 '24 15:11 jacobweinstock

Hi @jacobweinstock , just checking in on what's the status for this. You mentioned that you have one comment, would you like to share that comment?

Gedulis12 avatar Dec 08 '24 18:12 Gedulis12

@jacobweinstock i have done changes on the default port, also updated the test. Is there anything else?

Gedulis12 avatar Dec 19 '24 13:12 Gedulis12

Hi @jacobweinstock , just checking in - has there been any advancements / plans in regards to if / when this PR can be merged?

Gedulis12 avatar Mar 03 '25 09:03 Gedulis12

/ok-to-test

jacobweinstock avatar Mar 07 '25 17:03 jacobweinstock

/approve

jacobweinstock avatar Mar 07 '25 17:03 jacobweinstock

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jacobweinstock

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

The pull request process is described here

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

eks-distro-bot avatar Mar 07 '25 17:03 eks-distro-bot

/cherry-pick release-0.22

jacobweinstock avatar Mar 07 '25 17:03 jacobweinstock

@jacobweinstock: #8760 failed to apply on top of branch "release-0.22":

Applying: add --smee-bind-ip cli flag for cluster create command The flag let's the user configure the network interface on which smee (boots) service will bind it's services
Using index info to reconstruct a base tree...
M	cmd/eksctl-anywhere/cmd/createcluster.go
M	cmd/eksctl-anywhere/cmd/supportbundle.go
M	cmd/eksctl-anywhere/cmd/upgradecluster.go
M	cmd/eksctl-anywhere/cmd/validatecreatecluster.go
M	pkg/dependencies/factory.go
M	pkg/providers/tinkerbell/create.go
M	pkg/providers/tinkerbell/stack/stack.go
M	pkg/providers/tinkerbell/tinkerbell.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/providers/tinkerbell/tinkerbell.go
Auto-merging pkg/providers/tinkerbell/stack/stack.go
CONFLICT (content): Merge conflict in pkg/providers/tinkerbell/stack/stack.go
Auto-merging pkg/providers/tinkerbell/create.go
CONFLICT (content): Merge conflict in pkg/providers/tinkerbell/create.go
Auto-merging pkg/dependencies/factory.go
Auto-merging cmd/eksctl-anywhere/cmd/validatecreatecluster.go
Auto-merging cmd/eksctl-anywhere/cmd/upgradecluster.go
Auto-merging cmd/eksctl-anywhere/cmd/supportbundle.go
Auto-merging cmd/eksctl-anywhere/cmd/createcluster.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 add --smee-bind-ip cli flag for cluster create command The flag let's the user configure the network interface on which smee (boots) service will bind it's services
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-0.22

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

eks-distro-pr-bot avatar Mar 07 '25 17:03 eks-distro-pr-bot