reserve disk usage for image cache fails on a fresh hypervisor

Bug #1884214 reported by Balazs Gibizer
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Balazs Gibizer
Stein
Fix Released
Undecided
Balazs Gibizer
Train
Fix Released
Undecided
Balazs Gibizer
Ussuri
Fix Released
Undecided
Balazs Gibizer

Bug Description

If the image cache _base directory does not exists on the hypervisor yet and [workarounds]/reserve_disk_resource_for_image_cache = True is set in the nova compute config then nova-compute logs a stack trace [1] and resource state is not update in placement.

[1] http://paste.openstack.org/show/794993/

This issue was reported originally in https://bugs.launchpad.net/nova/+bug/1878024 by MarkMielke (mark-mielke).

tags: added: compute image-cache
Changed in nova:
assignee: nobody → Balazs Gibizer (balazs-gibizer)
description: updated
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/736964

Changed in nova:
status: Confirmed → In Progress
Changed in nova:
assignee: Balazs Gibizer (balazs-gibizer) → Stephen Finucane (stephenfinucane)
Changed in nova:
assignee: Stephen Finucane (stephenfinucane) → Dan Smith (danms)
Changed in nova:
assignee: Dan Smith (danms) → Balazs Gibizer (balazs-gibizer)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/736964
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a85753778f710f03616a682d294f8f638dea6baf
Submitter: Zuul
Branch: master

commit a85753778f710f03616a682d294f8f638dea6baf
Author: Balazs Gibizer <email address hidden>
Date: Fri Jun 19 11:18:04 2020 +0200

    Guard against missing image cache directory

    The original fix of bug 1878024 missed an edge case where on a fresh
    hypervisor the image cache directory hasn't been created yet. That
    directory is only created when the first image is downloaded.

    This patch makes sure that if the cache dir hasn't been created yet then
    0 disk is reserved for the cache usage instead of raising and logging an
    exception.

    Change-Id: Id1bbc955a9099de1abc11b9063fe177896646d03
    Related-Bug: #1878024
    Closes-Bug: #1884214

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

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/737990

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

Reviewed: https://review.opendev.org/737990
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a6a48e876c9c4f9a218de882270ef098d46bf767
Submitter: Zuul
Branch: stable/ussuri

commit a6a48e876c9c4f9a218de882270ef098d46bf767
Author: Balazs Gibizer <email address hidden>
Date: Fri Jun 19 11:18:04 2020 +0200

    Guard against missing image cache directory

    The original fix of bug 1878024 missed an edge case where on a fresh
    hypervisor the image cache directory hasn't been created yet. That
    directory is only created when the first image is downloaded.

    This patch makes sure that if the cache dir hasn't been created yet then
    0 disk is reserved for the cache usage instead of raising and logging an
    exception.

    Change-Id: Id1bbc955a9099de1abc11b9063fe177896646d03
    Related-Bug: #1878024
    Closes-Bug: #1884214
    (cherry picked from commit a85753778f710f03616a682d294f8f638dea6baf)

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

Fix proposed to branch: stable/train
Review: https://review.opendev.org/738455

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

Reviewed: https://review.opendev.org/738455
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f26823c7805c96d155de6837a08ec34271117515
Submitter: Zuul
Branch: stable/train

commit f26823c7805c96d155de6837a08ec34271117515
Author: Balazs Gibizer <email address hidden>
Date: Fri Jun 19 11:18:04 2020 +0200

    Guard against missing image cache directory

    The original fix of bug 1878024 missed an edge case where on a fresh
    hypervisor the image cache directory hasn't been created yet. That
    directory is only created when the first image is downloaded.

    This patch makes sure that if the cache dir hasn't been created yet then
    0 disk is reserved for the cache usage instead of raising and logging an
    exception.

    Conflicts:
      nova/virt/libvirt/imagecache.py due to
      I3c49825ac0d70152b6c8ee4c8ca01546265f4b80 not in stable/train

    FileNotFoundError -> OSError changes in the test file is due to py2.7
    does not have FileNotFoundError.

    Change-Id: Id1bbc955a9099de1abc11b9063fe177896646d03
    Related-Bug: #1878024
    Closes-Bug: #1884214
    (cherry picked from commit a85753778f710f03616a682d294f8f638dea6baf)
    (cherry picked from commit a6a48e876c9c4f9a218de882270ef098d46bf767)

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

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/740409

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

Reviewed: https://review.opendev.org/740409
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ce1287aa7fdf56560fdc8a37c75cb5db3a10a07d
Submitter: Zuul
Branch: stable/stein

commit ce1287aa7fdf56560fdc8a37c75cb5db3a10a07d
Author: Balazs Gibizer <email address hidden>
Date: Fri Jun 19 11:18:04 2020 +0200

    Guard against missing image cache directory

    The original fix of bug 1878024 missed an edge case where on a fresh
    hypervisor the image cache directory hasn't been created yet. That
    directory is only created when the first image is downloaded.

    This patch makes sure that if the cache dir hasn't been created yet then
    0 disk is reserved for the cache usage instead of raising and logging an
    exception.

    Change-Id: Id1bbc955a9099de1abc11b9063fe177896646d03
    Related-Bug: #1878024
    Closes-Bug: #1884214
    (cherry picked from commit a85753778f710f03616a682d294f8f638dea6baf)
    (cherry picked from commit a6a48e876c9c4f9a218de882270ef098d46bf767)
    (cherry picked from commit f26823c7805c96d155de6837a08ec34271117515)

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.