Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1381511 - Code for config drive incorrectly counts primary partitions
Code for config drive incorrectly counts primary partitions
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-ironic-lib (Show other bugs)
10.0 (Newton)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: 10.0 (Newton)
Assigned To: Lucas Alvares Gomes
Sergii Nozhka
: Triaged
Depends On:
Blocks: 1355903
  Show dependency treegraph
 
Reported: 2016-10-04 06:57 EDT by Yolanda Robla
Modified: 2016-12-14 11:07 EST (History)
11 users (show)

See Also:
Fixed In Version: python-ironic-lib-2.1.1-2.el7ost
Doc Type: Bug Fix
Doc Text:
OpenStack Bare Metal (ironic) provides user data to new nodes through the creation of a configdrive as an extra primary partition. This requires a free primary partition available on the node's disk. However, a bug caused OpenStack Bare Metal to not distinguish between primary and extended partitions, which caused the partition count to report no free partitions available for the configdrive. This fix distinguishes between primary and extended partitions. Deployments now succeed without error.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-14 11:07:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1629926 None None None 2016-10-04 06:57 EDT
OpenStack gerrit 396636 None None None 2016-11-14 05:58 EST
Red Hat Product Errata RHEA-2016:2948 normal SHIPPED_LIVE Red Hat OpenStack Platform 10 enhancement update 2016-12-14 14:55:27 EST

  None (edit)
Description Yolanda Robla 2016-10-04 06:57:59 EDT
I'm hitting an error when using full disk images, and extended partitions. My disk is having just a primary partition, but also has swap and extended partition. Output from parted is something like:

 "BYT;
1:1.00MiB:4768MiB:4767MiB:ext4::boot;
2:4768MiB:5722MiB:954MiB:xfs::;
3:5722MiB:7168MiB:1446MiB:::lba;
5:5722MiB:5865MiB:143MiB:linux-swap(v1)::;
6:5865MiB:6247MiB:381MiB:xfs::;
7:6247MiB:7168MiB:921MiB:xfs::;"

When i try to deploy, I hit the error:

Exception: Deploy failed for instance 0c786f46-6552-4309-8c6d-99c01d013696. Error: Config drive cannot be created for node da9d1550-c531-4cc8-b91f-c3d96fd52ff7. Disk uses MBR partitioning and already has 5 primary partitions.

That is because code on list_partitions() is just using a simple regex and counting all partitions without considering the type, leading to incorrect interpretation.

Please note that image partitions with ironic is a real use case. Specially in terms of security, having different partitions for /boot, /var, /home, etc... is really needed. So that use case shall be supported.
Comment 1 Lucas Alvares Gomes 2016-10-04 14:25:32 EDT
Thanks for reporting Yolanda. I've uploaded a fix for Ironic [0] today and will backport it to OSP when we get it merged upstream.

[0] https://review.openstack.org/#/c/381893/1
Comment 2 Dmitry Tantsur 2016-11-11 07:14:52 EST
We need to propose a backport for stable/newton.
Comment 3 Dmitry Tantsur 2016-11-14 05:58:00 EST
Newton backport was posted
Comment 5 Sergii Nozhka 2016-11-21 07:59:17 EST
The issue not reproduced with python-ironic-lib-2.1.1-2.el7ost.noarch.
Comment 8 errata-xmlrpc 2016-12-14 11:07:17 EST
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://rhn.redhat.com/errata/RHEA-2016-2948.html

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