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:
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.
Thanks for reporting Yolanda. I've uploaded a fix for Ironic  today and will backport it to OSP when we get it merged upstream.
We need to propose a backport for stable/newton.
Newton backport was posted
The issue not reproduced with python-ironic-lib-2.1.1-2.el7ost.noarch.
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.