-
Notifications
You must be signed in to change notification settings - Fork 81
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
Wipe Disks Improvements #885
base: master
Are you sure you want to change the base?
Conversation
PR introduces two new fields in the harvester config wipeDisksList and wipeAllDisks and drops the old wipeDisks introduced in v1.3 There is an extra panel in disk configuration page. The extra panel contains a drop down menu which gets rendered and populated if installer finds additional disks with existing elemental based installations which are not already used in install device or additional data device
ForceGPT bool `json:"forceGpt,omitempty"` | ||
Role string `json:"role,omitempty"` | ||
WithNetImages bool `json:"withNetImages,omitempty"` | ||
WipeDisks bool `json:"wipeDisks,omitempty"` |
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.
Do we need any doc to indicate that harvester.install.wipe_disks
is now deprecated? Presumably, with this change, all existing references to harvester.install.wipe_disks
won't work anymore, right?
// when WipeAllDisks is enabled then find all non installation disks with COS_ prefixed labels | ||
// and add them to a list for wiping |
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.
From a UX perspective, we might need to document that this setting wipe all disks except for the installation and data disks.
return err | ||
} | ||
if len(options) != 0 { | ||
if slices.Contains(c.config.WipeDisksList, c.config.Device) || slices.Contains(c.config.WipeDisksList, c.config.DataDisk) { |
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.
Doesn't getWipeDisksOptions()
already perform this filtering?
// if there are no additional disks to wipe then it checks if MBR needs to be enabled | ||
// else will move on to the next apge | ||
isWipeDisksNeeded := func(g *gocui.Gui, v *gocui.View) error { | ||
options, err := getWipeDisksOptions(c.config) |
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.
Is there an option for the user to not select a disk, and leave this blank? Or is it required to always provide at least one disk to wipe?
This pull request is now in conflict. Could you fix it @ibrokethecloud? 🙏 |
Problem:
We introduced a field in Harvester config named
wipeDisks
which when set ran a script in the installer to iterate over all disk devices visible to the host and wipe them.This ended up being too aggressive, not to mention not all disks may contain old Harvester installations.
Solution:
PR introduces two new fields in the harvester config wipeDisksList and wipeAllDisks and drops the old wipeDisks introduced in v1.3
There is an extra panel in disk configuration page. The extra panel contains a drop down menu which gets rendered and populated if installer finds additional disks with existing elemental based installations which are not already used in install device or additional data device.
The extra
Wipe Disks
panels will only be available when there are additional disks visible to the host which have a partition withCOS_OEM
label and such disk is not already being used inInstall Device
orInstall Data Device
.User can also pass these fields via ipxe using the following two new fields
or
wipeAllDisks
uses the same logic as the installersWipe Disks Panel
where it will identify additional disks withCOS_OEM
partition which are not already being used asInstall Device
orInstall Data Device
.Related Issue:
harvester/harvester#6304
harvester/harvester#6533
Test plan: