Repository navigation
fix(install): don't order gadgetcast after cloud-init.target - #29
Merged
Merged
Conversation
cloud-init.target is ordered after multi-user.target, while gadgetcast is wanted by multi-user.target and ordered after cloud-init.target. On a flashed image's first boot systemd found the cycle and skipped gadgetcast.service. Order after the cloud-init stages that apply the Imager settings (cloud-init.service, cloud-config.service) instead. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K4B4YKMC6fT9oWCCwWgt9S
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: on a freshly flashed Pi image's first boot, systemd logged
Found ordering cycle on gadgetcast.service/start … cloud-init.target … multi-user.targetand skipped gadgetcast. The web UI never came up until a later boot.After: gadgetcast waits for the cloud-init stages that apply Raspberry Pi Imager's hostname, user and Wi-Fi settings (
cloud-init.service,cloud-config.service), and starts on first boot.How:
cloud-init.targetisAfter=multi-user.target, whilegadgetcast.serviceisWantedBy=multi-user.targetand wasAfter=cloud-init.target. That is a cycle. Ordering after the two services removes it, because neither one is ordered after multi-user.target. I checked this against the cloud-init 26.1 unit files. If a unit doesn't exist on a system, ordering after it is a no-op.Test level: the cycle was seen in a QEMU (raspi3b) boot of the locally built arm64 v0.1.0 image, and its cause was traced to the unit files. The fix is checked with
sh -nand by reading cloud-init's unit ordering. A QEMU first-boot re-test of the patched image comes next. Not tested on real Pi hardware.Generated by Claude Code