openstack-charmers / charm-quagga

Quagga Charm
Apache License 2.0
1 stars 1 forks source link

bgpserver-relation-changed keeps firing #1

Open fnordahl opened 6 years ago

fnordahl commented 6 years ago

2018-01-31 17:52:06 INFO juju-log bgpserver:1: Reactive main running for hook bgpserver-relation-changed 2018-01-31 17:52:07 INFO juju-log bgpserver:1: Invoking reactive handler: reactive/quagga_handlers.py:55:publish_bgp_info 2018-01-31 17:52:09 INFO juju-log bgpserver:1: Invoking reactive handler: reactive/quagga_handlers.py:64:configure_quagga ... This keeps repeating for all relations all the time only to pause for a short while before beginning again. There might be a reactive Endpoint flag that needs clearing or we are running into previously not tested pattern with a peer-like relation between two reactive Endpoints at each end of the relation.

ajkavanagh commented 6 years ago

It might be key order if the interface is using json to serialise the data on the relation; Py3 before 3.6 randomises the order and so it might be changing each time. The fix is to use sort_keys=True when doing the serialisation. Obviously, it might not be this, so if not, please excuse the noise.

fnordahl commented 6 years ago

@ajkavanagh that is indeed a good suggestion, thank you. The interface code itself does not do the serialization, but I'll dig into the Endpoint class of charms.reactive and see how it handles this.