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

single file vs folder for dhcp leases #421

Open
bhoopesh369 opened this issue Jun 25, 2024 · 1 comment
Open

single file vs folder for dhcp leases #421

bhoopesh369 opened this issue Jun 25, 2024 · 1 comment
Assignees
Labels
good first issue Good for newcomers

Comments

@bhoopesh369
Copy link
Contributor

today we pass lease file via cmdline arguments like this: --dhcp-lease-file /var/lib/dhclient/dhclient.leases.

The below is the flow needed in the runCommandDaemon (code) :

  • we can use nmcli to fetch leases like I showed on the above example. I saw few go packages out there to do that... I think they use D-BUS...
  • if we successful, we exit
  • if not, we can try networkctl for systemd-networkd after
  • if we successful, we exit
  • lastly as backup option we can parse customer provided lease file or extend this to folder....

for reference: #403, #396, #418

@glimchb glimchb added the good first issue Good for newcomers label Jun 25, 2024
@glimchb
Copy link
Member

glimchb commented Jun 25, 2024

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:

root@bf2:~# ls -l /var/lib/NetworkManager/dhclient-*
-rw-r--r-- 1 root root 6981 Jun 19 20:31 /var/lib/NetworkManager/dhclient-aa93b667-6aac-3804-91e9-4958e07fdb2f-oob_net0.lease
-rw-r--r-- 1 root root 2514 Jun  7 18:52 /var/lib/NetworkManager/dhclient-oob_net0.conf

So instead of single file , maybe we should pass a folder to scan ?
or check if argument is file or folder ourselves... or only accept folders...

Also what will be files we are looking for in that folder?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants