Incorrect conditional / assignment in SolidFireDriver

Bug #1577459 reported by Yosef Hoffman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Triaged
Low
Unassigned

Bug Description

References below are in https://git.openstack.org/cgit/openstack/cinder/tree/cinder/volume/drivers/solidfire.py#n351

In _init_volume_mappings (line 341):
            if v.get('provider_id', 'nil') != sfvol['volumeID']: <-- This value does not match the value that provider_id gets updated to 4 lines down
                    v['provider_id'] == sfvol['volumeID']
                    updates.append(
                        {'id': v['id'],
                         'provider_id': self._create_provider_id_string( <-- Above, it should check if provider_id matches this value
                             sfvol['volumeID'], sfvol['accountID'])})

This should be like it is in _init_snapshot_mappings (line 323):

                id_string = self._create_provider_id_string( <-- First save the provider string to a variable
                    sfsnap['snapshotID'],
                    sfsnap['volumeID'])
                if s.get('provider_id') != id_string: <-- check the value here
                    updates.append(
                        {'id': s['id'],
                         'provider_id': id_string}) <-- and assign the same value here if they don't match above

Changed in horizon:
assignee: nobody → Yosef Hoffman (yh128t)
affects: horizon → cinder
Changed in cinder:
importance: Undecided → Low
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/312641

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Yosef Hoffman (<email address hidden>) on branch: master
Review: https://review.openstack.org/312641

Changed in cinder:
status: In Progress → New
assignee: Yosef Hoffman (yh128t) → nobody
tags: added: drivers solidfire
Changed in cinder:
status: New → Triaged
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.