Cannot use push-notification with custom objects

Bug #1837529 reported by Roman Dobosz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Wishlist
Roman Dobosz

Bug Description

We have custom object which we would like to have updated in remote resource cache. Currently, in CacheBackedPluginApi resource cache is created on initialization by create_cache_for_l2_agent function which have fixed list of resources to subscribe.

If we want to use additional type of resource, there is no other way, than either copy entire class and use custom cache creation function, or alter the list in the neutron code, which is bad either.

This isn't a bug, but rather it's an annoying inconvenience, which might be easily fixed.

Changed in neutron:
assignee: nobody → Roman Dobosz (roman-dobosz)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Revision history for this message
Boden R (boden) wrote :

Seems like border line RFE, but perhaps this is small enough where an RFE is not needed.

Revision history for this message
Roman Dobosz (roman-dobosz) wrote :

For me it's like a flaw in implementation rather, than RFE. Please, see proposed patch :)

Changed in neutron:
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/672261
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=2db02023eec96d825749490d40c750a37b97daec
Submitter: Zuul
Branch: master

commit 2db02023eec96d825749490d40c750a37b97daec
Author: Roman Dobosz <email address hidden>
Date: Tue Jul 23 10:45:19 2019 +0000

    Initialize modifiable list of resources in CacheBackedPluginApi.

    Currently, if one wanted to add any other resources (including custom
    objects), there is no simple way to achieve that, since list of defined
    resource types is hardcoded in create_cache_for_l2_agent function,
    which is called in __init__ of the CacheBackedPluginApi. Even if we
    derive from it, we must call super() on descendant, otherwise we end up
    with uninitialized PluginApi part. But if we do the super() on it, we
    end up on having hardcoded resources only, and creating a new remote
    resource cache object will make a new set of listeners, while the
    listeners for the old object still exist, and may cause memory leaks.
    RemoteResourceWatcher class have only initializers for those listeners,
    and there is no obvious way to stop/clean them.

    In this patch we propose to move create_cache_for_l2_agent function to
    CacheBackedPluginApi class, and make resource list to be class
    attribute, so that it can be easily modified.

    Change-Id: Ia65ecaf7b48926b74505226a5922b85e2cb593a6
    Closes-Bug: 1837529

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 15.0.0.0b1

This issue was fixed in the openstack/neutron 15.0.0.0b1 development milestone.

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.