Skip to content

Comments

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

Merged
pothos merged 1 commit intoinstall-to-smallest-diskfrom
kai/install-to-smallest
Aug 6, 2019
Merged

flatcar-install: Add "-s" flag to install to smallest disk#7
pothos merged 1 commit intoinstall-to-smallest-diskfrom
kai/install-to-smallest

Conversation

@pothos
Copy link
Member

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

Copy link
Member

@rata rata left a comment

Choose a reason for hiding this comment

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

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

Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

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

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 Compare August 2, 2019 16:47
Copy link
Member

@rata rata left a comment

Choose a reason for hiding this comment

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

LGTM, just small comments

@rata
Copy link
Member

rata 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 :)

@pothos pothos force-pushed the kai/install-to-smallest branch from 51114fd to 4181b3f Compare August 5, 2019 10:17
@dongsupark
Copy link
Member

dongsupark 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 Compare August 5, 2019 11:48
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 Compare August 5, 2019 11:50
@pothos
Copy link
Member Author

pothos 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 August 5, 2019 13:58
@pothos
Copy link
Member Author

pothos commented Aug 5, 2019

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

@pothos pothos requested a review from dongsupark August 5, 2019 15:14
Copy link
Member

@dongsupark dongsupark left a comment

Choose a reason for hiding this comment

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

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 August 6, 2019 09:06
jepio pushed a commit that referenced this pull request Feb 21, 2022
dracut: check both OEM IDs for flatcar and coreos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants