jpetazzo / pipework

Software-Defined Networking tools for LXC (LinuX Containers)
Apache License 2.0
4.21k stars 727 forks source link

rm: cannot remove ‘/var/run/udhcpc.docker.registry.pid’: No such file or directory #213

Closed Dmitriusan closed 5 months ago

Dmitriusan commented 7 years ago

Looks like udhcp does not create a pid file (at least on Ubuntu 14.04).

I run latest script version from Github:

/opt/pipework.sh int-br docker.registry udhcpc 00:d0:11:11:12:12

This command returns non-zero exit code, because

+ ip netns exec 28712 ip link set dev eth1 address 00:d0:11:11:12:12
+ case "$DHCP_CLIENT" in
+ DHCP_Q=-q
+ '[' '' ']'
+ ip netns exec 28712 udhcpc -qi eth1 -x hostname:docker.registry -p /var/run/udhcpc.docker.registry.pid
udhcpc (v1.22.1) started
/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
Sending discover...
Sending select for 10.99.16.32...
Lease of 10.1.1.32 obtained, lease time 1576800
/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
+ '[' '!' '' ']'
+ rm /var/run/udhcpc.docker.registry.pid
rm: cannot remove ‘/var/run/udhcpc.docker.registry.pid’: No such file or directory

Does anybody else see this behaviour?

Dmitriusan commented 7 years ago

By the way, running pipework with udhcpc-f helps. udhcpc is not really left running after pipework exits, but with this option, the script does not attempt to remove a PID file. Looks like on Ubuntu udhcpc is executed with -q option by default, or something like this.

jpetazzo commented 5 months ago

Closing old issues.