Capacity filter and weigher fails when volume has no volume type

Bug #1619246 reported by Michal Dulko
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Michal Dulko
cinder (Ubuntu)
Fix Released
Medium
James Page

Bug Description

Since patch [1] our multinode grenade job started to fail scheduler with [2].

Fun part - this isn't related to upgrades at all. The multinode grenade job is actually running without default_volume_type set in cinder.conf, so volume_type is None and the filter doesn't take such possibility into account.

[1] https://review.openstack.org/#/c/315352
[2] http://paste.openstack.org/show/565667/

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

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

Reviewed: https://review.openstack.org/364245
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=472ce4aae03f3243399ea644060ec60b7b8daacf
Submitter: Jenkins
Branch: master

commit 472ce4aae03f3243399ea644060ec60b7b8daacf
Author: Michał Dulko <email address hidden>
Date: Thu Sep 1 13:22:20 2016 +0200

    Fix CapacityFilter to accept None volume type

    Change I8b43624b934fadf1036fafa1f5e2b94b5317f81c introduced reading
    volume_type['extra specs'] from filter_properties in CapacityFilter
    without taking into account that volume_type can be None (when
    default_volume_type is not set in cinder.conf). This commit fixes that.

    Closes-Bug: 1619246
    Change-Id: Icfc6ba5f47c3a61b49cbec5110ef7df05eb47195

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/cinder 9.0.0.0b3

This issue was fixed in the openstack/cinder 9.0.0.0b3 development milestone.

Revision history for this message
Michal Dulko (michal-dulko-f) wrote :

Whoops, turns out same thing goes with capacity weigher. Sorry, I've could checked that earlier, patch fixing it is on the way.

summary: - Capacity filter fails when volume has no volume type
+ Capacity filter and weigher fails when volume has no volume type
Changed in cinder:
status: Fix Released → In Progress
Revision history for this message
Peter Wang (peter.wang) wrote :

Hi Michal
I still met following issue with your fix without volume type

2016-09-01 22:47:31.111 3461 ERROR oslo_messaging.rpc.server weight = self._weigh_object(obj.obj, weight_properties)
2016-09-01 22:47:31.111 3461 ERROR oslo_messaging.rpc.server File "/opt/stack/cinder/cinder/scheduler/weights/capacity.py", line 123, in _weigh_object
2016-09-01 22:47:31.111 3461 ERROR oslo_messaging.rpc.server provision_type = vol_type.get('extra_specs', {}).get(
2016-09-01 22:47:31.111 3461 ERROR oslo_messaging.rpc.server AttributeError: 'NoneType' object has no attribute 'get'
2016-09-01 22:47:31.111 3461 ERROR oslo_messaging.rpc.server

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

Revision history for this message
Michal Dulko (michal-dulko-f) wrote :

@Peter: Thanks for confirmation, check out if the fix I've proposed a moment ago solves the issue for you.

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

Reviewed: https://review.openstack.org/364802
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=ebeb0bbc7ae64007ba65cedd2542876a328eb9fd
Submitter: Jenkins
Branch: master

commit ebeb0bbc7ae64007ba65cedd2542876a328eb9fd
Author: Michał Dulko <email address hidden>
Date: Fri Sep 2 11:54:20 2016 +0200

    Fix CapacityWeiger to accept None volume type

    When fixing CapacityFilter in Icfc6ba5f47c3a61b49cbec5110ef7df05eb47195
    I haven't noticed that CapacityWeigher is subject to the same issue.
    This commit fixes that and (finally):

    Closes-Bug: 1619246
    Change-Id: I4b52aad87116472872efec4cefb2ac330c47c85b

Changed in cinder:
status: In Progress → Fix Released
James Page (james-page)
Changed in cinder (Ubuntu):
status: New → In Progress
assignee: nobody → James Page (james-page)
importance: Undecided → Medium
James Page (james-page)
Changed in cinder (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 9.0.0.0rc1

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

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cinder - 2:9.0.0~rc2-0ubuntu1

---------------
cinder (2:9.0.0~rc2-0ubuntu1) yakkety; urgency=medium

  * d/control: oslo.log min version level in global-requirements is too low,
    so set min version to upper-constraints level (LP: #1628883).
  * New upstream release candidate for OpenStack Newton.

 -- Corey Bryant <email address hidden> Mon, 03 Oct 2016 10:36:51 -0400

Changed in cinder (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to cinder (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/727713

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to cinder (stable/stein)

Related fix proposed to branch: stable/stein
Review: https://review.opendev.org/727740

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Ivan Kolodyazhny (<email address hidden>) on branch: master
Review: https://review.opendev.org/727713

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to cinder (stable/stein)

Reviewed: https://review.opendev.org/727740
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=6727f5cbeafb02b24022e54fa6e53350d9fb956b
Submitter: Zuul
Branch: stable/stein

commit 6727f5cbeafb02b24022e54fa6e53350d9fb956b
Author: Ivan Kolodyazhny <email address hidden>
Date: Wed May 13 13:59:43 2020 +0300

    Fix DriverFilter to accept None volume type

    Change Icfc6ba5f47c3a61b49cbec5110ef7df05eb47195 fixes CapacityFilter
    only. We need to do it for DriverFilter too.

    We need this patch only for releases before Train when we can create a
    volume without volume type.

    Change-Id: I3d6166c0fcdbb1d78b69ed4cc648542ac10342bd
    Related-Bug: 1619246

tags: added: in-stable-stein
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.