crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

Implement rlink stop #2019

Closed om26er closed 2 years ago

om26er commented 2 years ago

Fix for https://github.com/crossbario/crossbar/issues/1908

oberstet commented 2 years ago

ah, right, stopping rlinks;) couple of notes/feedback:

The PR expands the constructor of RLink to forward a reference to ApplicationRunner - it could use ComponentConfig.runner:

https://github.com/crossbario/autobahn-python/blob/master/autobahn/twisted/wamp.py#L234 https://github.com/crossbario/autobahn-python/blob/0090f300fa9e2d4a1ef2a44ee15241a9ad9ba4f3/autobahn/wamp/types.py#L109

The actual stopping doesn't run async (it will always immediately return) and doesn't wait for stuff actually stopped. It also doesn't care much if errors during stopping occurs ..

Stopping rlinks should be added (uncommented) in tests. In general, tests for this functionality? eg

/home/oberstet/scm/crossbario/crossbar/test/functests/cfctests/test_cfc_rlink_mesh.py:            u"crossbarfabriccenter.remote.router.start_router_realm_link",
/home/oberstet/scm/crossbario/crossbar/test/functests/cfctests/test_cfc_rlinks.py:            result = yield management_session.call('crossbarfabriccenter.remote.router.start_router_realm_link', node_id, worker_id, realm_id, link_id, link_config)

Stopping of rlinks (start_router_realm) should be added to the orchestration code https://github.com/crossbario/crossbar/blob/541ffa448225f3ec6d63fea83a997a601270e54f/crossbar/master/arealm/arealm.py#L970

That is: once an arealm is stopped via the master node, which first should only marks the arealm as "stopping"

https://github.com/crossbario/crossbar/blob/541ffa448225f3ec6d63fea83a997a601270e54f/crossbar/master/arealm/arealm.py#L1527 https://github.com/crossbario/crossbar/blob/541ffa448225f3ec6d63fea83a997a601270e54f/crossbar/master/arealm/arealm.py#L1566

and then stop all rlinks, and the actual application realm in the respective workers. and while doing so publish meta events

oberstet commented 2 years ago

ah, right, stopping rlinks;) couple of notes/feedback:

The PR expands the constructor of RLink to forward a reference to ApplicationRunner - it could use ComponentConfig.runner:

https://github.com/crossbario/autobahn-python/blob/master/autobahn/twisted/wamp.py#L234 https://github.com/crossbario/autobahn-python/blob/0090f300fa9e2d4a1ef2a44ee15241a9ad9ba4f3/autobahn/wamp/types.py#L109

The actual stopping doesn't run async (it will always immediately return) and doesn't wait for stuff actually stopped. It also doesn't care much if errors during stopping occurs ..

Stopping rlinks should be added (uncommented) in tests. In general, tests for this functionality? eg

/home/oberstet/scm/crossbario/crossbar/test/functests/cfctests/test_cfc_rlink_mesh.py:            u"crossbarfabriccenter.remote.router.start_router_realm_link",
/home/oberstet/scm/crossbario/crossbar/test/functests/cfctests/test_cfc_rlinks.py:            result = yield management_session.call('crossbarfabriccenter.remote.router.start_router_realm_link', node_id, worker_id, realm_id, link_id, link_config)

Stopping of rlinks (start_router_realm) should be added to the orchestration code https://github.com/crossbario/crossbar/blob/541ffa448225f3ec6d63fea83a997a601270e54f/crossbar/master/arealm/arealm.py#L970

That is: once an arealm is stopped via the master node, which first should only marks the arealm as "stopping"

https://github.com/crossbario/crossbar/blob/541ffa448225f3ec6d63fea83a997a601270e54f/crossbar/master/arealm/arealm.py#L1527 https://github.com/crossbario/crossbar/blob/541ffa448225f3ec6d63fea83a997a601270e54f/crossbar/master/arealm/arealm.py#L1566

and then stop all rlinks, and the actual application realm in the respective workers. and while doing so publish meta events