Deploy failed if the baremetal previous OS contains LVM

Bug #1716668 reported by Hao Li
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ironic-lib
Triaged
High
Ilya Etingof

Bug Description

If you call "nova boot" to deploy user image with LVM into baremetal. This action is successful. Everything is OK. Then you call "nova delete <instance_uuid>", The instance is deleted and baremetal back to available status. Then you call "nova boot" again to deploy user image WITHOUT LVM, you will find deploy to fail.

This is because the script "write_image.sh": if disk contains LVM, cmd "sgdisk -Z <device>" can't destroy LVM partitions. So the result advise you to "reboot or call partprobe". Then partprobe in ironic_lib function _get_lablelled_partition will fail and the deploy process will fail.

The error msgs:
ERROR ironic.drivers.modules.agent [-] node 74f7fd91-83ea-49a6-8e49-8385a02c47df command status errored: {u'message': u"Command execution failed: Failed to retrieve partition labels on disk /dev/sda for node 74f7fd91-83ea-49a6-8e49-8385a02c47df. Error: Unexpected error while running command.\nCommand: partprobe /dev/sda\nExit code: 1\nStdout: u''\nStderr: u'Error: Partition(s) 1 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.\\n'", u'code': 500, u'type': u'CommandExecutionError', u'details': u"Failed to retrieve partition labels on disk /dev/sda for node 74f7fd91-83ea-49a6-8e49-8385a02c47df. Error: Unexpected error while running command.\nCommand: partprobe /dev/sda\nExit code: 1\nStdout: u''\nStderr: u'Error: Partition(s) 1 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.\\n'"}

Dmitry Tantsur (divius)
Changed in ironic-python-agent:
status: New → Triaged
importance: Undecided → High
affects: ironic-python-agent → ironic-lib
Ilya Etingof (etingof)
description: updated
Ilya Etingof (etingof)
Changed in ironic-lib:
assignee: nobody → Ilya Etingof (etingof)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.