Set boot device while server is on

Bug #1503855 reported by Thiago Paiva Brito
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Xavier

Bug Description

The agent vendor interface sets the boot device of the machine while it is yet powered on in [1] and just after calls the reboot_and_finish_deploy method.

Some technologies (such as OneView) requires that the server is powered off to switch the primary boot device of the node.

[1]https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/agent.py#L420

description: updated
Changed in ironic:
assignee: nobody → Thiago Paiva Brito (thiagop)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/232186

Changed in ironic:
status: New → In Progress
Revision history for this message
Dmitry Tantsur (divius) wrote :

Hi, thank you for your report! Could you please add references to "some technologies" to the description?

Changed in ironic:
importance: Undecided → High
Revision history for this message
Paul Morris (paul-morris-0003) wrote :

I can probably add some commentary here. I have experienced some challenges using the agent_ssh driver with ironic and bifrost over the last week which seem to be related when targeting VirtualBox hosted on Mac OS X.

The provisioning appears to have gone fine up until the time the agent_ssh driver attempts to change the boot device from net to disk1, at which point, VirtualBox throws an error about the session for that VM being locked.

Details you might find useful:

I am running VirtualBox 5.0.10, and Mac OS X 10.11.1. Which means that thanks to SIP, I had to alter the path for VBoxManage in the driver, as I can't just add a symlink on my ssh target. (You can't write to /usr with SIP enabled on El Capitan. Modding the path allowed it to work with no other issues for my test case, however. Well aside from the aforementioned issue regarding the boot device change.)

The relevant line from the error logging to cover this event is as follows:

Dec 4 20:25:05 somehostname ironic-conductor: Stderr: u'VBoxManage: error: The machine \'testvm1\' is already locked for a session (or being unlocked)\nVBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports\nVBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp\n'.

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by Thiago Paiva Brito (<email address hidden>) on branch: master
Review: https://review.openstack.org/232186

Changed in ironic:
assignee: Thiago Paiva Brito (thiagop) → gzholtkevych (gzholtkevych)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/360330

Revision history for this message
Galyna Zholtkevych (gzholtkevych) wrote :

The fix proposed only for oneview driver, because no more technologies are noticed to require this.
If more drivers will do, the patchset will be updated then

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by Galyna Zholtkevych (<email address hidden>) on branch: master
Review: https://review.openstack.org/360330
Reason: Abandoning this since another more appropriate work in this direction started

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/408298

Changed in ironic:
assignee: Galyna Zholtkevych (gzholtkevych) → Xavier (marcusrafael)
Changed in ironic:
assignee: Xavier (marcusrafael) → Fellype Cavalcante (fellypefca)
Changed in ironic:
assignee: Fellype Cavalcante (fellypefca) → Xavier (marcusrafael)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/464212

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/482209

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/482209
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=8f45317d4345872c050b2fa347f7be033556d2f5
Submitter: Jenkins
Branch: master

commit 8f45317d4345872c050b2fa347f7be033556d2f5
Author: Xavier <email address hidden>
Date: Wed Jul 5 11:13:41 2017 -0300

    Removes agent mixin from oneview drivers

    This patch removes the agent mixin interface from oneview
    drivers and adds a flag based solution instead. Once a set
    boot device operation needs to be performed, the operation
    is stored to driver_internal_info until the server power
    on. Before power the server on again, the operation stored
    is performed and then the server is powered on.

    Change-Id: I8dabf7ef1ff6e44c062310c5cb3509e545585c0a
    Closes-Bug: #1503855

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/489598

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/490095

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by Xavier (<email address hidden>) on branch: master
Review: https://review.openstack.org/408298

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Xavier (<email address hidden>) on branch: master
Review: https://review.openstack.org/464212

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 9.0.0

This issue was fixed in the openstack/ironic 9.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (stable/newton)

Change abandoned by Dmitry Tantsur (<email address hidden>) on branch: stable/newton
Review: https://review.openstack.org/490095
Reason: The last ironic release for Newton was done, and we're ready to EOL the branch. Thus I have to abandon this change, thanks for understanding.

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.