Closed Dweller closed 2 years ago
Was the container running when the proxy device was added?
Looking at this now to see if I can recreate.
I've used this test and have not been able to reproduce:
lxc launch images:ubuntu/focal c1
lxc exec c1 -- apt install nginx -y
lxc exec c1 -- systemctl enable nginx --now
lxc config device add c1 p1 proxy listen=tcp:0.0.0.0:8080 connect=tcp:127.0.0.1:80
curl http://127.0.0.1:8080
lxc stop -f c1
ps aux | grep forkproxy
lxc delete -f c1
Please can you provide a reproducer using the lxc
commands and show how the service inside the instance is running (i.e is it reproducible with something that can be installed from the distribution like nginx in my test)?
Also can you consult the debug log when this occurs:
sudo snap set lxd daemon.debug=true; sudo systemctl reload snap.lxd.daemon
sudo tail -f /var/snap/lxd/common/lxd/logs/lxd.log
And see if there are any errors or entries regarding the proxy device name and its stop process?
I've also tested this using the snap lxd 4.23 package on ubuntu 20.04 with stock kernel and couldn't recreate.
Required information
Issue description
After creating a LXD instance using the AlmaLinux cloud image I've created a proxy from the host to the instance from host:8080 to instance:80. This works and no problems to this point. However when I force delete the running instance the forkproxy for the [prt 8080->80 still remains and prevents the creation of a new proxy on the same ports to a new container.
Steps to reproduce
1000000 138075 9744 0 10:03 ? 00:00:00 /snap/lxd/current/bin/lxd forkproxy -- 9744 -1 tcp:0.0.0.0:8080 131212 -1 tcp:127.0.0.1:80 0644