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

Interface IP source doesn't refresh when server connects to internet on boot #69

Open
jm355 opened this issue May 18, 2024 · 2 comments

Comments

@jm355
Copy link
Contributor

jm355 commented May 18, 2024

When I reboot my server, docker compose/caddy starts before it connects to the internet and has an IP address, so the interface IP source doesn't return anything and so doesn't update the dynamic dns with the new IP once it does connect.

Possible solutions:

  • Have a "disconnected TTL" option with a default of, say, 20 seconds, so when all sources fail to return an IP address, they will keep trying until it works
  • When all sources fail, check if the system is online and wait to be online before trying again. This could be combined with the above, so the "disconnected TTL" option would only be used once it's online again until a source returns an IP, at which point it will use the normal TTL value
  • Could apply those globally, or only to certain sources like the interface source
@francislavoie
Copy link
Collaborator

The solution is probably that you delay the Docker service to start after the networking services. If you're using systemd, you'd want to adjust the Docker service with After=network.service, I think.

@jm355
Copy link
Contributor Author

jm355 commented May 18, 2024

Hmm, it looks like my docker service already has After=network-online.target. I'm just using the default one in debian bookworm for docker compose.

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