Skip to content

[Bug]: using system dns occasionally causes all network egress to fail #1241

@ptone

Description

@ptone

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

Apologies for not having a solid repro

Current behavior

I'm setting the network route for containers to reach localhost servers with:
sudo container system dns create host.containers.internal --localhost 203.0.113.113

But occasionally, and randomly, this puts the network into a state where all DNS breaks and I can not egress from the containers. ('curl google.com' fails)

Sometimes this is transient and will start working again

More often than not I have to stop/start the services and then delete and recreate the DNS entry in the container system.

I'm realizing I need to try pinging an external IP address to check whether it is just DNS or actual packet egress

Note - a small difference which may be a docs issue

As I'm working with both podman and apple-container, I use "host.containers.internal" (note the plural) which is what podman sets up by default. The docs for this project use singular: "host.container.internal"

I caught this quickly - but could lead to confusion

Expected behavior

egress to work

Happy to get some suggested commands when this happens to provide more info

Environment

- OS: 
- Xcode: 
- Container:

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions