-
Notifications
You must be signed in to change notification settings - Fork 637
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
Check if growpart is installed before calling it #1243
Conversation
da1358a
to
e4c7ef9
Compare
# growpart command may be missing in older VMs | ||
if command -v growpart >/dev/null 2>&1; then | ||
# Automatically expand the data volume filesystem | ||
growpart "$DATA_DISK" 1 || true |
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.
Not new in this PR, but the final exit code of the script should be set to non-zero when growpart fails
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.
(This can be another PR in the future)
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.
Why does it make a difference; won't the failure of growpart
(or resize2fs
) show up in the cloud-init log anyways?
Please file an issue if you think this is really necessary; I won't have time for it until after the holidays, and will probably forget by then...
Thanks, confirmed that this fixes #1242 |
Both `cloud-utils-growpart` (for `growpart`) and `e2fsprogs-extra` (for `resize2fs`) have only been recently added to alpine-lima. Running an existing VM based on an older Alpine ISO will then fail the boot script calling utilities that have not been installed. Signed-off-by: Jan Dubois <jan.dubois@suse.com>
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.
Thanks
Both
cloud-utils-growpart
(forgrowpart
) ande2fsprogs-extra
(forresize2fs
) have only been recently added to alpine-lima.Running an existing VM based on an older Alpine ISO will then fail the boot script calling utilities that have not been installed.
Untested, but I believe this
fixes #1242