ironic failed to deploy centos6 image

Bug #1732395 reported by MarginHu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
diskimage-builder
New
Undecided
Unassigned

Bug Description

Hi,

I want to build a centos6 image for baremetal deployment, but found it failed when installing boot loader.

# generate image
disk-image-create dynamic-login centos baremetal dhcp-all-interfaces grub2 -o centos6.qcow2 --install-type=package

# error log when deploy image.
Error from last host: cloud-ironic (node ef89b610-96ab-473f-a0d8-9294d7efd4d8): [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1780, in _do_build_and_run_instance\n filter_properties)\n', u' File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2016, in _build_and_run_instance\n instance_uuid=instance.uuid, reason=six.text_type(e))\n', u'RescheduledException: Build of instance 90c19c46-5b31-4134-8fd3-233e390d48f0 was re-scheduled: Failed to provision instance 90c19c46-5b31-4134-8fd3-233e390d48f0: Failed to install a bootloader when deploying node ef89b610-96ab-473f-a0d8-9294d7efd4d8. Error: {u\'message\': u\'Command execution failed: Installing GRUB2 boot loader to device /dev/sda failed with Unexpected error while running command.\\nCommand: chroot /tmp/tmpApABFG /bin/sh -c "/usr/sbin/grub-install /dev/sda"\\nExit code: 1\\nStdout: u\\\'\\\'\\nStderr: u\\\'Could not find device for /dev/vda1\\\\nCould not find device for /dev/vda1\\\\nCould not find device for /dev/vda1\\\\n/dev/vda1: Not found or not a block device.\\\\n\\\'.\', u\'code\': 500, u\'type\': u\'CommandExecutionError\', u\'details\': u\'Installing GRUB2 boot loader to device /dev/sda failed with Unexpected error while running command.\\nCommand: chroot /tmp/tmpApABFG /bin/sh -c "/usr/sbin/grub-install /dev/sda"\\nExit code: 1\\nStdout: u\\\'\\\'\\nStderr: u\\\'Could not find device for /dev/vda1\\\\nCould not find device for /dev/vda1\\\\nCould not find device for /dev/vda1\\\\n/dev/vda1: Not found or not a block device.\\\\n\\\'.\'}\n']

Revision history for this message
MarginHu (margin2017) wrote :

It seems that If I want to deploy baremetal with local boot, the image must contain grub2 package.

https://github.com/openstack/ironic-python-agent/blob/master/ironic_python_agent/extensions/image.py#L145

Centos6 has no grub2 package, I know my issue is not a true issue.
but why not report error when building image?

I found the error from build output.
> No package grub2-efi-modules available.
> Checking for virtual provide or file-provide for grub2-efi
> No package grub2-efi available.
> Checking for virtual provide or file-provide for shim
> No package shim available.
> Package openssh-server-5.3p1-123.el6_9.x86_64 already installed and latest version
> Package rsync-3.0.6-12.el6.x86_64 already installed and latest version
> Checking for virtual provide or file-provide for grub2
> No package grub2 available.
> Checking for virtual provide or file-provide for ccache
> No package ccache available.
> Package which-2.19-6.el6.x86_64 already installed and latest version
> Package openssh-5.3p1-123.el6_9.x86_64 already installed and latest version
> Checking for virtual provide or file-provide for dracut-modules-growroot
> No package dracut-modules-growroot available.
> Checking for virtual provide or file-provide for cloud-utils-growpart
> No package cloud-utils-growpart available.

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.