[openstack-dev] [Fuel] Wiping node's disks on delete

Dmitry Guryanov dguryanov at mirantis.com
Tue Mar 22 10:07:20 UTC 2016


Hello,

Here is a start of the discussion -
http://lists.openstack.org/pipermail/openstack-dev/2015-December/083021.html
. I've subscribed to this mailing list later, so can reply there.

Currently we clear node's disks in two places. The first one is before
reboot into bootstrap image [0] and the second - just before provisioning
in fuel-agent [1].

There are two problems, which should be solved with erasing first megabyte
of disk data: node should not boot from hdd after reboot and new
partitioning scheme should overwrite the previous one.

The first problem could be solved with zeroing first 512 bytes of each disk
(not partition). Even 446 to be precise, because last 66 bytes are
partition scheme, see
https://wiki.archlinux.org/index.php/Master_Boot_Record .

The second problem should be solved only after reboot into bootstrap.
Because if we bring a new node to the cluster from some other place and
boot it with bootstrap image it will possibly have disks with some
partitions, md devices and lvm volumes. So all these entities should be
correctly cleared before provisioning, not before reboot. And fuel-agent
does it in [1].

I propose to remove erasing first 1M of each partiton, because it can lead
to errors in FS kernel drivers and kernel panic. An existing workaround,
that in case of kernel panic we do reboot is bad because it may occur just
after clearing first partition of the first disk and after reboot bios will
read MBR of the second disk and boot from it instead of network. Let's just
clear first 446 bytes of each disk.


[0]
https://github.com/openstack/fuel-astute/blob/master/mcagents/erase_node.rb#L162-L174
[1]
https://github.com/openstack/fuel-agent/blob/master/fuel_agent/manager.py#L194-L221


-- 
Dmitry Guryanov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160322/5dcb6582/attachment.html>


More information about the OpenStack-dev mailing list