Skip to content

Commit

Permalink
Fix jenkins service startup
Browse files Browse the repository at this point in the history
Delay jenkins service startup by making it run after
`multi-user.target`.

Make `cloud-config` run after waagent instead of
`mnt-resource.mount`: this is needed to run cloud-config
also in cases where wwagent doesn't trigger
`mnt-resource.mount`.

Signed-off-by: Henri Rosten <[email protected]>
  • Loading branch information
henrirosten committed Feb 14, 2024
1 parent 211229f commit a2e0118
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hosts/azure-common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
# enable cloud-init, so instance metadata is set accordingly and we can use
# cloud-config for ssh key management.
services.cloud-init.enable = true;
systemd.services.cloud-config.after = ["mnt-resource.mount"];
systemd.services.cloud-config.requires = ["mnt-resource.mount"];
systemd.services.cloud-config.after = ["waagent.service"];
systemd.services.cloud-config.requires = ["waagent.service"];

# Use systemd-networkd for network configuration.
services.cloud-init.network.enable = true;
Expand Down
4 changes: 2 additions & 2 deletions hosts/azure/jenkins-controller/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ in {
port = 8081;
withCLI = true;
};
systemd.services.jenkins.after = ["cloud-config.service"];
systemd.services.jenkins.requires = ["cloud-config.service"];
systemd.services.jenkins.after = ["multi-user.target"];
systemd.services.jenkins.requires = ["multi-user.target"];

# set StateDirectory=jenkins, so state volume has the right permissions
# and we wait on the mountpoint to appear.
Expand Down

0 comments on commit a2e0118

Please sign in to comment.