Skip to content

[BUG] Network Won't Connect When The Time Is Not Correct #268

@czhang03

Description

@czhang03

Describe the bug
The network will not connect when the time is not correct. HTTPS protocol requires the local time to be correct in order to make the connection.
However, when the time is not correct, NTS also won't run in this case. The failure to run NTS is probably caused by the fact that all the NTS sever is listed as url, and DNS is set to resolve over TLS, which seems to be disrupted by the incorrect system time. I suspect using an IP address of the time sync server as a fallback might fix this problem.
Connection to an IP address over HTTP works fine when the time is off, again suggesting it is a problem with TLS and DNS resolution.

Besides this, I also noticed that systemd-timedated and chrony are active on the system. AFAIK, they serve similar purpose, is there a reason to leave both of them active?

UPDATE: both systemd-timedated and chrony are active on ublue sliverblue-main base image.

To Reproduce
Steps to reproduce the behavior:

  1. Change system time to 2 months from now.
  2. Turn on automatic time sync.
  3. Go to any webpage (even HTTP one), and it will not connect. The problem occurs in the DNS resolution phase.

Expected behavior
The time will be correctly synced, and the network will connect.

Actual behavior
The time did not sync (remains the incorrect time), and the network will not connect.

Your current image

State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 2min 6s ago
Deployments:
  ostree-image-signed:docker://ghcr.io/secureblue/silverblue-main-hardened:latest
                   Digest: sha256:eaec86073e5ced4cf2b4ea1734911aeab64a1d22812b63acfc97b40734761e32
                  Version: 40.20240428.0 (2024-04-28T18:38:24Z)
                     Diff: 3 upgraded, 1 removed
          LayeredPackages: fish ibus-table-mathwriter

● ostree-image-signed:docker://ghcr.io/secureblue/silverblue-main-hardened:latest
                   Digest: sha256:d8842b00a03ce9e968c0ac8e8fe1bec5e01bc44cb9c58ac8995938a8544ba7a4
                  Version: 40.20240427.0 (2024-04-27T18:37:53Z)
          LayeredPackages: fish ibus-table-mathwriter

  ostree-image-signed:docker://ghcr.io/ublue-os/silverblue-main:latest
                   Digest: sha256:63e552a623f4e175f3ab161df97ec80fec409bcdbe1c7f1fab34464780713552
                  Version: 40.20240428.0 (2024-04-28T07:16:48Z)
          LayeredPackages: fish ibus-table-mathwriter

This issue is not reproducible on ublue silverblue-main image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions