-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix: loop bootstrap sequence in daemon, add run command and agent #403
Conversation
@bhoopesh369 thanks for your contribution when I look at Ubuntu, when using Network Manager, I see a separate file per interface and not all interfaces in the same file... See example:
I wonder what is the right approach here ? pass the folder to scan ? I also worried if WDYT ? |
for example I found:
|
hmm, so the lease file format is same for NetworkManager and dhclient (but in NetworkManager one file for each interface) i saw the lease file inside of the sztp-client-1 container, located at /var/dhclient/dhclient.leases - in this everything was present in one file. I think we have to parse networkd lease files seperately and yea pass the folder to scan WDYT? |
example:
WDYT ? |
Makes sense |
so i searched for nmcli wrapper packages in go I looked for any alternates that can do this and found this: https://github.com/insomniacslk/dhcp/ I wrote a quick code to test this out. Here's what the code will do under the hood:
This means that the code is getting fresh DHCP information directly from the network, not from any stored lease files. is this good, or WDYT |
I do not think we can run our own DHCLIENT... since there is one that will be running already on every server, so we will conflict on packets... the only option is to use fetch from existing clients... so we can
WDYT ? |
hmm works, i get why we cant run another dhclient |
yep I opened #418 |
@bhoopesh369 I'm looking at the code right now and I think we should revert all the changes... so the only thing we should do is probably
Thanks for opening rest of the issues |
Cool, I was thinking the same too |
Signed-off-by: Bhoopesh <[email protected]>
@bhoopesh369 looks great, please fix test
|
yep looking into it |
a mock test server is not configured inside the test, that's why it failed, I think the test for think that is why a test is not there for the daemon command WDYT? |
ok, you can remove this test now in this PR and open an issue to add back both tests properly, since we do want 100% code coverage.. |
Also consider invoking Lines 220 to 227 in 126f501
|
Signed-off-by: Bhoopesh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work!
closes #396