Failed to power on node in devstack environment

Bug #1671364 reported by Eric Xie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Eric Xie

Bug Description

Description
===========
I setup one environment with devstack. After it finished, i found
baremetal nodes were 'power off'. When power on them, this error
was hit.

Steps to reproduce
==================
* Setup environment with devstack, followed by
https://docs.openstack.org/developer/ironic/dev/dev-quickstart.html#deploying-ironic-with-devstack
* Check node's status with `openstack baremetal node list`
* Power on node with `openstack baremetal node power on node-0`

Expected result
===============
Power on node successfully.

Actual result
=============
Node's 'Power State' was also 'power off'.

Environment
===========
1. OS
# cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
2. libvirt && qemu-kvm
libvirt-2.0.0-10.el7_3.5.x86_64
qemu-kvm-common-ev-2.6.0-28.el7_3.3.1.x86_64
qemu-kvm-ev-2.6.0-28.el7_3.3.1.x86_64
3. devstack version
# git log
commit 6523d6e09789076d0a430bf7b608511fcb1c406a
Merge: 73a3e2d afef8bf
Author: Jenkins <email address hidden>
Date: Wed Mar 8 13:31:57 2017 +0000

    Merge "Make declared variables global"
4. ironic version
# git log
commit 748e93009afc050c7d86f4a485b8b652e96dd69b
Merge: 732c2a5 1e560b1
Author: Jenkins <email address hidden>
Date: Wed Mar 8 22:07:54 2017 +0000

    Merge "devstack: Make sentry _IRONIC_DEVSTACK_LIB a global variable"

Logs
=============
2017-03-09 05:51:51.848 | libvirt: QEMU Driver error : internal error: process exited while connecting to monitor: 2017-03-09T05:51:51.616644Z qemu-kvm: -machine pc-1.0,accel=tcg,usb=off: unsupported machine type
2017-03-09 05:51:51.848 | Use -machine help to list supported machines

Tags: devstack
Revision history for this message
Eric Xie (eric-xie) wrote :

I found 'machine' type in template file
<type arch='{{ arch }}' machine='pc-1.0'>hvm</type>

But 'pc-1.0' is not there.
# /usr/libexec/qemu-kvm -machine help
Supported machines are:
pc RHEL 7.3.0 PC (i440FX + PIIX, 1996) (alias of pc-i440fx-rhel7.3.0)
pc-i440fx-rhel7.3.0 RHEL 7.3.0 PC (i440FX + PIIX, 1996) (default)
pc-i440fx-rhel7.2.0 RHEL 7.2.0 PC (i440FX + PIIX, 1996)
pc-i440fx-rhel7.1.0 RHEL 7.1.0 PC (i440FX + PIIX, 1996)
pc-i440fx-rhel7.0.0 RHEL 7.0.0 PC (i440FX + PIIX, 1996)
rhel6.6.0 RHEL 6.6.0 PC
rhel6.5.0 RHEL 6.5.0 PC
rhel6.4.0 RHEL 6.4.0 PC
rhel6.3.0 RHEL 6.3.0 PC
rhel6.2.0 RHEL 6.2.0 PC
rhel6.1.0 RHEL 6.1.0 PC
rhel6.0.0 RHEL 6.0.0 PC
q35 RHEL-7.3.0 PC (Q35 + ICH9, 2009) (alias of pc-q35-rhel7.3.0)
pc-q35-rhel7.3.0 RHEL-7.3.0 PC (Q35 + ICH9, 2009)
none empty machine

After modifying 'pc-1.0' to 'pc' in node-0's XML file, node-0 can be power on successfully.
So i think it's necessary to correct the template file.

Changed in ironic:
status: New → In Progress
assignee: nobody → Eric Xie (eric-xie)
Eric Xie (eric-xie)
Changed in ironic:
status: In Progress → New
assignee: Eric Xie (eric-xie) → nobody
Revision history for this message
Eric Xie (eric-xie) wrote :

It works OK on ubuntu 14.04.
# qemu-system-x86_64 -machine help
Supported machines are:
pc-0.13 Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.0 Standard PC (i440FX + PIIX, 1996)
pc-1.0 Standard PC (i440FX + PIIX, 1996)

So i am not sure this is a bug or not. Please give me some help.

Revision history for this message
Michael Turek (mjturek) wrote :

I just tried this and can confirm it. Though I get a permissions error on my logs:

2017-03-13 17:20:52.120 | libvirt: QEMU Driver error : internal error: process exited while connecting to monitor: 2017-03-13T17:20:51.953317Z qemu-system-x86_64: -chardev file,id=charserial0,path=/home/centos/ironic-bm-logs/node-0_console.log: Could not open '/home/centos/ironic-bm-logs/node-0_console.log': Permission denied

Changed in ironic:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Vladyslav Drok (vdrok) wrote :

Right, I remember having trouble with setting a custom log dir due to selinux permissions. I remember we did change this in the docs at some point.

Revision history for this message
Vladyslav Drok (vdrok) wrote :
Revision history for this message
Vladyslav Drok (vdrok) wrote :

Yeah, seems like changing the template is a way to fix this.

Changed in ironic:
status: Confirmed → Triaged
Eric Xie (eric-xie)
Changed in ironic:
assignee: nobody → Eric Xie (eric-xie)
Revision history for this message
Ahmed Zaid (ahmedzaid10) wrote :

I try to reproduce the bug but everything work fine.
Environment
===========
1. OS
# cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)
2. libvirt && qemu-kvm
libvirtd (libvirt) 3.2.0

3. devstack version
commit b5fb7fd627fe24876a8dd2782fce065cf1957b55
Author: rabi <email address hidden>
Date: Wed Nov 22 08:14:29 2017 +0530

    Fix lib_installed_from_git

    In commit f0cd9a8b08d92524fc8e2c3f05d08cdebc638e2a we changed to
    use column format, but it checks for zero length string and
    check_libs_from_git fails.

    Change-Id: I97b52b80efb33749647229a55147a08afa112dd2

This bug should be closed.

Changed in ironic:
status: Triaged → Fix Released
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.