db.api.snapshot_get_by_host work only with pool

Bug #1493856 reported by Ivan Kolodyazhny
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Ivan Kolodyazhny

Bug Description

api.snapshot_get_by_host(c, 'dsvm2@lvmdriver-1') won't return any snapshots but api.volume_get_all_by_host(c, 'dsvm2@lvmdriver-1') works well.

In [8] v = api.volume_get_all_by_host(c, 'dsvm2@lvmdriver-1')[0]
In [9]: v.host
Out[9]: u'dsvm2@lvmdriver-1#lvmdriver-1'

In such case https://github.com/openstack/cinder/blob/master/cinder/volume/manager.py#L416 won't work

Ivan Kolodyazhny (e0ne)
description: updated
Changed in cinder:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Ivan Kolodyazhny (e0ne)
Ivan Kolodyazhny (e0ne)
Changed in cinder:
milestone: none → liberty-rc1
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/221780

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

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

commit cf3cfb3a66066cfdc1ad15ac35b204d4a7b0301f
Author: Ivan Kolodyazhny <email address hidden>
Date: Wed Sep 9 16:59:55 2015 +0300

    Filter hosts with pool in snapshot_get_by_host

    Snapshots use host field from the volume record. We need to ignore pool
    if it is not specified in a host param for snapshot_get_by_host method.

    Also snapshot_get_by_host will return empty list if host is None or an
    empty string like a volume filer does.

    Change-Id: I0d9eef8675d8dada3a0b6886dbb3f5807eecee73
    Closes-Bug: #1493856

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-rc1 → 7.0.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.