Images cannot be changed for deployed node when doing rebuild

Bug #1405448 reported by Vladyslav Drok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Vladyslav Drok
Juno
Fix Released
Medium
Matthew Gilliard

Bug Description

Suppose you have a deployed node and you want to change image_source's kernel or ramdisk; or you may want to change the driver from pxe_ipmitool to agent_ipmitool and because of that you have to change deploy_kernel and deploy_ramdisk in driver_info.

After changing it in node's instance_info or driver_info in conductor log you can see the following lines:

DEBUG ironic.drivers.modules.image_cache [-] Destination /opt/stack/data/ironic/tftpboot/5189df61-abd0-498d-b1c5-1bba22d33376/deploy_ramdisk already exists for image 07a8020a-6a4e-4480-b968-0eba1c3a0a85

and deploy_ramdisk is not updated in folder with node's images.

It happens when during rebuild from active provision state because of this part of code: https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/image_cache.py#L109-L114 , where nothing is done if the path image should be downloaded to exists. This path is <pxe-root-dir>/<node-uuid>/<label>, where <label> can be deploy_kernel, deploy_ramdisk, kernel, ramdisk.

Vladyslav Drok (vdrok)
Changed in ironic:
assignee: nobody → Vladyslav Drok (vdrok)
Vladyslav Drok (vdrok)
description: updated
Vladyslav Drok (vdrok)
description: updated
Revision history for this message
Matthew Gilliard (matthew-gilliard-u) wrote :

I'd rather this wasn't marked as a duplicate. #1401501 is that when an image's kernel and ramdisk change we never notice because we don't check. This bug is about how the image cache doesn't fetch new images even if we do ask for them. They have separate patches to fix them, too:

  This bug: https://review.openstack.org/#/c/145254
  1401501: https://review.openstack.org/#/c/142782/

Vladyslav Drok (vdrok)
Changed in ironic:
assignee: Vladyslav Drok (vdrok) → nobody
Changed in ironic:
assignee: nobody → Vladyslav Drok (vdrok)
status: New → In Progress
Dmitry Tantsur (divius)
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/145254
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=2f0c8cd8d8d8b2846b641b518b742ca051425028
Submitter: Jenkins
Branch: master

commit 2f0c8cd8d8d8b2846b641b518b742ca051425028
Author: Jim Rollenhagen <email address hidden>
Date: Tue Jan 6 07:49:26 2015 -0800

    Ensure that image link points to the correct image

    If an image is cached for a node, and the image changes, Ironic won't
    notice because we only check if the link exists. In this change it's
    proposed to check in the image_cache if the image is up to date.

    Closes-bug: #1405448
    Co-Authored-By: Vladyslav Drok <email address hidden>
    Change-Id: If67c7e60eb6d048fa3aa03469d7904c6c233ff89

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

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/148218

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

Reviewed: https://review.openstack.org/148218
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=c2b89f93a2ae25faeb18e1fcd93249bcf29ebc2e
Submitter: Jenkins
Branch: stable/juno

commit c2b89f93a2ae25faeb18e1fcd93249bcf29ebc2e
Author: Jim Rollenhagen <email address hidden>
Date: Tue Jan 6 07:49:26 2015 -0800

    Ensure that image link points to the correct image

    If an image is cached for a node, and the image changes, Ironic won't
    notice because we only check if the link exists. In this change it's
    proposed to check in the image_cache if the image is up to date.

    Closes-bug: #1405448
    Co-Authored-By: Vladyslav Drok <email address hidden>
    (cherry picked from commit 2f0c8cd8d8d8b2846b641b518b742ca051425028)

    Conflicts:
     ironic/drivers/modules/image_cache.py
     ironic/tests/drivers/test_image_cache.py

    Change-Id: If67c7e60eb6d048fa3aa03469d7904c6c233ff89

tags: added: in-stable-juno
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: kilo-2 → 2015.1.0
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.