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

networkd - DHCP error: could not get routes: No data available #9396

Closed
ghost opened this issue Jun 24, 2018 · 4 comments
Closed

networkd - DHCP error: could not get routes: No data available #9396

ghost opened this issue Jun 24, 2018 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 24, 2018

systemd version the issue has been seen with

238 (in the LXC container)

Used distribution

host ubuntu 4.15.0-23 (being a VPS on a KVM hypervisor with virtio driver)
container archlinux
lxc 3.0.1
dnsmasq 2.79 (on host)

Unexpected behaviour you saw

DHCP error: could not get routes: No data available

Steps to reproduce the problem
(re)starting networkd


Having looked into #1147 I thought that been patched. Is it a regression thus?

log from the container (eth0 being a veth passed though from the host)

systemd-networkd[161]: eth0: Flags change: +UP +LOWER_UP +RUNNING +MULTICAST +BROADCAST
systemd-networkd[161]: eth0: Link 13 added
systemd-networkd[161]: eth0: Link state is up-to-date
systemd-networkd[161]: eth0: found matching network ‘/etc/systemd/network/eth.network’
systemd-networkd[161]: eth0: Started LLDP.
systemd-networkd[161]: eth0: Acquiring DHCPv4 lease
systemd-networkd[161]: eth0: Saved original MTU: 1500
systemd-networkd[161]: eth0: Adding address: 172.25.120.2/24 (valid for 57min 46s)
systemd-networkd[161]: eth0: DHCPv4 address 172.25.120.2/24 via 172.25.120.1
systemd-networkd[161]: eth0: Updating address: 172.25.120.2/24 (valid for 1h)
systemd-networkd[161]: eth0: DHCP error: could not get routes: No data available

log from host

dnsmasq-dhcp[9782]: 1042366568 available DHCP range: 172.25.120.2 – 172.25.120.254
dnsmasq-dhcp[9782]: 1042366568 client provides name: ovpn
dnsmasq-dhcp[9782]: 1042366568 DHCPREQUEST(br3) 172.25.120.2 72:62:1f:ac:a2:dd
dnsmasq-dhcp[9782]: 1042366568 tags: known, br3
dnsmasq-dhcp[9782]: 1042366568 DHCPACK(br3) 172.25.120.2 72:62:1f:ac:a2:dd ovpn
dnsmasq-dhcp[9782]: 1042366568 requested options: 1:netmask, 3:router, 12:hostname, 15:domain-name,
dnsmasq-dhcp[9782]: 1042366568 requested options: 6:dns-server, 33:static-route, 121:classless-static-route,
dnsmasq-dhcp[9782]: 1042366568 requested options: 42:ntp-server
dnsmasq-dhcp[9782]: 1042366568 next server: 172.25.120.1
dnsmasq-dhcp[9782]: 1042366568 sent size: 1 option: 53 message-type 5
dnsmasq-dhcp[9782]: 1042366568 sent size: 4 option: 54 server-identifier 172.25.120.1
dnsmasq-dhcp[9782]: 1042366568 sent size: 4 option: 51 lease-time 1h
dnsmasq-dhcp[9782]: 1042366568 sent size: 4 option: 58 T1 30m
dnsmasq-dhcp[9782]: 1042366568 sent size: 4 option: 59 T2 52m30s
dnsmasq-dhcp[9782]: 1042366568 sent size: 4 option: 1 netmask 255.255.255.0
dnsmasq-dhcp[9782]: 1042366568 sent size: 4 option: 28 broadcast 172.25.120.255
dnsmasq-dhcp[9782]: 1042366568 sent size: 4 option: 3 router 172.25.120.1
dnsmasq-dhcp[9782]: 1042366568 sent size: 4 option: 6 dns-server 172.25.120.1
dnsmasq-dhcp[9782]: 1042366568 sent size: 4 option: 12 hostname ovpn

@ghost ghost changed the title LXC unprivilged container - DHCP error: could not get routes: No data available LXC unpriviliged container - DHCP error: could not get routes: No data available Jun 24, 2018
@ghost ghost changed the title LXC unpriviliged container - DHCP error: could not get routes: No data available networkd - LXC unpriviliged container - DHCP error: could not get routes: No data available Jun 24, 2018
@yuwata
Copy link
Member

yuwata commented Jun 25, 2018

It seems that the dhcp server provides no routes, right?

@yuwata yuwata added network needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer labels Jun 25, 2018
@ghost
Copy link
Author

ghost commented Jun 25, 2018

Been searching for the meaning of

DHCP error : could not get routes: No data available

but came up short. If it referes to 33:static-route a/o 121:classless-static-route then yes, such is not presented by dnsmasq as no such routes are (currently) specified.

So then it may just be my confusion over error vs. No data available. The latter is clear in case there is no static route table present(ed) by the DHCP server but why such necessarily constitues/warrants an error classification is rather not so clear to me.

My conecpetion of error in this context would rather be a malfunction in the communction between DHCP client and server.

If this being my misconception over semantics and not represnting an actual bug than please feel at liberty to close this issue.

@yuwata yuwata added needs-better-log-message and removed needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer labels Jun 25, 2018
yuwata added a commit to yuwata/systemd that referenced this issue Jun 25, 2018
@yuwata
Copy link
Member

yuwata commented Jun 25, 2018

Fix is waiting in #9406.

@ghost ghost changed the title networkd - LXC unpriviliged container - DHCP error: could not get routes: No data available networkd - DHCP error: could not get routes: No data available Jun 25, 2018
yuwata added a commit to yuwata/systemd that referenced this issue Jun 29, 2018
keszybz pushed a commit to keszybz/systemd that referenced this issue Oct 28, 2018
Closes systemd#9396.

(cherry picked from commit 599c44e)
fpletz pushed a commit to NixOS/systemd that referenced this issue Oct 31, 2018
Closes systemd#9396.

(cherry picked from commit 599c44e)
@rgov
Copy link

rgov commented Dec 23, 2022

@yuwata Could you please summarize what the root cause was here? Would this bug manifest as systemd-networkd toggling the link down/up again if DHCP "fails" due to this error?

Your changes in #9406 did not make it into Ubuntu 18.04 and I'm facing the same error, and trying to determine if there is a specific DHCP option I can set on dnsmasq that would work around the issue, without having to patch / upgrade systemd.

I'm not sure how the patch addresses this, since the line with the error message is not modified by the change. I think it's an innocuous message anyway, because no error gets returned to the caller, but I'm not sure.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants