Skip to content

Commit d6cdfb6

Browse files
committed
supermin: warn if shutdown takes too long and sync earlier
Ensure that we did a disk sync before we write the "success" stamp file and print a warning if the shutdown takes a long time. Magic-sysreq is very robust so this should never happen but lets be robust. Thanks to Simon for the suggestion.
1 parent 496ecfd commit d6cdfb6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/progress/supermin.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,15 @@ osbuild \
8282
--output-directory /output \
8383
--cache /store \
8484
/output/manifest.json
85+
sync
8586
8687
echo "" > /output/%s
8788
8889
# trigger clean shutdown via sysreq
8990
echo _suo > /proc/sysrq-trigger
9091
# shutdown is async so we need to sleep here or PID=0 dies
91-
sleep 999
92+
sleep 300
93+
echo "shutdown takes unusually long, please report as a bug"
9294
`
9395

9496
func addInitTar(superminDir, superminInitScript string) error {

0 commit comments

Comments
 (0)