Score:0

Amazon Linux 2023 systemd dependencies on cloud-init: Getting ordering cycle

br flag

I have a templated systemd service that depends on cloud-init to be done on Amazon Linux 2023.

[Unit]
Description=My service

After=cloud-init.target

[Service]
Type=exec
EnvironmentFile=/local/service/my.env
ExecStart=/local/service/myservice
Restart=always
User=myuser

[Install]
WantedBy=multi-user.target

A service instance has been enabled via sudo systemctl enable [email protected].

Getting this:

multi-user.target: Found ordering cycle on [email protected]/start
multi-user.target: Found dependency on cloud-init.target/start
multi-user.target: Found dependency on multi-user.target/start
multi-user.target: Job myservice.service@1/start deleted to break ordering cycle starting with multi-user.target/start

This worked on a very recent version of Amazon Linux 2023 and seems to not work now. I'm walking through everything to track it down, but if anyone has insight, that would be awesome.

UPDATE: I changed the WantedBy= to cloud-init.target. This seems to have fixed the problem. I don't have time currently to track down the differences in dependencies between the previous AL2023 AMI and the current, but this should be good for the time being.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.