Open mas90 opened 8 months ago
Hi!
I think it's due to the Autoconf
, like for DHCP the resolv file is probably overwritten by what's received via SLAAC, but there's no DNS given. Can you try to configure the IPv6 statically?
AFAIK Autoconf should also provide a DNS as well.
Thanks.
Hi @benjamreis
I think it's due to the
Autoconf
, like for DHCP the resolv file is probably overwritten by what's received via SLAAC, but there's no DNS given. Can you try to configure the IPv6 statically? AFAIK Autoconf should also provide a DNS as well.
My router does advertise a DNS server, both via SLAAC and via stateless DHCPv6, but that DNS server doesn't seem to ever be added to /etc/resolv.conf.
But you're right that if I configure the IPv6 address statically, /etc/resolv.conf does get written correctly. So the problem may be related to autoconf, but autoconf isn't writing any nameservers even if the network advertises them.
Thx for the report! I'll look into it!
Hi @mas90, I have a potential fix, would you be interested in testing it?
If so please add a new file in /etc/yum.repo.d
named xcp-ng-brs.repo
.
Then put in it:
[xcp-ng-u-brs2]
name=XCP-ng User BRS 2 Repository
baseurl=https://koji.xcp-ng.org/repos/user/8/8.3/brs2/x86_64/
enabled=0
gpgcheck=1
repo_gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-xcpng
This will add one of my test repo to your yum config (disabled by default of course)
Then run yum update xapi-core --enablerepo=xcp-ng-u-brs2
this will update the XAPI with my fix and with it th DNs should be writen to the resolv file.
If you're okay doing it, please report here the result! Thank you!
Hi @benjamreis, thanks for this! After installing your fix then changing IPv6-configuration-mode back to Autoconf (I had temporarily set it to static as a workaround), for some reason my existing IPv6 DNS server was lost from the configuration but my IPv4 DNS server was successfully added to resolv.conf. After I put my IPv6 DNS server back (xe pif-reconfigure-ipv6 ... DNS=...), both IPv6 and IPv4 DNS servers are in resolv.conf.
So it looks like you successfully fixed the problem, as far as I am concerned :) Except perhaps for the DNS setting being lost initially after update.
Hmm it looks I fix part of it but if you're router advertise DNS with SLAAC it should have been configured without manually specifying it via cli right?
If the intent was to support DNS autoconfiguration via SLAAC, then indeed that seems still not to be working. Static DNS is working after your fix. It would be good to have autoconfiguration working, but at least I can now have working DNS somehow :-)
I tested this fix on two systems, and just discovered that after leaving both of them running for a week or so (with IPv6-configuration-mode=Autoconf, but a static IPv6 DNS server) the IPv6 DNS server has vanished from /etc/resolv.conf leaving only the IPv4 one...
I believe I’m hitting the same (or a similar?) problem with slightly different settings on 8.3 beta 2 and the CI packages:
4dcb3 fiddlers-green ~]# xe pif-param-list uuid=bd19e8f3-db8d-54a2-bb3d-b4941484
uuid ( RO) : bd19e8f3-db8d-54a2-bb3d-b4941484dcb3
device ( RO): eth0
MAC ( RO): fe:ff:ff:ff:ff:ff
physical ( RO): false
managed ( RO): true
currently-attached ( RO): true
MTU ( RO): 1500
VLAN ( RO): 131
vlan-master-of ( RO): 67926b17-e6da-da3a-03d1-d93179b943ea
vlan-slave-of ( RO):
bond-master-of ( RO):
bond-slave-of ( RO): <not in database>
sriov-physical-PIF-of ( RO):
sriov-logical-PIF-of ( RO):
tunnel-access-PIF-of ( RO):
tunnel-transport-PIF-of ( RO):
management ( RO): true
network-uuid ( RO): 95981197-ed76-5b07-3a92-a3e368fca191
network-name-label ( RO): Pool-wide network associated with eth0 on VLAN131
host-uuid ( RO): 644931d6-8604-48e3-b370-6874d40391ef
host-name-label ( RO): fiddlers-green
IP-configuration-mode ( RO): DHCP
IP ( RO): 10.11.131.9
netmask ( RO): 255.255.255.0
gateway ( RO): 10.11.131.1
IPv6-configuration-mode ( RO): Autoconf
IPv6 ( RO): fe80::fab4:6aff:feac:b6d9/64; 2a02:8106:0:6983:fab4:6aff:feac:b6d9/64
IPv6-gateway ( RO): fe80::de2c:6eff:fe66:305b
primary-address-type ( RO): IPv4
DNS ( RO): 10.11.131.1
properties (MRO):
capabilities (SRO):
io_read_kbs ( RO): 0.932
io_write_kbs ( RO): 0.000
carrier ( RO): true
vendor-id ( RO): 10ec
vendor-name ( RO): Realtek Semiconductor Co., Ltd.
device-id ( RO): 8168
device-name ( RO): RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
speed ( RO): 1000 Mbit/s
duplex ( RO): full
disallow-unplug ( RW): false
pci-bus-path ( RO): 0000:05:00.0
other-config (MRW):
igmp-snooping-status ( RO): unknown
After boot, for a short time the resolv.conf
looks fine containing the IPv4 DNS server obtained through DHCP (; generated by /usr/sbin/dhclient-script
), but is then overwritten by an empty file (containing only a newline). The router advertises the DNS via SLAAC, no DHCPv6. I could live with only v4 DNS, but it seems the broken v6 auto configuration ruins that too.
(If this is a different issue, I can open a new issue.)
Issue persists with 8.3 RC1 (after yum update
and reboot)
If I set primary-address-type=IPv6 on my management PIF (with both IPv6 (autoconf) and IPv4 (static) addresses configured, and with both IPv6 and IPv4 DNS servers configured on the PIF), /etc/resolv.conf doesn't contain any nameservers.
This happens both on XCP-ng 8.3 beta 2 and on the latest 8.3 CI packages (i.e. after "yum --enablerepo=xcp-ng-candidates,xcp-ng-testing,xcp-ng-ci update").