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

dracut-[network,crypt-ssh] #13304

Closed
teldra opened this issue Jul 23, 2019 · 11 comments
Closed

dracut-[network,crypt-ssh] #13304

teldra opened this issue Jul 23, 2019 · 11 comments

Comments

@teldra
Copy link
Contributor

teldra commented Jul 23, 2019

System

  • xuname:
    Void 4.19.59_1 x86_64 GenuineIntel notuptodate hold rrrmDFFFFFFFFFFFFFFFFF
    (some packages on hold)

  • package:
    dracut-048_5
    dracut-crypt-ssh-1.0.7_3
    dracut-network-048_5

Expected behavior

Get an IP Address via DHCP at boot to unlock luks.

Actual behavior

Suddenly dracut complains "Duplicated address detected" even if there is no duplicated address and try to get a new one forever. Boot impossible, without deleting rd.neednet=1 ip=dhcp (https://wiki.voidlinux.org/Install_LVM_LUKS#Setup)
Same complain with static IP.

Steps to reproduce the behavior

https://wiki.voidlinux.org/Install_LVM_LUKS#Setup

@tetsumaki
Copy link

Hello, same problem here.
The problem come with the package iputils-20190709_1 (major update).
Screenshot with ping command before (left) and after update (right) : https://framapic.org/7r52Rfkn2Yiw/AODbp6xEo81n.png

I dont now why, but i reproduce after multiple try in vm, i reproduce after that :

# xbps-install -Su iputils
[*] Updating `https://alpha.de.repo.voidlinux.org/current/x86_64-repodata' ...

Name           Action    Version           New version            Download size
base-voidstrap update    0.9_2             0.9_3                  868B
iputils        update    20180629_2        20190709_1             64KB

Size to download:               66KB
Size required on disk:         123KB
Space available on disk:        18GB

Do you want to continue? [Y/n] y

[*] Downloading packages
base-voidstrap-0.9_3.x86_64.xbps: 868B [avg rate: 14MB/s]
base-voidstrap-0.9_3.x86_64.xbps.sig: 512B [avg rate: 4310KB/s]
iputils-20190709_1.x86_64.xbps: 64KB [avg rate: 937MB/s]
iputils-20190709_1.x86_64.xbps.sig: 512B [avg rate: 8929KB/s]

[*] Verifying package integrity
base-voidstrap-0.9_3: verifying RSA signature...
iputils-20190709_1: verifying RSA signature...

[*] Collecting package files
base-voidstrap-0.9_3: collecting files...
iputils-20190709_1: collecting files...
iputils-20180629_2: collecting files...

[*] Unpacking packages
base-voidstrap-0.9_2: updating to 0.9_3 ...
base-voidstrap-0.9_3: unpacking ...
iputils-20180629_2: updating to 20190709_1 ...
Removing 'ping' alternatives group symlink: ping
Removing 'ping' alternatives group symlink: ping.8
Removing 'ping6' alternatives group symlink: ping6
Removing 'ping6' alternatives group symlink: ping6.8
iputils-20190709_1: unpacking ...
Creating 'ping' alternatives group symlink: ping -> /usr/bin/iputils-ping
Creating 'ping' alternatives group symlink: ping.8 -> /usr/share/man/man8/iputils-ping.8
Creating 'ping6' alternatives group symlink: ping6 -> /usr/bin/iputils-ping
Creating 'ping6' alternatives group symlink: ping6.8 -> /usr/share/man/man8/iputils-ping.8

[*] Configuring unpacked packages
base-voidstrap-0.9_3: configuring ...
base-voidstrap-0.9_3: updated successfully.
iputils-20190709_1: configuring ...
iputils-20190709_1: post-install message:
========================================================================
Since iputils-20161105,
ping and ping6 as well as tracepath and tracepath6 have been unified.
Use ping -4 or tracepath -4 to force ICMPv4.
========================================================================
iputils-20190709_1: updated successfully.

2 downloaded, 0 installed, 2 updated, 0 configured, 0 removed.

@tetsumaki
Copy link

Install old version of iputils solve the problem immediatly :

# xbps-install -Sf iputils-20180629_3
[*] Updating `https://alpha.de.repo.voidlinux.org/current/x86_64-repodata' ...
Unable to locate 'iputils-20180629_3' in repository pool.
-bash-5.0# xbps-rindex -a /tmp/*.x*
index: added `iputils-20180629_3' (x86_64).
index: 1 packages registered.
-bash-5.0# xbps-install -Sf iputils-20180629_3
[*] Updating `https://alpha.de.repo.voidlinux.org/current/x86_64-repodata' ...

Name    Action    Version           New version            Download size
iputils downgrade 20190709_1        20180629_3             -

Size required on disk:         181KB
Space available on disk:        18GB

Do you want to continue? [Y/n] y

[*] Downloading packages

[*] Verifying package integrity
iputils-20180629_3: verifying SHA256 hash...

[*] Collecting package files
iputils-20180629_3: collecting files...
iputils-20190709_1: collecting files...

[*] Unpacking packages
iputils-20180629_3: unpacking ...
Creating 'ping' alternatives group symlink: ping -> /usr/bin/iputils-ping
Creating 'ping' alternatives group symlink: ping.8 -> /usr/share/man/man8/iputils-ping.8
Creating 'ping6' alternatives group symlink: ping6 -> /usr/bin/iputils-ping
Creating 'ping6' alternatives group symlink: ping6.8 -> /usr/share/man/man8/iputils-ping.8

[*] Configuring unpacked packages
iputils-20180629_3: configuring ...
iputils-20180629_3: post-install message:
========================================================================
Since iputils-20161105,
ping and ping6 as well as tracepath and tracepath6 have been unified.
Use ping -4 or tracepath -4 to force ICMPv4.
========================================================================
iputils-20180629_3: installed successfully.

0 downloaded, 1 installed, 0 updated, 1 configured, 0 removed.

And rebuild kernel :

# xbps-reconfigure -f linux4.19
linux4.19: configuring ...
Executing post-install kernel hook: 20-dracut ...
Executing post-install kernel hook: 50-grub ...
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.19.25_1
Found initrd image: /boot/initramfs-4.19.25_1.img

Reboot, and problem is solved.

@tetsumaki
Copy link

I think, the problem is in /usr/lib/dracut/modules.d, probably 40network and usage of ip command.
With the new version of iputils -> problem.

@tetsumaki
Copy link

I think the best solution for now is downgrade package in official repository no ?
dracut is not ready for new iputils.

@teldra
Copy link
Contributor Author

teldra commented Jul 31, 2019

@tetsumaki
Copy link

Curious return code with arping and iputils_20190709_1 no ?

In screenshot, left is not ok and right is ok : https://framapic.org/sSNjldqjR3is/l2cXAj5vGJHm.png

And the code in /usr/lib/dracut/modules.d/40network/ifup.sh :

if ! arping -f -q -D -c 2 -I $netif $ip ; then
	warn "Duplicate address detected for $ip for interface $netif."
	return 1
fi

@teldra
Copy link
Contributor Author

teldra commented Jul 31, 2019

For me, arping only works, if I remove -D.
With -D:

└[~]> arping -f -D -c 2 -I wlp2s0 10.1.1.2; echo $?
ARPING 10.1.1.2 from 0.0.0.0 wlp2s0
Unicast reply from 10.1.1.2 [MACADDRESS]  3.960ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)
1

