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

feat: Conditionally remove networkd online dependency on Ubuntu #5772

Merged
merged 8 commits into from
Oct 17, 2024

Commits on Oct 17, 2024

  1. feat: Conditionally remove networkd online dependency on Ubuntu

    Traditionally, cloud-init-network.service (previously
    cloud-init.service) waited for network connectivity (via systemd
    service ordering) before running. This has caused
    cloud-init-network.service to block boot for a significant amount of
    time. For the vast majority of boots, this network connectivity
    isn't required.
    
    This commit removes the ordering
    After=systemd-networkd-wait-online.service, but checks the datasource
    and user data in the init-local timeframe to see if network
    connectivity will be necessary in the init network timeframe.
    If so, when the init network service starts, it will call
    systemd-networkd-wait-online manually in the same manner that the
    systemd-networkd-wait-online.service does to wait for network
    connectivity.
    
    This commit affects Ubuntu only due to the various number of service
    orderings and network renderers possible, along with the downstream
    synchronization needed. However, a new overrideable method in the
    Distro class should make this optimization trivial to implement for
    any other distro.
    TheRealFalcon committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    e5e7861 View commit details
    Browse the repository at this point in the history
  2. Comments and minor refactors. Additionally, move the wait_on_network …

    …call into the activators.
    TheRealFalcon committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    90e944b View commit details
    Browse the repository at this point in the history
  3. fix the tests I broke

    TheRealFalcon committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    e89971e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    053e484 View commit details
    Browse the repository at this point in the history
  5. Apply the Robie comments.

    The biggest one being write .skip-network rather than .wait-for-network,
    so if there's ever a case where it doesn't get written where it should,
    default behavior will be to wait as we always have.
    TheRealFalcon committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    f5ce515 View commit details
    Browse the repository at this point in the history
  6. Chad comments

    TheRealFalcon committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    2dfb920 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2b308de View commit details
    Browse the repository at this point in the history
  8. additional test case

    TheRealFalcon committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    63ff10b View commit details
    Browse the repository at this point in the history