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

Add dns config #1875

Merged
Merged

Commits on Jul 20, 2023

  1. bootstrap, core/start-blueos-core: Sync host and container resolv.conf

    This is a workaround to make the container's `resolv.conf` synchronized
    with the host's `resolv.conf`. To do that, we disallow docker from
    managing the container's DNS nameservers by unmounting the container's
    `/etc/resolv.conf`, and soft linking it to the binded host's
    `/etc/resolv.conf`.  So for this to work, the container's
    `/etc/resolv.conf.host` file should be binded (read-only) to the host's
    `/etc/resolv.conf`, for our system, it's configured in
    `bootstrap/startup.json.default`, and a patch is added in
    `core/tools/blueos_startup_update` so systems with older bootstrap
    versions can also work with it.
    
    One detail is that because docker uses `mount` to bind the host's file
    to the container's file, if the file-descriptor of the file changes, the
    bind will be lost. To prevent this, the file being binded must be a hard
    link to the actual `/etc/resolv.conf`, and that hard link file is the
    one being binded. This hard link is being done in
    `core/tools/blueos_startup_update` as `/etc/resolv.conf.host`.
    
    To briefly understand why it is
    necessary, when the docker starts a container, it generates the
    container `/etc/resolv.conf` based on the host's one, or some docker
    configuration, however, during the container's lifetime, if the host's
    DNS configuration changes, the container's DNS doesn't follow it, making
    the container (possibly) unable to resolve DNSs correctly, failing the
    BlueOS Helper's internet connection check. By syncing the container's
    resolv.conf with the host's one, we make sure the container's DNS
    configuration follows the host's changes, thus, ensuring the container
    is able to resolve DNSs correctly.
    joaoantoniocardoso committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    9637568 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3090867 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f923904 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    85fb6fe View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    107ea52 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    276b1cc View commit details
    Browse the repository at this point in the history
  7. core: frontend: src: componenets: app: Change Internet icon to open a…

    … tabbed container with both Interface Priority and Dns Configuraiton
    joaoantoniocardoso committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    47a03ee View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d52c238 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a0f4216 View commit details
    Browse the repository at this point in the history