Bug 1129500
| Summary: | DHCPv6-only ifup-eth fails to even run dhclient -6 due to a link-local IPv6 address still being 'tentative' | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Ondřej Svoboda <osvoboda> | ||||||
| Component: | dhcp | Assignee: | Jiri Popelka <jpopelka> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 20 | CC: | danken, jonathan, jpopelka, lnykryn, thozza, vpavlin, zbyszek | ||||||
| Target Milestone: | --- | Keywords: | Reopened | ||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | dhcp-4.2.7-2.fc20 | Doc Type: | Bug Fix | ||||||
| Doc Text: |
Cause
Sometimes when DHCPv6 client (i.e. dhclient with '-6' command line option) is started to configure network interface which is not fully "up".
Consequence
dhclient fails to run, because network interface does not have link-local address yet, which is needed for DHCPv6 client.
Fix
A wait loop was added into dhclient-script.
Result
dhclient doesn't fail due to missing link-local address.
|
Story Points: | --- | ||||||
| Clone Of: | |||||||||
| : | 1130803 1130804 (view as bug list) | Environment: | |||||||
| Last Closed: | 2014-08-27 01:33:13 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Ondřej Svoboda
2014-08-13 00:53:01 UTC
Created attachment 926231 [details]
commands to reproduce the bug
(In reply to Ondřej Svoboda from comment #0) > A simple way to fix this issue is to busy-wait until 'ip -6 -o addr show > veth_45' stops reporting the 'tentative' flag. A harder one is to wait in > dhclient. We might add such a waiting into dhclient-script after we 'up' the interface in PREINIT6, see line 707 in http://pkgs.fedoraproject.org/cgit/dhcp.git/tree/dhclient-script Something like this works for me:
PREINIT6)
# ensure interface is up
ip link set dev ${interface} up
# remove any stale addresses from aborted clients
ip -6 addr flush dev ${interface} scope global permanent
for i in $(seq 3); do
# tentative flag == DAD is still not complete
tentative=$(ip -6 addr show dev ${interface} scope link | grep tentative)
if [ -z "${tentative}" ] ; then
# DAD is over
exit_with_hooks 0
fi
sleep 1
done
exit_with_hooks 0
;;
Could you try to modify PREINIT6 in /usr/sbin/dhclient-script like that and see if it fixes the problem for you Ondrej ?
I confirm this approach works. It takes ~1.5 second for the link-local address to lose the tentative flag and approx. 2 seconds for the global address, "measured" using the following snippet in the same environment as originally. while true; do date +%X.%N; ip addr show dev veth_45; sleep 0.1; done; To avoid waiting too much, could we shorten the period to less than half a second? If it would not be too resource-intensive (which I doubt), even go down to 0.1 s and have 30–50 cycles (in a similar situation, there is a 5s limit in dhclient-script [1]). [1] http://pkgs.fedoraproject.org/cgit/dhcp.git/tree/dhclient-script#n563 Fixed in rawhide/F21 with: http://pkgs.fedoraproject.org/cgit/dhcp.git/commit/?h=f21&id=991bd354d956cc2f31ba75689ddcca0021706f0b I'd rather not push this into F20. It does not happen 100% of time but the very existence of the link-local address is not guaranteed that early (after 100ms). We also have to check that
linklocal=$(ip -6 addr show dev ${interface} scope link)
…
if [ ! -z "${linklocal}" -a -z "${tentative}" ] ; then
Dan, I assume we need this change backported to EL because that is where VDSM is supposed to run. What systems do we want to support DHCPv6 in?
Ondrej, what about this ?
for i in $(seq 50); do
linklocal=$(ip -6 addr show dev ${interface} scope link)
tentative=$(echo "${linklocal}" | grep tentative)
[[ -n "${linklocal}" && -z "${tentative}" ]] && exit_with_hooks 0
sleep 0.1
done
Jirka, thanks, this is it exactly and work reliably :-) Jiri, can we have this backported to f20, el7 and el6? We would oVirt's Vdsm to start using dhcp6. (In reply to Dan Kenigsberg from comment #9) > Jiri, can we have this backported to f20 Sure, dhcp-4.2.7-2.fc20 should do the trick: http://pkgs.fedoraproject.org/cgit/dhcp.git/commit/?h=f20&id=88bb3be48ee88795f43ba90c4ef1bf3a33a03c96 > el7 and el6? You have to clone this bug for these products if you want it to be fixed there. dhcp-4.2.7-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/FEDORA-2014-8287/dhcp-4.2.7-2.fc20 Package dhcp-4.2.7-2.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dhcp-4.2.7-2.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-8287/dhcp-4.2.7-2.fc20 then log in and leave karma (feedback). 4.2.7-2.fc20 works fine! :-) I cloned the bug to EL6 and EL7. dhcp-4.2.7-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. |