unmatch attribute while calling get_grant_resource

Bug #1924956 reported by LiangLu
This bug affects 1 person
Affects Status Importance Assigned to Milestone
In Progress
Yi Feng

Bug Description

while calling get_grant_resource() from _scale_grant in conductor,
an unmatch parameter happened:

2021-04-15 17:14:05.531 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00mTypeError: get_grant_resource() got an unexpected keyword argument 'plugin'

This error is caused by calling get_grant_resource() with parameter 'plugin'


however in openstack.py, get_grant_resource() does not have this parameter:


Solution: add 'plugin=None' to get_grant_resource()

Yasufumi Ogawa (yasufum)
Changed in tacker:
importance: Undecided → Medium
Changed in tacker:
assignee: nobody → Hiromu Asahina (h-asahina)
Revision history for this message
Yasufumi Ogawa (yasufum) wrote :


Looking at openstack infra_driver quickly, there is some common style to have an arg `plugin` and caller gives `self` to it even if it's not used actually. So, why don't you follow the convention at once instead of using default value `None` exceptionally?

Revision history for this message
Hiromu Asahina (h-asahina) wrote :

Thank you for your suggestion.
As you pointed out, there is some common style we can follow.

There are two reasons I decided to delete this arg instead of following such style:
i) It's not used (as you pointed out);
ii) The infra drivers inherit an abstract class `VnfScaleAbstractDriver` that defines `get_grant_resource` method without `plugin` arg.

I guess, in general, abstract classes shouldn't be changed frequently.
Would you give me your thoughts?

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tacker/+/795016

Changed in tacker:
status: New → In Progress
Revision history for this message
Yi Feng (fengyi765) wrote :

To Hiromu Asahina:
Sorry, I don't know this bug has assigned to you.
In my branch https://review.opendev.org/c/openstack/tacker/+/795016, I have fixed this bug just delete the `plugin` arg in `conductor_server` to make my modification for get_grant_resource_scale_out can work correctly.
If you have other solutions, I can withdraw the modification or you can comment on my patch and let me modify it.

Revision history for this message
Hiromu Asahina (h-asahina) wrote :

Thank you for letting me know.
I commented on your patch.

Yasufumi Ogawa (yasufum)
Changed in tacker:
assignee: Hiromu Asahina (h-asahina) → Yi Feng (fengyi765)
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.