Skip to content

Commit

Permalink
Check failing elemental-setup stages does not prevent boot and report…
Browse files Browse the repository at this point in the history
…s a degraded systemd status

Signed-off-by: David Cassany <[email protected]>
  • Loading branch information
davidcassany committed Nov 6, 2024
1 parent 27de909 commit 8d609b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/assets/boot_checker_failure.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ stages:
content: |
#!/bin/bash
exit 1
systemctl is-failed --quiet && exit 1
permissions: 0755
owner: 0
group: 0
network:
- name: "A command that just fails"
commands:
- exit 1
- name: "To verify this is still executed"
commands:
- touch /run/elemental/persistent/network-stage.sentinel
3 changes: 3 additions & 0 deletions tests/fallback/fallback_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ var _ = Describe("Elemental booting fallback tests", func() {
Expect(err).ShouldNot(HaveOccurred())
Expect(cmdline).To(ContainSubstring("1"))

cmdline, err = s.Command("sudo test -f /run/elemental/persistent/network-stage.sentinel")
Expect(err).ShouldNot(HaveOccurred())

By("Waiting for the failed health checker to trigger a reboot")
s.EventuallyDisconnects(300)

Expand Down

0 comments on commit 8d609b2

Please sign in to comment.