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

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Gedulis12
Copy link

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.

@eks-distro-bot
Copy link
Collaborator

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 eks-distro-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 13, 2024
@jacobweinstock
Copy link
Member

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!

@Gedulis12
Copy link
Author

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.

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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

@jacobweinstock
Copy link
Member

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.

@Gedulis12
Copy link
Author

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

Gedulis12 and others added 3 commits October 27, 2024 22:14
The value provided in the flag is now used in the CLI arguments when running boots binary:
--syslog-addr
--tftp-addr
--http-addr
--dhcp-ip-for-packet
--dhcp-syslog-ip
--dhcp-tftp-ip
--dhcp-http-ipxe-binary-url
--dhcp-http-ipxe-script-url
@eks-distro-bot eks-distro-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 27, 2024
@Gedulis12
Copy link
Author

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.

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.41%. Comparing base (4047261) to head (3b4996e).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8760   +/-   ##
=======================================
  Coverage   72.41%   72.41%           
=======================================
  Files         578      578           
  Lines       45386    45394    +8     
=======================================
+ Hits        32866    32874    +8     
  Misses      10790    10790           
  Partials     1730     1730           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Gedulis12
Copy link
Author

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

@Gedulis12
Copy link
Author

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?

@jacobweinstock
Copy link
Member

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!

@Gedulis12
Copy link
Author

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?

"--dhcp-ip-for-packet", tinkServerIP,
"--dhcp-syslog-ip", tinkServerIP,
"--dhcp-tftp-ip", fmt.Sprintf("%s:69", tinkServerIP),
"--dhcp-http-ipxe-binary-url", fmt.Sprintf("http://%s:8080/ipxe/", tinkServerIP),
Copy link
Member

Choose a reason for hiding this comment

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

The upstream Smee version v0.11.0 has 8080 as the default port here and that is a bug that is fixed in future versions. This should be 80.

Copy link
Author

Choose a reason for hiding this comment

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

updated in 8b97b15a4

@Gedulis12
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Documentation documentation needs-ok-to-test 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.

3 participants