Image volume cache limits misbehave when only one is set

Bug #1792944 reported by Alan Bishop
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Alan Bishop

Bug Description

The image volume cache has two configurable limits:
- image_volume_cache_max_size_gb
- image_volume_cache_max_count

The code functions correctly when both values are zero (i.e. unlimited), and
when both values are assigned a non-zero value (both limits enforced).
However, the system misbehaves when only one limit is configured and the
other is disabled.

If only one limit is enforced, the system always removes existing entries
before adding a new entry. In other words, it behaves as if the
image_volume_cache_max_count is set to 1, regardless of how the limit is
actually configured.

Changed in cinder:
assignee: nobody → Alan Bishop (alan-bishop)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/603145
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=74249de6398dbec8592591667b83a5612bf4a969
Submitter: Zuul
Branch: master

commit 74249de6398dbec8592591667b83a5612bf4a969
Author: Alan Bishop <email address hidden>
Date: Mon Sep 17 10:09:06 2018 -0400

    Fix image volume cache max size and max count limits

    Fix the code that enforces the image volume cache max size and max count
    limits so that each limit functions independently from the other.

    This fixes a bug where the code would function correctly when both were
    set to zero (unlimited) or when both limits were set (non-zero), but would
    misbehave when only one limit was set and the other unlimited.

    Closes-Bug: #1792944
    Change-Id: I8b4843c2e9392139b42d6e2ebd2c5e1cd09d4c7a

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

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/605757

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

Reviewed: https://review.openstack.org/605757
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=4c2b41d5b531c1e3cd87172d30f280f89e2505a3
Submitter: Zuul
Branch: stable/rocky

commit 4c2b41d5b531c1e3cd87172d30f280f89e2505a3
Author: Alan Bishop <email address hidden>
Date: Mon Sep 17 10:09:06 2018 -0400

    Fix image volume cache max size and max count limits

    Fix the code that enforces the image volume cache max size and max count
    limits so that each limit functions independently from the other.

    This fixes a bug where the code would function correctly when both were
    set to zero (unlimited) or when both limits were set (non-zero), but would
    misbehave when only one limit was set and the other unlimited.

    Closes-Bug: #1792944
    Change-Id: I8b4843c2e9392139b42d6e2ebd2c5e1cd09d4c7a
    (cherry picked from commit 74249de6398dbec8592591667b83a5612bf4a969)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/606187

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

Reviewed: https://review.openstack.org/606187
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=fe0c082529c301e28fd7dd517f564eaaed944475
Submitter: Zuul
Branch: stable/queens

commit fe0c082529c301e28fd7dd517f564eaaed944475
Author: Alan Bishop <email address hidden>
Date: Mon Sep 17 10:09:06 2018 -0400

    Fix image volume cache max size and max count limits

    Fix the code that enforces the image volume cache max size and max count
    limits so that each limit functions independently from the other.

    This fixes a bug where the code would function correctly when both were
    set to zero (unlimited) or when both limits were set (non-zero), but would
    misbehave when only one limit was set and the other unlimited.

    Closes-Bug: #1792944
    Change-Id: I8b4843c2e9392139b42d6e2ebd2c5e1cd09d4c7a
    (cherry picked from commit 74249de6398dbec8592591667b83a5612bf4a969)
    (cherry picked from commit 4c2b41d5b531c1e3cd87172d30f280f89e2505a3)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 12.0.4

This issue was fixed in the openstack/cinder 12.0.4 release.

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

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/612470

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

Reviewed: https://review.openstack.org/612470
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=ec1a8e36ee3d71da97c758f6bd92ff0d88c2edd7
Submitter: Zuul
Branch: stable/pike

commit ec1a8e36ee3d71da97c758f6bd92ff0d88c2edd7
Author: Alan Bishop <email address hidden>
Date: Mon Sep 17 10:09:06 2018 -0400

    Fix image volume cache max size and max count limits

    Fix the code that enforces the image volume cache max size and max count
    limits so that each limit functions independently from the other.

    This fixes a bug where the code would function correctly when both were
    set to zero (unlimited) or when both limits were set (non-zero), but would
    misbehave when only one limit was set and the other unlimited.

    Closes-Bug: #1792944
    Change-Id: I8b4843c2e9392139b42d6e2ebd2c5e1cd09d4c7a
    (cherry picked from commit 74249de6398dbec8592591667b83a5612bf4a969)
    (cherry picked from commit 4c2b41d5b531c1e3cd87172d30f280f89e2505a3)
    (cherry picked from commit fe0c082529c301e28fd7dd517f564eaaed944475)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 13.0.1

This issue was fixed in the openstack/cinder 13.0.1 release.

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

This issue was fixed in the openstack/cinder 11.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 14.0.0.0rc1

This issue was fixed in the openstack/cinder 14.0.0.0rc1 release candidate.

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.