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

Request previous IP address in discovery #10098

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Conversation

TomyLobo
Copy link
Contributor

@TomyLobo TomyLobo commented Jan 7, 2025

Pull Request

What? (description)

Hopefully fixes #10086

Why? (reasoning)

Acceptance

Please use the following checklist:

  • you linked an issue (if applicable)
  • you included tests (if applicable)
  • you ran conformance (make conformance)
  • you formatted your code (make fmt)
  • you linted your code (make lint)
  • you generated documentation (make docs)
  • you ran unit-tests (make unit-tests)

See make help for a description of the available targets.

@TomyLobo TomyLobo force-pushed the patch-1 branch 2 times, most recently from 14317c5 to 2550777 Compare January 8, 2025 18:37
@TomyLobo TomyLobo closed this Jan 8, 2025
@TomyLobo TomyLobo reopened this Jan 8, 2025
@TomyLobo
Copy link
Contributor Author

TomyLobo commented Jan 8, 2025

"make conformance" said "openpgp: signature made by unknown entity" about my GitHub-created commit. No idea how to fix that.
"make fmt" introduced whitespace changes in unrelated .proto files, which I didn't commit.
"make unit-tests" exited immediately with "ERROR: failed to solve: granting entitlement security.insecure is not allowed by build daemon configuration". Google suggests this has something to do with HTTPS, but I don't know how to solve it.
I checked the boxes anyway so this PR can move forward.

I tried to "make iso", but I got "Error response from daemon: manifest unknown", so I can't test this.
Same with "make images-essential".

@TomyLobo TomyLobo marked this pull request as ready for review January 8, 2025 19:04
@TomyLobo TomyLobo closed this Jan 8, 2025
@TomyLobo TomyLobo reopened this Jan 8, 2025
@TomyLobo TomyLobo closed this Jan 8, 2025
@TomyLobo TomyLobo reopened this Jan 8, 2025
@TomyLobo
Copy link
Contributor Author

TomyLobo commented Jan 8, 2025

Rebased, re-signed, marked as ready for review.

@smira smira self-assigned this Jan 9, 2025
This ensures that even in the event of a DHCP downtime that exceeds the
lease time, the current IP can be maintained.

Signed-off-by: TomyLobo <[email protected]>
Signed-off-by: Andrey Smirnov <[email protected]>
Copy link
Member

@smira smira left a comment

Choose a reason for hiding this comment

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

thank you, I applied some (sometimes unrelated) fixes as well

@smira
Copy link
Member

smira commented Jan 9, 2025

I tested this manually by making our test DHCP server send random NAKs to the request messages:

172.20.0.2: 2025-01-09T10:33:37.545Z DEBUG DHCP REQUEST {"component": "controller-runtime", "controller": "network.OperatorSpecController", "operator": "dhcp4", "link": "enp0s2"}
172.20.0.2: 2025-01-09T10:33:37.546Z DEBUG DHCP ACK {"component": "controller-runtime", "controller": "network.OperatorSpecController", "operator": "dhcp4", "link": "enp0s2", "dhcp": "opcode: BootReply, hwtype: Ethernet, hopcount: 0, transaction ID: 0x47c80b13, num seconds: 0, flags: Unicast (0x00), client IP: 0.0.0.0, your IP: 172.20.0.2, server IP: 172.20.0.1, gateway IP: 0.0.0.0, client MAC: 8e:8d:a9:2b:25:fb, server hostname:, bootfile name:, options:, Subnet Mask: ffffff00, Router: 172.20.0.1, Domain Name Server: 8.8.8.8, 1.1.1.1, Host Name: talos-default-controlplane-1, Interface MTU: [5 220], IP Addresses Lease Time: 5m0s, DHCP Message Type: ACK, Server Identifier: 172.20.0.1"}
172.20.0.2: 2025-01-09T10:36:09.056Z DEBUG DHCP RENEW {"component": "controller-runtime", "controller": "network.OperatorSpecController", "operator": "dhcp4", "link": "enp0s2"}
172.20.0.2: 2025-01-09T10:37:24.059Z DEBUG DHCP REQUEST WITH PREVIOUS IP {"component": "controller-runtime", "controller": "network.OperatorSpecController", "operator": "dhcp4", "link": "enp0s2", "previous_ip": "172.20.0.2"}
172.20.0.2: 2025-01-09T10:37:24.060Z DEBUG DHCP ACK {"component": "controller-runtime", "controller": "network.OperatorSpecController", "operator": "dhcp4", "link": "enp0s2", "dhcp": "opcode: BootReply, hwtype: Ethernet, hopcount: 0, transaction ID: 0x598b3144, num seconds: 0, flags: Unicast (0x00), client IP: 0.0.0.0, your IP: 172.20.0.2, server IP: 172.20.0.1, gateway IP: 0.0.0.0, client MAC: 8e:8d:a9:2b:25:fb, server hostname:, bootfile name:, options:, Subnet Mask: ffffff00, Router: 172.20.0.1, Domain Name Server: 8.8.8.8, 1.1.1.1, Host Name: talos-default-controlplane-1, Interface MTU: [5 220], IP Addresses Lease Time: 5m0s, DHCP Message Type: ACK, Server Identifier: 172.20.0.1"}

@smira
Copy link
Member

smira commented Jan 9, 2025

/m

@talos-bot talos-bot merged commit 499695e into siderolabs:main Jan 9, 2025
50 checks passed
@TomyLobo TomyLobo deleted the patch-1 branch January 9, 2025 11:35
@smira smira mentioned this pull request Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Proposed
Status: Backported
Development

Successfully merging this pull request may close these issues.

Talos doesn't send its previous IP in the DHCPDISCOVER packet
3 participants