provision_devices called with empty set of requests

Bug #1634963 reported by Jeremy Arnold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-powervm
Invalid
Undecided
Unassigned

Bug Description

VIFEventHandler.process (networking_powervm/plugins/ibm/agent/powervm/agent_base.py) builds a set of provisioning requests and then calls provision_devices to act on those requests. However, it's quite likely that there are no relevant events, so prov_req_set will be empty. In this case, there is no need to call the agent code. So provision_devices should not be invoked if prov_req_set is empty. This will eliminate any unnecessary overhead that the agent may have in its provision_devices implementation.

Revision history for this message
Eric Fried (efried) wrote :

The overhead in the networking-powervm calls is negligible - we're building a couple of dicts (empty when there are no requests) and emitting a log message or two. Other than that, it's just the method call overhead.

If a consuming product is subclassing and overriding provision_devices, that override can easily avoid overhead by checking for an empty requests list and shorting out.

Changed in networking-powervm:
status: New → Invalid
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.