about summary refs log tree commit diff
path: root/nixos/modules/services/system
diff options
context:
space:
mode:
authormaxine <35892750+amaxine@users.noreply.github.com>2024-01-21 00:39:06 +0100
committerGitHub <noreply@github.com>2024-01-21 00:39:06 +0100
commitf0dd758da71944c02da2b68ce04d3df759eb6937 (patch)
tree640e5803403fc2753ce43f97833b211687f2b834 /nixos/modules/services/system
parentb1560d63ea2f1eefe8c784854344339cc5b96e58 (diff)
parentd6baaf1c42b41d5a43ff196bdbe10cf5864f87be (diff)
downloadnixlib-f0dd758da71944c02da2b68ce04d3df759eb6937.tar
nixlib-f0dd758da71944c02da2b68ce04d3df759eb6937.tar.gz
nixlib-f0dd758da71944c02da2b68ce04d3df759eb6937.tar.bz2
nixlib-f0dd758da71944c02da2b68ce04d3df759eb6937.tar.lz
nixlib-f0dd758da71944c02da2b68ce04d3df759eb6937.tar.xz
nixlib-f0dd758da71944c02da2b68ce04d3df759eb6937.tar.zst
nixlib-f0dd758da71944c02da2b68ce04d3df759eb6937.zip
Merge pull request #273707 from illustris/cloud-init
cloud-init: 23.3.3 -> 23.4.1, fix race condition on AWS
Diffstat (limited to 'nixos/modules/services/system')
-rw-r--r--nixos/modules/services/system/cloud-init.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/services/system/cloud-init.nix b/nixos/modules/services/system/cloud-init.nix
index d782bb1a3666..00ae77be4271 100644
--- a/nixos/modules/services/system/cloud-init.nix
+++ b/nixos/modules/services/system/cloud-init.nix
@@ -164,7 +164,10 @@ in
     systemd.services.cloud-init-local = {
       description = "Initial cloud-init job (pre-networking)";
       wantedBy = [ "multi-user.target" ];
-      before = [ "systemd-networkd.service" ];
+      # In certain environments (AWS for example), cloud-init-local will
+      # first configure an IP through DHCP, and later delete it.
+      # This can cause race conditions with anything else trying to set IP through DHCP.
+      before = [ "systemd-networkd.service" "dhcpcd.service" ];
       path = path;
       serviceConfig = {
         Type = "oneshot";