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

flatcar-install: Add "-s" flag to install to smallest disk #7

Merged
merged 1 commit into from Aug 6, 2019

Conversation

@pothos
Copy link
Contributor

commented Aug 2, 2019

When provisioning a machine, it makes sense to install
Flatcar to the smallest disk.

The disk is chosen by looking at unmounted block devices with a size
greater than 10GB. Which block devices this search should
be restricted to can be configured with the "-I" flag with
a list of major device numbers to search for, or the "-e" flag
with a list of major device numbers to exclude when searching.

@rata
Copy link

left a comment

Overall looks fine for me.

Maybe we want to make this even simpler or smaller, and mention that is experimental? It "feels" better if an experimental feature that might be removed in the future is more contained, IMHO, and has a little as possible exposure to the end user

Show resolved Hide resolved bin/flatcar-install Outdated
Show resolved Hide resolved bin/flatcar-install Outdated
Show resolved Hide resolved bin/flatcar-install Outdated
Show resolved Hide resolved bin/flatcar-install Outdated
Show resolved Hide resolved bin/flatcar-install Outdated
Show resolved Hide resolved bin/flatcar-install Outdated
@invidian
Copy link
Member

left a comment

Just a thought, do we want this feature to be available for everyone? Maybe we should simply keep it on the separated branch just for testing for now?

@pothos pothos force-pushed the kai/install-to-smallest branch from 04f3a89 to 51114fd Aug 2, 2019

@rata

rata approved these changes Aug 5, 2019

Copy link

left a comment

LGTM, just small comments

Show resolved Hide resolved bin/flatcar-install Outdated
Show resolved Hide resolved bin/flatcar-install Outdated
@rata

This comment has been minimized.

Copy link

commented Aug 5, 2019

Just a thought, do we want this feature to be available for everyone? Maybe we should simply keep it on the separated branch just for testing for now?

Not sure what is easier in the current workflow, I'll let @dongsupark decide :)

Show resolved Hide resolved bin/flatcar-install Outdated

@pothos pothos force-pushed the kai/install-to-smallest branch from 51114fd to 4181b3f Aug 5, 2019

@dongsupark

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2019

I've not read the code yet.

Just a thought, do we want this feature to be available for everyone? Maybe we should simply keep it on the separated branch just for now? Or at least until they have time to test it?

Yes, I agree.
Let's keep it on a branch, so that people could use it for now.

@pothos pothos force-pushed the kai/install-to-smallest branch from 4181b3f to 6a4b96d Aug 5, 2019

flatcar-install: Add "-s" flag to install to smallest disk
When provisioning a machine, it makes sense to install
Flatcar to the smallest disk.

The disk is chosen by looking at unmounted block devices with a
size greater than 10GB. Which block devices this search should
be restricted to can be configured with the "-I" flag with
a list of major device numbers to search for, or the "-e" flag
with a list of major device numbers to exclude when searching.

@pothos pothos force-pushed the kai/install-to-smallest branch from 6a4b96d to 229910d Aug 5, 2019

@pothos

This comment has been minimized.

Copy link
Contributor Author

commented Aug 5, 2019

I've added a check to ignore mounted disks because this would lead to either data loss or a broken installation if the current filesystems write to the same disk (and wipefs would anyway refuse to run later).

@pothos pothos changed the base branch from flatcar-master to install-to-smallest-disk Aug 5, 2019

@pothos

This comment has been minimized.

Copy link
Contributor Author

commented Aug 5, 2019

I've changed the merge target to be install-to-smallest-disk.

@pothos pothos requested a review from dongsupark Aug 5, 2019

@dongsupark
Copy link
Contributor

left a comment

Looks good in general. 👍

The minimum size 10G looks a little tight, as Flatcar can run in theory with smaller filesystem size as well.
Though in that specific use case, it's true that 99% of the cases would have >= 10G of rootfs.

Feel free to merge to the install-to-smallest-disk branch.

@pothos pothos merged commit b299df1 into install-to-smallest-disk Aug 6, 2019

@pothos pothos deleted the kai/install-to-smallest branch Aug 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.