the take_over() fails for pxe drivers

Bug #1516816 reported by Nisha Agarwal
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Pavlo Shchelokovskyy

Bug Description

In multi-conductor setup, the take_over() fails for pxe drivers.
It gives the symptoms of bug #1516812. If bug #1516812 is fixed, it gives following error:

  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 58, in __call__
    cb(*args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 214, in main
    result = function(*args, **kwargs)
  File "/opt/stack/ironic/ironic/conductor/manager.py", line 1366, in _do_takeover
    task.driver.deploy.prepare(task)
  File "/opt/stack/ironic/ironic/drivers/modules/ilo/deploy.py", line 338, in prepare
    super(IloPXEDeploy, self).prepare(task)
  File "/opt/stack/ironic/ironic/drivers/modules/iscsi_deploy.py", line 717, in prepare
    task.driver.boot.prepare_instance(task)
  File "/opt/stack/ironic/ironic/drivers/modules/pxe.py", line 563, in prepare_instance
    iwdi, deploy_utils.is_trusted_boot_requested(node))
  File "/opt/stack/ironic/ironic/drivers/modules/deploy_utils.py", line 446, in switch_pxe_config
    _replace_root_uuid(path, root_uuid_or_disk_id)
  File "/opt/stack/ironic/ironic/drivers/modules/deploy_utils.py", line 404, in _replace_root_uuid
    _replace_lines_in_file(path, pattern, root)
  File "/opt/stack/ironic/ironic/drivers/modules/deploy_utils.py", line 391, in _replace_lines_in_file
    with open(path) as f:
IOError: [Errno 2] No such file or directory: '/opt/stack/data/ironic/tftpboot/0300ea2d-f269-4676-9a0b-50c09c6710be/config'

description: updated
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/246033

Changed in ironic:
assignee: nobody → Nisha Agarwal (agarwalnisha1980)
status: New → In Progress
Changed in ironic:
assignee: Nisha Agarwal (agarwalnisha1980) → ankit (ankit-dhn31)
Dmitry Tantsur (divius)
Changed in ironic:
importance: Undecided → Medium
Changed in ironic:
assignee: ankit (ankit-dhn31) → Lucas Alvares Gomes (lucasagomes)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by Lucas Alvares Gomes (<email address hidden>) on branch: master
Review: https://review.openstack.org/246033
Reason: Superseded by https://review.openstack.org/#/c/404858/

Changed in ironic:
assignee: Lucas Alvares Gomes (lucasagomes) → Pavlo Shchelokovskyy (pshchelo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/404858
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=035ad6a60be1b66ff6680145cabf79218c07524f
Submitter: Jenkins
Branch: master

commit 035ad6a60be1b66ff6680145cabf79218c07524f
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Thu Dec 8 16:37:22 2016 +0200

    Fix take over for ACTIVE nodes in PXEBoot

    when taking over an ACTIVE netboot-ed node with driver based on PXEBoot,
    the `PXEBoot.prepare_instance` method fails as our current logic of
    generating a 'service' mode PXE config relies on editing PXE env files
    that must already exist on disk but are missing from the new conductor host
    in this case.

    This patch forces this method to first re-create the PXE env from scratch
    for ACTIVE nodes when PXE config file is missing before attempting
    to change it.
    It does not try to re-download the deploy ramdisk and generate options for it
    though.
    It also does not try to re-set boot device for ACTIVE nodes as that
    should have already have been set earlier before actual transition to
    ACTIVE.

    In order to make the logic cleaner, this patch also refactors private methods
    for building pxe options to be deploy-vs-instance oriented instead of
    pxe-vs-ipxe oriented.

    Change-Id: I264d5477523f57552aadf2809021a9a63fee2730
    Partial-Bug: #1646038
    Closes-Bug: #1516816

Changed in ironic:
status: In Progress → Fix Released
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/425124

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

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

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

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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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