-
Notifications
You must be signed in to change notification settings - Fork 72
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
additional installer option to wipe all disks before install #660
Conversation
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.
LGTM!
cc @m-ildefons |
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.
Just doing a build to give this a quick test, but LGTM.
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.
LGTM, thank you!
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.
Hang on... I just tried this in a previously used VM, and hit an error. It was a manual install, not PXE, but I edited the kernel args in the grub menu to add harvester.install.wipe_disks=true
to get this PR into play. Here's what I ended up with:
Note that the wipe did succeed - previously /dev/vdb and /dev/vdc had a bunch of partitions on them, and now they're gone:
# cat /proc/partitions
major minor #blocks name
7 0 581632 loop0
253 0 125829120 vda
253 16 4294967296 vdb
253 32 209715200 vdc
253 48 20971520 vdd
11 0 5863104 sr0
I'll re-run and see what I can figure out....
It's the
|
Hi @tserong, |
In this case |
There's nothing there. What am I missing? |
How about vdc? |
vdc is the same (no partitions). I did a little more digging, turns out the partprobe of all devices is picking up the CD-ROM:
So, I've got a couple of ideas:
|
nice catch, sr0 can not show the partition table. If you just run |
Yup:
|
One other thought - as I mentioned in harvester/harvester#4527 (comment):
I still think this PR is fine, but when we document the |
0bac4f4
to
2a26338
Compare
Added partprobe based on feedback partprobe wiped disk only fixed indentation based on feedback
2a26338
to
4c32fa6
Compare
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.
I've just re-tested with the partprobe -s /dev/$disk
change - works like a charm.
@Mergifyio backport v1.2 |
✅ Backports have been created
|
Problem:
During out internal automation testing it is possible different disks were used to install of harvester.
When the disk is changed the older installation is left intact which can cause unexpected results during reboots.
To ensure this does not happen we need to be able to allow wiping of disks via the installer.
Solution:
PR adds an additional option in harvester config
wipeDisks
which can be passed via a config url or kernel argumentsharvester.install.wipe_disks=true
and will result in the harv-install script wiping all disks on the node.Related Issue:
harvester/harvester#2066
harvester/harvester#2781
harvester/harvester#4527
Test plan: