-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build_library/grub_install: Try mounting ESP directory in a loop #1267
Conversation
Apparently successful `[[ -b "${LOOP_DEV}p1" ]]` check is not enough - the mount can still fail. So instead of doing those checks, try mounting and reprobing in the loop with some small exponential backoffs.
fi | ||
warn "loopback device node ${LOOP_DEV}p1 still missing, reprobing..." | ||
sudo blockdev --rereadpt "${LOOP_DEV}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to be sure that it succeeds, use sudo partprobe "${LOOP_DEV}"
because blockdev
can fail with BLKRRPART: Device or resource busy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Had the same problem with Ignition creating partitions on the boot device)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can revisit this, if issues with grub install script crop up again.
build_library/grub_install: Try mounting ESP directory in a loop
build_library/grub_install: Try mounting ESP directory in a loop
build_library/grub_install: Try mounting ESP directory in a loop
build_library/grub_install: Try mounting ESP directory in a loop
Backported to 3033, 3510, 3602 and 3745. |
Build action triggered: https://github.com/flatcar/scripts/actions/runs/6560445310 |
Apparently successful
[[ -b "${LOOP_DEV}p1" ]]
check is not enough - the mount can still fail. So instead of doing those checks, try mounting and reprobing in the loop with some small exponential backoffs.Tested in http://jenkins.infra.kinvolk.io:8080/job/container/job/image/3905/