)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"7d2782b8787bff0a866d41780fe6057a1fedc642","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     zhouhenglc \u003czhouhenglc@inspur.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-06-24 10:48:14 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[OVN]fix bug: determine whether the agent is a gateway"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"when chassis_private support, \u0027ovn-cms-options\u0027 not in chassis_private"},{"line_number":10,"context_line":"external_ids, it\u0027s in chassis.external_ids associated with chassis_private"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3ac52432_fa97b2e3","line":7,"range":{"start_line":7,"start_character":5,"end_line":7,"end_character":54},"updated":"2021-06-25 10:03:34.000000000","message":"Not the best description. Maybe something like:\n\n[OVN] \"ControllerAgent\" should accept Chassis and Chassis_Private\n\nBecause we support OVN version with and without Chassis_Private, \"ControllerAgent\" should accept both type of registers. In Chassis, the \"external_ids\" are stored as a main attribute while in Chassis_Private are stored on the chassis reference list.","commit_id":"b13ebd9a76597e8e3f12fbf2cbf0a8eda3e038b6"},{"author":{"_account_id":30380,"name":"ZhouHeng","email":"zhouhenglc@inspur.com","username":"zhouhenglc"},"change_message_id":"28e149bf8e7f6a14400937657d04e012d1d886f1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhouhenglc \u003czhouhenglc@inspur.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-06-24 10:48:14 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[OVN]fix bug: determine whether the agent is a gateway"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"when chassis_private support, \u0027ovn-cms-options\u0027 not in chassis_private"},{"line_number":10,"context_line":"external_ids, it\u0027s in chassis.external_ids associated with chassis_private"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"488b9dd4_c01a618b","line":7,"range":{"start_line":7,"start_character":5,"end_line":7,"end_character":54},"in_reply_to":"3ac52432_fa97b2e3","updated":"2021-06-26 01:39:01.000000000","message":"Done","commit_id":"b13ebd9a76597e8e3f12fbf2cbf0a8eda3e038b6"}],"neutron/plugins/ml2/drivers/ovn/agent/neutron_agent.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"f2c1f4ffdf900aee3bb47eea7d122f44a269de30","unresolved":true,"context_lines":[{"line_number":114,"context_line":"    @staticmethod  # it is by default, but this makes pep8 happy"},{"line_number":115,"context_line":"    def __new__(cls, chassis_private, driver, updated_at\u003dNone):"},{"line_number":116,"context_line":"        try:"},{"line_number":117,"context_line":"            external_ids \u003d chassis_private.chassis[0].external_ids"},{"line_number":118,"context_line":"        except (AttributeError, IndexError):"},{"line_number":119,"context_line":"            # No Chassis_Private support, just use Chassis"},{"line_number":120,"context_line":"            external_ids \u003d chassis_private.external_ids"}],"source_content_type":"text/x-python","patch_set":3,"id":"cf8044c4_a6a14497","line":117,"updated":"2021-07-06 18:57:16.000000000","message":"Let\u0027s say we have Chassis_Private support--in which case the chassis_private variable is actually a Chassis_Private. In this case, the old code would check for ovn-cms-options on that Chassis_Private.external_ids. This new code would try to look up the Chassis on the Chassis_Private--which would exist, and look for the option there. So this would change where we look for that option.\n\nSo I\u0027m confused how the original code works for when Chassis_Private support exists--because ovn-controller sets ovn-cms-options on the Chassis, and not the Chassis_Private. So it looks like this patch would fix that bug as well if I\u0027m reading things correctly? Thoughts?\n\nIf so, then we can also get rid of some code duplication of the try/except by having a staticmethod NeutronAgent.chassis_from_private(maybe_private) that basically does what NeutronAgent.chassis property does, and have the property return self.chassis_from_private(self.chassis_private) and have ControllerAgent.__new__ call cls.chassis_from_private(chassis_private) and get the external_ids from there. But I\u0027m also ok with just going with the patch as-is if you don\u0027t feel like making the change.\n\nAlso, for a while now the primary place that ovn-cms-options has been set is on Chassis.other-config (it is, for now, copied to external_ids as well, but will be removed at some point). So we could handle that case as well.","commit_id":"d3f89fcc1041e5d0d71b8f0513af62c1b13e5821"},{"author":{"_account_id":30380,"name":"ZhouHeng","email":"zhouhenglc@inspur.com","username":"zhouhenglc"},"change_message_id":"925f20699f24c556785c89357b9fd9ef026f7a80","unresolved":true,"context_lines":[{"line_number":114,"context_line":"    @staticmethod  # it is by default, but this makes pep8 happy"},{"line_number":115,"context_line":"    def __new__(cls, chassis_private, driver, updated_at\u003dNone):"},{"line_number":116,"context_line":"        try:"},{"line_number":117,"context_line":"            external_ids \u003d chassis_private.chassis[0].external_ids"},{"line_number":118,"context_line":"        except (AttributeError, IndexError):"},{"line_number":119,"context_line":"            # No Chassis_Private support, just use Chassis"},{"line_number":120,"context_line":"            external_ids \u003d chassis_private.external_ids"}],"source_content_type":"text/x-python","patch_set":3,"id":"5dd0af3c_2dd69db4","line":117,"in_reply_to":"cf8044c4_a6a14497","updated":"2021-07-07 02:27:31.000000000","message":"1. The original code doesn\u0027t work properly when Chassis_Private support exists.[1]\n2. I add a staticmethod NeutronAgent.chassis_from_private\n3. Several places from external_ids read ovn-cms-options, ovn-bridge-mappings ..., is it possible to switch from ovn when it is not supported.\n\n\n\n\n[1] https://launchpad.net/bugs/1933401","commit_id":"d3f89fcc1041e5d0d71b8f0513af62c1b13e5821"}]}
