virtuozzo driver: missing context in create_cloned_volume call

Bug #1875953 reported by Brian Rosmaita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Brian Rosmaita

Bug Description

This was detected by pylint.

cinder/volume/drivers/vzstorage.py:742

return super(VZStorageDriver, self)._create_cloned_volume(volume, src_vref)

The superclass signature is:
 def _create_cloned_volume(self, volume, src_vref, context)
and at some point during the function, context.elevated() is called. So this is an accident waiting to happen.

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

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

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

Reviewed: https://review.opendev.org/724407
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=a49913222e8d60f795c1681f2dd57814fd21bfcf
Submitter: Zuul
Branch: master

commit a49913222e8d60f795c1681f2dd57814fd21bfcf
Author: Brian Rosmaita <email address hidden>
Date: Wed Apr 29 15:14:45 2020 -0400

    Add missing context to function call

    Code doesn't pass the context object to a superclass call
    where it is needed in a conditional branch.

    Closes-bug: #1875953
    Change-Id: I4467b6ed7dda01f8bd73428a0d4ee6257b0b3eb7

Changed in cinder:
status: In Progress → Fix Released
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.