Add timeout to bluetoothctl check to prevent CI hang#6
Merged
Conversation
bluetoothctl list can block indefinitely waiting for a D-Bus name when bluez is installed but bluetoothd cannot start (e.g. in containers). ignore_errors only catches non-zero exits, not hangs. Wrap with timeout(1) and switch to failed_when:false so the playbook moves on. https://claude.ai/code/session_01D7LfRWuFEbNFoLTLBkQhXQ
ansible-lint's risky-shell-pipe rule exempts piped shells guarded by ignore_errors:true. Switching to failed_when:false removed that exemption, so add set -o pipefail like the other piped shell tasks in this repo (nvidia.yml, i3.yml resolution checks). https://claude.ai/code/session_01D7LfRWuFEbNFoLTLBkQhXQ
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.
Summary
bluetoothctl listwithtimeout 5so the CI desktop role on Fedora 43 can't hang indefinitely whenbluezis installed butbluetoothdcannot start (no hardware in the container).ignore_errors: true→failed_when: false, which is necessary becauseignore_errorsonly catches non-zero exits, not infinite blocking — and renders more cleanly in the playbook output.desktop_bluetooth_devices.stdoutwill be empty on timeout, which the next task (Register bluetooth support) already treats as "no bluetooth support", so semantics are preserved.Why
The
desktop (Fedora 43)job has been hanging in CI (e.g. PR #4, PR #5). PR #5 removes the Signal flatpak install entirely and is still hanging, which means the hang is upstream ofsignal.ymlin the desktop role. The most plausible candidate at that point in the task order is the bluetoothctl check, sincebluezis installed in the dnf step just above it, D-Bus tries to activatebluetooth.service, andbluetoothctl listcan block waiting for the daemon's D-Bus name to appear rather than failing fast. Behavior likely differs between F42's and F43's bluez/systemd combo.Test plan
desktop (Fedora 43)in a reasonable amount of timedesktop (Fedora 42)headless (Fedora 42)andheadless (Fedora 43)https://claude.ai/code/session_01D7LfRWuFEbNFoLTLBkQhXQ
Generated by Claude Code