Open iamjaeholee opened 11 months ago
Thanks for raising this issue. You're right that DIRD does not currently support non-standard paths to ingress_sbox
.
Adding support shouldn't be hard though. Would you mind searching/replacing the standard path with the snap path in the code and trying that to see if it is sufficient?
If it works, we can look to add a command line option for configuring this and officially supporting it.
Okay. Thank you for comment.
I have changed the code like following.
# Delete any relevant preexisting rules.
log "Cleaning up any stale load-balancer rules ..."
nsenter --net=/run/snap.docker/netns/ingress_sbox iptables -t nat -S | \
grep -- '-m ipvs --ipvs -j ACCEPT' | \
sed -r 's/^-A /-D /' | \
while read RULE; \
do
log "- Deleting old rule: iptables -t nat $RULE"
nsenter --net=/run/snap.docker/netns/ingress_sbox iptables -t nat $RULE
done
nsenter --net=/run/snap.docker/netns/ingress_sbox iptables -t mangle -S | \
grep -- '-j TOS --set-tos' | \
sed -r 's/^-A /-D /' | \
while read RULE; \
do
log "- Deleting old rule: iptables -t mangle $RULE"
nsenter --net=/run/snap.docker/netns/ingress_sbox iptables -t mangle $RULE
done
nsenter --net=/run/snap.docker/netns/ingress_sbox iptables -t raw -S | \
grep -- '-j CT --notrack' | \
sed -r 's/^-A /-D /' | \
while read RULE; \
do
log "- Deleting old rule: iptables -t raw $RULE"
nsenter --net=/run/snap.docker/netns/ingress_sbox iptables -t raw $RULE
done
if [ "$INSTALL" = "0" ]; then
log "Docker Ingress Routing Daemon iptables rules uninstalled, exiting."
exit 0
fi
###############
I just change all nsenter --net option.
but encountered other nsenter issue.
2023-12-07.10:28:09.777109|jaeho-VirtualBox|05734| Docker Ingress Routing Daemon 4.1.1 starting ...
nsenter: reassociate to namespace 'ns/net' failed: Invalid argument
2023-12-07.10:28:09.922912|jaeho-VirtualBox|05734| - Couldn't identify ingress network subnet or this node's ingress network IP; sleeping 1s, then exiting.
I have installed docker from snap.
when i try to install DIRD, cannot find ingress_sbox.
I think snap docker save network container in /run/snap.docker/netns/