└[~]> arping -f -D -c 2 -I wlp2s0 10.1.1.77; echo $?
ARPING 10.1.1.77 from 0.0.0.0 wlp2s0
Sent 2 probes (2 broadcast(s))
Received 0 response(s)
1

Without -D:

└[~]> arping -f -c 2 -I wlp2s0 10.1.1.2; echo $? 
ARPING 10.1.1.2 from 10.1.1.5 wlp2s0
Unicast reply from 10.1.1.2 [MACADDRESS]  3.934ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)
0

└[~]> arping -f -c 2 -I wlp2s0 10.1.1.77; echo $? 
ARPING 10.1.1.77 from 10.1.1.5 wlp2s0
Sent 2 probes (2 broadcast(s))
Received 0 response(s)
1

From man arping:

-D
  Duplicate address detection mode (DAD). See RFC2131, 4.4.1. Returns
  0, if DAD succeeded i.e. no replies are received.

Is it necessary?

@teldra
Copy link
Contributor Author

teldra commented Jul 31, 2019

Update to 049 only works with NetworkManager, as it seems.
Removing -D only works from running OS, not at boottime.

@teldra
Copy link
Contributor Author

teldra commented Jul 31, 2019

Seems to be an error in arping: Wrong exitcode when using -D. Reported it upstream.
When using NetworkManager, arping is not used (in version 049) afaik.

kerolasa added a commit to iputils/iputils that referenced this issue Jul 31, 2019
Commit 84ca65c caused regression.  The
arping -D needs return value evaluation that was the earlier default, in
other cases the new return value should be correct.

Addresses: #209
See-also: void-linux/void-packages#13304
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
@teldra
Copy link
Contributor Author

teldra commented Jul 31, 2019

Fixed with this: #13446

@tetsumaki
Copy link

Very nice.

@teldra teldra closed this as completed Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants