cleaning fails on agent driver with KeyError

Bug #1492998 reported by Ramakrishnan G (rameshg87)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Ramakrishnan G (rameshg87)

Bug Description

cleaning fails on agent driver with KeyError

2015-09-07 10:46:27.917 DEBUG ironic.drivers.modules.deploy_utils [-] Deploy boot mode is None for f6f72ec2-b4a7-48d3-86fc-e678f4cc4d4e. from (pid=26018) get_boot_mode_for_deploy /opt/stack/ironic/ironic/drivers/modules/deploy_utils.py:1174
2015-09-07 10:46:28.219 ERROR ironic.conductor.manager [-] Failed to prepare node f6f72ec2-b4a7-48d3-86fc-e678f4cc4d4e for cleaning: 'kernel'
2015-09-07 10:46:28.219 TRACE ironic.conductor.manager Traceback (most recent call last):
2015-09-07 10:46:28.219 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/conductor/manager.py", line 909, in _do_node_clean
2015-09-07 10:46:28.219 TRACE ironic.conductor.manager prepare_result = task.driver.deploy.prepare_cleaning(task)
2015-09-07 10:46:28.219 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/drivers/modules/agent.py", line 314, in prepare_cleaning
2015-09-07 10:46:28.219 TRACE ironic.conductor.manager task.driver.boot.prepare_ramdisk(task, ramdisk_opts)
2015-09-07 10:46:28.219 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/drivers/modules/pxe.py", line 489, in prepare_ramdisk
2015-09-07 10:46:28.219 TRACE ironic.conductor.manager pxe_options = _build_pxe_config_options(task, pxe_info)
2015-09-07 10:46:28.219 TRACE ironic.conductor.manager File "/opt/stack/ironic/ironic/drivers/modules/pxe.py", line 281, in _build_pxe_config_options
2015-09-07 10:46:28.219 TRACE ironic.conductor.manager kernel = pxe_info['kernel'][1]
2015-09-07 10:46:28.219 TRACE ironic.conductor.manager KeyError: 'kernel'
2015-09-07 10:46:28.219 TRACE ironic.conductor.manager

This happens when we initially put the node to manage state before the first provisioning. This problem doesn't occur on cleaning after tear_down.

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/221003

Changed in ironic:
assignee: nobody → Ramakrishnan G (rameshg87) (rameshg87)
status: New → In Progress
Ruby Loo (rloo)
Changed in ironic:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

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

commit c81031a58897821a122718845694f935005f59ac
Author: Ramakrishnan G <email address hidden>
Date: Mon Sep 7 12:58:09 2015 +0000

    Handle missing is_whole_disk_image in pxe._build_pxe_config_options

    This commit handles the situation when 'is_whole_disk_image'
    is not set in node.driver_internal_info and kernel/ramdisk
    is missing in node.instance_info when
    pxe._build_pxe_config_options is called. This can happen when
    prepare_ramdisk() is called on a node managed by agent_* driver
    that is transitioning from 'manage' to 'available' state for the
    first time (after being enrolled).

    Change-Id: I6cac1beadc9177dd0cc28bdff7f30a6b3900ec98
    Closes-Bug: 1492998

Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → 4.1.0
status: Fix Committed → 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.