Bug 1452323 - Ironic disk cleaning to ensure removal of disk labels (not just partitions)
Summary: Ironic disk cleaning to ensure removal of disk labels (not just partitions)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-ironic-lib
Version: 11.0 (Ocata)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ga
: 12.0 (Pike)
Assignee: Dmitry Tantsur
QA Contact: mlammon
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-18 17:17 UTC by John Fulton
Modified: 2018-02-05 19:07 UTC (History)
7 users (show)

Fixed In Version: python-ironic-lib-2.8.0-0.20170621200136.56e7619.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-13 21:28:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1690458 0 None None None 2017-05-18 17:17:49 UTC
OpenStack gerrit 469155 0 None MERGED Add 'sgdisk -Z' to destroy_disk_metadata 2020-06-11 04:31:54 UTC
Red Hat Product Errata RHEA-2017:3462 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 12.0 Enhancement Advisory 2018-02-16 01:43:25 UTC

Description John Fulton 2017-05-18 17:17:50 UTC
In addition to wipefs [0], could Ironic disk_utils also call `sgdisk -Z` or similar?

This issue affects TripleO Ceph deployments as `ceph-disk prepare` is called which in turn calls `sgdisk --mbrtogpt`. While testing a 1020 disk deployment with TripleO, when `sgdisk --mbrtogpt` was called it failed for 143 of the disks but succeeded for the other 877 of the disks; all 1020 of the disks had gone through Ironic cleaning [1]. The 143 disks all had unrecognised disk labels and the issue was worked around by labeling the disks and resuming the deployment to get all 1020 disks activated. I've verified also that `ceph-disk prepare` works with disks which have had `sgdisk -Z` run on them. Using something like `ceph-disk zap` in a preboot script can achieve the same effect, but it seems preferable for TripleO users to just let the Ironic cleaning take care of it.

AFAICT, `wipefs --all` removes partitions but not disk labels. Is there any reason why Ironic cleaning should leave pre-existing GPT/MBR (or even EFI) labels on a disk if the user already opted to have the disk cleaned?

[0] https://github.com/openstack/ironic-lib/commit/042aa9ab5a27e251c8fb2f1855695cf5e791ecf5
[1] As implemented in https://bugs.launchpad.net/ironic/+bug/1603411

Comment 1 Ramon Acedo 2017-05-22 14:28:56 UTC
If both, ‘wipefs —all' + 'sgdisk -Z' is the right way to wipe all the partition table and file system metadata for MBR and GPT, then the missing 'sgdisk -Z’ command needs to be added when wiping the disk metadata.

If confirmed, I'd suggest to treat this as a regular bug, not a RFE.

Comment 2 Ramon Acedo 2017-05-30 14:49:46 UTC
Removing RFE from title. Wiping disk the metadata relied on the 'wipefs' command but the goal is to really wipe the disk metadata which includes partitions and disk labels making it a bug rather than a new feature in my view.

Comment 3 mkovacik 2017-06-26 16:23:59 UTC
patch was merged upstream -> POST https://review.openstack.org/#/c/469155/

Comment 10 errata-xmlrpc 2017-12-13 21:28:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3462


Note You need to log in before you can comment on or make changes to this bug.