Skip to content
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

Merged
merged 1 commit into from
Dec 14, 2022

Conversation

jandubois
Copy link
Member

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.

Untested, but I believe this
fixes #1242

@jandubois jandubois force-pushed the growpart branch 2 times, most recently from da1358a to e4c7ef9 Compare December 14, 2022 02:46
# 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
Copy link
Member

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

Copy link
Member

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)

Copy link
Member Author

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...

@AkihiroSuda
Copy link
Member

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>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants