Zeroing first 1Mb of a block device will almost always
lead to serios system error, if there is a filesystem
on this block device and this filesystem is mounted.
This code had 2 points: to prevent system from booting
from hard drive after reboot and to prevent anaconda
(or other OS installer) to automatically recognize
disk structure. But since we only use image-based provision
this is not the case anymore.
It's enough to clear first 446 bytes of MBR where the first
stage of a bootloader resides. So we will also be able to
check nodes disks and filesystems after deleting it from
cluster for troubleshooting for example, because partition
scheme will not be touched.
Reviewed: https:/ /review. openstack. org/426740 /git.openstack. org/cgit/ openstack/ fuel-astute/ commit/ ?id=9edd8a95767 f5cf36e151aaf48 7405d7e66c4512
Committed: https:/
Submitter: Jenkins
Branch: stable/8.0
commit 9edd8a95767f5cf 36e151aaf487405 d7e66c4512
Author: Dmitry Guryanov <email address hidden>
Date: Fri Mar 25 16:19:29 2016 +0300
Erase only boot code in MBR during node delete
Zeroing first 1Mb of a block device will almost always
lead to serios system error, if there is a filesystem
on this block device and this filesystem is mounted.
This code had 2 points: to prevent system from booting
from hard drive after reboot and to prevent anaconda
(or other OS installer) to automatically recognize
disk structure. But since we only use image-based provision
this is not the case anymore.
It's enough to clear first 446 bytes of MBR where the first
stage of a bootloader resides. So we will also be able to
check nodes disks and filesystems after deleting it from
cluster for troubleshooting for example, because partition
scheme will not be touched.
https:/ /wiki.archlinux .org/index. php/Master_ Boot_Record
Change-Id: I60f2b250d6d599 7b4b471c27ed00d 057ae73c30a 58ffae8db87e633 e9d5e3db91)
Fixes-bug: #1538587
Fixes-bug: #1640014
(cherry picked from commit e770d4ec7d302e9