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

ndppd does not wait for docker interfaces #79

Open
fansari opened this issue Mar 14, 2023 · 0 comments
Open

ndppd does not wait for docker interfaces #79

fansari opened this issue Mar 14, 2023 · 0 comments

Comments

@fansari
Copy link

fansari commented Mar 14, 2023

In my scenario I use ndppd for docker interfaces (which is quite a typical scenario I guess).

But on startup the daemon complains that it cannot bind to the interfaces (because there are not available yet).

With "top" I see that ndppd is taking 100% of the CPU time after boot.

Mar 14 12:36:10 myhost.mydomain systemd[1]: Starting NDP Proxy Daemon...
Mar 14 12:36:10 myhost.mydomain ndppd[748]: (notice) ndppd (NDP Proxy Daemon) version 0.2.4
Mar 14 12:36:10 myhost.mydomain ndppd[748]: (notice) Using configuration file '/etc/ndppd.conf'
Mar 14 12:36:10 myhost.mydomain systemd[1]: ndppd.service: Can't open PID file /run/ndppd/ndppd.pid (yet?) after start: Operation not permitted
Mar 14 12:36:10 myhost.mydomain ndppd[757]: (error) Failed to bind to interface 'docker0'
Mar 14 12:36:10 myhost.mydomain ndppd[757]: (error) Failed to bind to interface 'br_nginx'
Mar 14 12:36:10 myhost.mydomain systemd[1]: Started NDP Proxy Daemon.
Mar 14 12:36:12 myhost.mydomain ndppd[757]: (error) Failed to read from interface '%s'
Mar 14 12:37:30 myhost.mydomain systemd[1]: Stopping NDP Proxy Daemon...
Mar 14 12:37:30 myhost.mydomain ndppd[757]: (error) Shutting down...
Mar 14 12:37:30 myhost.mydomain ndppd[757]: (notice) Bye
Mar 14 12:37:30 myhost.mydomain systemd[1]: ndppd.service: Deactivated successfully.
Mar 14 12:37:30 myhost.mydomain systemd[1]: Stopped NDP Proxy Daemon.
Mar 14 12:37:30 myhost.mydomain systemd[1]: ndppd.service: Consumed 2.069s CPU time.
Mar 14 12:37:30 myhost.mydomain systemd[1]: Starting NDP Proxy Daemon...
Mar 14 12:37:30 myhost.mydomain ndppd[1804]: (notice) ndppd (NDP Proxy Daemon) version 0.2.4
Mar 14 12:37:30 myhost.mydomain ndppd[1804]: (notice) Using configuration file '/etc/ndppd.conf'
Mar 14 12:37:30 myhost.mydomain systemd[1]: ndppd.service: Can't open PID file /run/ndppd/ndppd.pid (yet?) after start: Operation not permitted
Mar 14 12:37:30 myhost.mydomain systemd[1]: Started NDP Proxy Daemon.

My first try was to startup my container with a systemd service and then configure the npppd.service with a "Require" and "After" statement for this service. But this did not help (probably because systemd does not wait until interface and container are up).

I have configured a workaround now with a systemd timer which simply restarts the ndppd one minute after boot.

What is the proper way to configure this?

# /etc/ndppd.conf

proxy ens18 {
  rule 2xxx::xxxx:xxxx:xxxx::/80 {
    iface docker0
  }
  rule 2yyy::yyyy:yyyy:yyyy::/80 {
    iface br_nginx
  }
}

Tested with ndppd-0.2.5-6.el9.x86_64 on CentOS Stream 9.

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

1 participant