)]}'
{"neutron/agent/rpc.py":[{"author":{"_account_id":14957,"name":"Brad Behle","email":"behle@us.ibm.com","username":"behle"},"change_message_id":"edbe006118db6a9e8baf1e1ab948da14063fa962","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def create_consumers(endpoints, prefix, topic_details, start_listening\u003dTrue,"},{"line_number":33,"context_line":"                     connection\u003dNone):"},{"line_number":34,"context_line":"    \"\"\"Create agent RPC consumers."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_74147843","line":32,"updated":"2015-10-14 18:52:01.000000000","message":"Update the unit tests or add a test if possible to cover this method\u0027s new connection parm","commit_id":"5ee103a7df664535bb77b937c4efb8e816eebce3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"696c8a00573e7e202fcb7ed3b32ab20b804f17ec","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def create_consumers(endpoints, prefix, topic_details, start_listening\u003dTrue,"},{"line_number":33,"context_line":"                     connection\u003dNone):"},{"line_number":34,"context_line":"    \"\"\"Create agent RPC consumers."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_ee42cc3d","line":32,"in_reply_to":"5a2ca52d_74147843","updated":"2015-10-15 13:39:20.000000000","message":"Done","commit_id":"5ee103a7df664535bb77b937c4efb8e816eebce3"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":14957,"name":"Brad Behle","email":"behle@us.ibm.com","username":"behle"},"change_message_id":"edbe006118db6a9e8baf1e1ab948da14063fa962","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                                              \u0027segmentation_id\u0027]),"},{"line_number":354,"context_line":"                                          local_vlan)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def _prepare_rpc(self):"},{"line_number":357,"context_line":"        self.context \u003d context.get_admin_context_without_session()"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        self.plugin_rpc \u003d OVSPluginApi(topics.PLUGIN)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_1451840e","line":356,"updated":"2015-10-14 18:52:01.000000000","message":"Add unit test for this new method","commit_id":"5ee103a7df664535bb77b937c4efb8e816eebce3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"696c8a00573e7e202fcb7ed3b32ab20b804f17ec","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                                              \u0027segmentation_id\u0027]),"},{"line_number":354,"context_line":"                                          local_vlan)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def _prepare_rpc(self):"},{"line_number":357,"context_line":"        self.context \u003d context.get_admin_context_without_session()"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        self.plugin_rpc \u003d OVSPluginApi(topics.PLUGIN)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_ce8cb081","line":356,"in_reply_to":"5a2ca52d_1451840e","updated":"2015-10-15 13:39:20.000000000","message":"What would be the value of the unit test though? The code is still validated by functional tests, just not targeting this specific method. A unit test for that kind of helper method would be a mock grave, or a test that validates for mere typos and similar issues, which would be caught by other tests in gate.","commit_id":"5ee103a7df664535bb77b937c4efb8e816eebce3"},{"author":{"_account_id":14957,"name":"Brad Behle","email":"behle@us.ibm.com","username":"behle"},"change_message_id":"9ccf8da2a2bf12e030e9515ff7f09c37885b8808","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                                              \u0027segmentation_id\u0027]),"},{"line_number":354,"context_line":"                                          local_vlan)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def _prepare_rpc(self):"},{"line_number":357,"context_line":"        self.context \u003d context.get_admin_context_without_session()"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        self.plugin_rpc \u003d OVSPluginApi(topics.PLUGIN)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_3e4cbb41","line":356,"in_reply_to":"5a2ca52d_ce8cb081","updated":"2015-10-19 15:38:34.000000000","message":"Ok, good point. If _prepare_rpc and _declare_consumers are adequately covered by functional tests, then that works for me.","commit_id":"5ee103a7df664535bb77b937c4efb8e816eebce3"},{"author":{"_account_id":14957,"name":"Brad Behle","email":"behle@us.ibm.com","username":"behle"},"change_message_id":"edbe006118db6a9e8baf1e1ab948da14063fa962","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        self.connection \u003d n_rpc.create_connection(new\u003dTrue)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    def _declare_consumers(self):"},{"line_number":386,"context_line":"        # Define the listening consumers for the agent"},{"line_number":387,"context_line":"        consumers \u003d [[topics.PORT, topics.UPDATE],"},{"line_number":388,"context_line":"                     [topics.PORT, topics.DELETE],"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_b4577001","line":385,"updated":"2015-10-14 18:52:01.000000000","message":"Add unit test for this new method","commit_id":"5ee103a7df664535bb77b937c4efb8e816eebce3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"696c8a00573e7e202fcb7ed3b32ab20b804f17ec","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        self.connection \u003d n_rpc.create_connection(new\u003dTrue)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    def _declare_consumers(self):"},{"line_number":386,"context_line":"        # Define the listening consumers for the agent"},{"line_number":387,"context_line":"        consumers \u003d [[topics.PORT, topics.UPDATE],"},{"line_number":388,"context_line":"                     [topics.PORT, topics.DELETE],"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_6ed1dc56","line":385,"in_reply_to":"5a2ca52d_b4577001","updated":"2015-10-15 13:39:20.000000000","message":"Ditto.","commit_id":"5ee103a7df664535bb77b937c4efb8e816eebce3"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"aa9eb396000e22bf0806929c3675b36d7bab8cfe","unresolved":false,"context_lines":[{"line_number":378,"context_line":"            self.patch_tun_ofport,"},{"line_number":379,"context_line":"            self.conf.host,"},{"line_number":380,"context_line":"            self.enable_tunneling,"},{"line_number":381,"context_line":"            self.enable_distributed_routing)"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        self.connection \u003d n_rpc.create_connection(new\u003dTrue)"},{"line_number":384,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_2bae6d98","line":381,"updated":"2015-10-15 15:43:12.000000000","message":"this can cause the server perform a fanout.  (dvr_mac_address_update)\nisn\u0027t it racy with _declare_consumers?","commit_id":"c46e4061310deaa14f1b80837ad3d3d6b73581c6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cb8e242fe5209c3672a21cd5deecdcc6b2f7ae52","unresolved":false,"context_lines":[{"line_number":378,"context_line":"            self.patch_tun_ofport,"},{"line_number":379,"context_line":"            self.conf.host,"},{"line_number":380,"context_line":"            self.enable_tunneling,"},{"line_number":381,"context_line":"            self.enable_distributed_routing)"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        self.connection \u003d n_rpc.create_connection(new\u003dTrue)"},{"line_number":384,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_74da064e","line":381,"in_reply_to":"5a2ca52d_2bae6d98","updated":"2015-10-15 16:25:40.000000000","message":"Gosh, it\u0027s so interleaved. I will think about that one. It\u0027s probably not the right thing to poke RPC on __init__.","commit_id":"c46e4061310deaa14f1b80837ad3d3d6b73581c6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"53425ad336fa57cd9493973d75ad65de9c6055fa","unresolved":false,"context_lines":[{"line_number":378,"context_line":"            self.patch_tun_ofport,"},{"line_number":379,"context_line":"            self.conf.host,"},{"line_number":380,"context_line":"            self.enable_tunneling,"},{"line_number":381,"context_line":"            self.enable_distributed_routing)"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        self.connection \u003d n_rpc.create_connection(new\u003dTrue)"},{"line_number":384,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_1856775c","line":381,"in_reply_to":"5a2ca52d_74da064e","updated":"2015-10-20 16:41:14.000000000","message":"OK, I looked at it a bit closer. My understanding is that there is no race condition here. Indeed there won\u0027t be a thread to consume the fanout update, but that does not matter because we update our mac address from the result of the call to get_dvr_mac_address_by_host and not from that notification. My understanding is that notification is designed for other agents in the swarm.","commit_id":"c46e4061310deaa14f1b80837ad3d3d6b73581c6"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"aa9eb396000e22bf0806929c3675b36d7bab8cfe","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            [self],"},{"line_number":398,"context_line":"            topics.AGENT,"},{"line_number":399,"context_line":"            consumers,"},{"line_number":400,"context_line":"            start_listening\u003dFalse,"},{"line_number":401,"context_line":"            connection\u003dself.connection)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def init_extension_manager(self, connection):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_6bda254e","line":400,"updated":"2015-10-15 15:43:12.000000000","message":"start_listening\u003dFalse is no longer necessary?","commit_id":"c46e4061310deaa14f1b80837ad3d3d6b73581c6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"cb8e242fe5209c3672a21cd5deecdcc6b2f7ae52","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            [self],"},{"line_number":398,"context_line":"            topics.AGENT,"},{"line_number":399,"context_line":"            consumers,"},{"line_number":400,"context_line":"            start_listening\u003dFalse,"},{"line_number":401,"context_line":"            connection\u003dself.connection)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def init_extension_manager(self, connection):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a2ca52d_d4e99ae7","line":400,"in_reply_to":"5a2ca52d_6bda254e","updated":"2015-10-15 16:25:40.000000000","message":"Right you are!","commit_id":"c46e4061310deaa14f1b80837ad3d3d6b73581c6"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0f964bed5c70fd06f9b22010d7f493f5983aea1e","unresolved":false,"context_lines":[{"line_number":356,"context_line":"                                              \u0027segmentation_id\u0027]),"},{"line_number":357,"context_line":"                                          local_vlan)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def _prepare_rpc(self):"},{"line_number":360,"context_line":"        self.context \u003d context.get_admin_context_without_session()"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        self.plugin_rpc \u003d OVSPluginApi(topics.PLUGIN)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_dede6e10","line":359,"updated":"2015-10-21 16:49:58.000000000","message":"It does not make sense to add the \"dvr_agent\" init inside the _prepare_rpc method, that confuses. \nSince initializing DVR is not related to prepare_rpc.\nI would recommend that you split this function such as _prepare_rpc and _init_dvr_agent.\nThen call _init_dvr_agent after _prepare_rpc in L273.","commit_id":"8b89e7e8170f72e25175a03abcf60e397334e6d8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"711b39fcc4b5187fdfa59161f0af353f422a7322","unresolved":false,"context_lines":[{"line_number":356,"context_line":"                                              \u0027segmentation_id\u0027]),"},{"line_number":357,"context_line":"                                          local_vlan)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def _prepare_rpc(self):"},{"line_number":360,"context_line":"        self.context \u003d context.get_admin_context_without_session()"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        self.plugin_rpc \u003d OVSPluginApi(topics.PLUGIN)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_87f8bac4","line":359,"in_reply_to":"3a29b11f_04b3020b","updated":"2015-11-02 14:08:42.000000000","message":"OK, I moved agent objects initialization into a separate helper method.","commit_id":"8b89e7e8170f72e25175a03abcf60e397334e6d8"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"722b9bcb39d1498abd200130099f465176c0edd0","unresolved":false,"context_lines":[{"line_number":356,"context_line":"                                              \u0027segmentation_id\u0027]),"},{"line_number":357,"context_line":"                                          local_vlan)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def _prepare_rpc(self):"},{"line_number":360,"context_line":"        self.context \u003d context.get_admin_context_without_session()"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        self.plugin_rpc \u003d OVSPluginApi(topics.PLUGIN)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_04b3020b","line":359,"in_reply_to":"3a29b11f_5d0ca1ec","updated":"2015-10-22 19:30:50.000000000","message":"As the dvr agent init triggers an RPC call, having it here makes sense to me.  I\u0027m not throwing a +1 down because I\u0027m still trying to work out if the order of these steps below is important.","commit_id":"8b89e7e8170f72e25175a03abcf60e397334e6d8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"eb366a45de626b99cd8d6f10b3d1aed9ebf9cac4","unresolved":false,"context_lines":[{"line_number":356,"context_line":"                                              \u0027segmentation_id\u0027]),"},{"line_number":357,"context_line":"                                          local_vlan)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def _prepare_rpc(self):"},{"line_number":360,"context_line":"        self.context \u003d context.get_admin_context_without_session()"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        self.plugin_rpc \u003d OVSPluginApi(topics.PLUGIN)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_5d0ca1ec","line":359,"in_reply_to":"3a29b11f_dede6e10","updated":"2015-10-21 17:59:28.000000000","message":"dvr agent initialization triggers RPC to update MAC address. Do you think it does not justify keeping it here?","commit_id":"8b89e7e8170f72e25175a03abcf60e397334e6d8"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"18c87b4ef46fc8f28580f8f1360b2960652ece6e","unresolved":false,"context_lines":[{"line_number":371,"context_line":""},{"line_number":372,"context_line":"        self.sg_agent \u003d sg_rpc.SecurityGroupAgentRpc(self.context,"},{"line_number":373,"context_line":"                self.sg_plugin_rpc, self.local_vlan_map,"},{"line_number":374,"context_line":"                defer_refresh_firewall\u003dTrue)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        self.dvr_agent \u003d ovs_dvr_neutron_agent.OVSDVRNeutronAgent("},{"line_number":377,"context_line":"            self.context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_ade4b5df","line":374,"updated":"2015-11-02 15:02:25.000000000","message":"Indentation in line 372-374","commit_id":"4015e85578ebf5600be8233853f30706255db2c0"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c047a393e0bea2457b8a31dcf2d62a1f79f37539","unresolved":false,"context_lines":[{"line_number":371,"context_line":""},{"line_number":372,"context_line":"        self.sg_agent \u003d sg_rpc.SecurityGroupAgentRpc(self.context,"},{"line_number":373,"context_line":"                self.sg_plugin_rpc, self.local_vlan_map,"},{"line_number":374,"context_line":"                defer_refresh_firewall\u003dTrue)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        self.dvr_agent \u003d ovs_dvr_neutron_agent.OVSDVRNeutronAgent("},{"line_number":377,"context_line":"            self.context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a26ad4f_db5c477f","line":374,"in_reply_to":"1a26ad4f_ade4b5df","updated":"2015-11-02 15:37:20.000000000","message":"Done","commit_id":"4015e85578ebf5600be8233853f30706255db2c0"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e5ac2facec72cd4358fdab7b0614965c3deb67a5","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        self.dvr_agent.setup_dvr_flows()"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        # We are now ready to consume from AMQP queues, so it should be"},{"line_number":279,"context_line":"        # (mostly) safe to declare consumers on AMQP broker."},{"line_number":280,"context_line":"        #"},{"line_number":281,"context_line":"        # NOTE(ihrachyshka): Of course, if for some reason consumers fail to"},{"line_number":282,"context_line":"        # spawn or listen on a queue, then it will be left there indefinitely,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a26ad4f_f3a7e7ba","line":279,"updated":"2015-11-02 17:23:28.000000000","message":"can you add a comment to explain\nwhich methods would \"declare consumers on AMQP broker\"\nand thus shouldn\u0027t be called earlier?","commit_id":"aba64dd098ed34c2fa6709085c3150a485756a97"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7a161c8600604743be500dd15c971190a32af350","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        self.dvr_agent.setup_dvr_flows()"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        # We are now ready to consume from AMQP queues, so it should be"},{"line_number":279,"context_line":"        # (mostly) safe to declare consumers on AMQP broker."},{"line_number":280,"context_line":"        #"},{"line_number":281,"context_line":"        # NOTE(ihrachyshka): Of course, if for some reason consumers fail to"},{"line_number":282,"context_line":"        # spawn or listen on a queue, then it will be left there indefinitely,"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa80f949_bcaf8e7c","line":279,"in_reply_to":"1a26ad4f_f3a7e7ba","updated":"2015-11-03 13:47:46.000000000","message":"I will actually simplify the patch because it seems that RPC client calls are not triggering topic declarations, so the only thing we need is to postpone declarations to just before consume_in_threads() call.","commit_id":"aba64dd098ed34c2fa6709085c3150a485756a97"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"98ba56ae4005b953c26aeeadde0604e37e0cf6f2","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        # keeps association between ports and ofports to detect ofport change"},{"line_number":230,"context_line":"        self.vifname_to_ofport_map \u003d {}"},{"line_number":231,"context_line":"        self.setup_rpc()"},{"line_number":232,"context_line":"        self.init_extension_manager(self.connection)"},{"line_number":233,"context_line":"        self.bridge_mappings \u003d bridge_mappings"},{"line_number":234,"context_line":"        self.setup_physical_bridges(self.bridge_mappings)"},{"line_number":235,"context_line":"        self.local_vlan_map \u003d {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_eef698d6","line":232,"updated":"2015-11-04 06:10:13.000000000","message":"this involves create_consumer","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"aa88c358cfe591467ae63ae8163cd917581a8105","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        # keeps association between ports and ofports to detect ofport change"},{"line_number":230,"context_line":"        self.vifname_to_ofport_map \u003d {}"},{"line_number":231,"context_line":"        self.setup_rpc()"},{"line_number":232,"context_line":"        self.init_extension_manager(self.connection)"},{"line_number":233,"context_line":"        self.bridge_mappings \u003d bridge_mappings"},{"line_number":234,"context_line":"        self.setup_physical_bridges(self.bridge_mappings)"},{"line_number":235,"context_line":"        self.local_vlan_map \u003d {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_bf0519c3","line":232,"in_reply_to":"fa80f949_eef698d6","updated":"2015-11-04 09:52:18.000000000","message":"I will move it later.","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"98ba56ae4005b953c26aeeadde0604e37e0cf6f2","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # NOTE(ihrachyshka): consumer topics will be declared later, to avoid"},{"line_number":380,"context_line":"        # leaving orphaned topics on AMQP broker side in case we don\u0027t reach to"},{"line_number":381,"context_line":"        # the consumer code and crash before it"},{"line_number":382,"context_line":"        self.connection \u003d n_rpc.create_connection()"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def _start_consumers(self):"},{"line_number":385,"context_line":"        # Define the listening consumers for the agent"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_6ebf08d1","line":382,"updated":"2015-11-04 06:10:13.000000000","message":"it seems that the only tihng this patch postpones is create_consumer.\n(as consume_in_threads is already postponed)\n\nat a quick glance of oslo.messaging, create_consumer doesn\u0027t\nseem to involve topic declarations. (right?)\n\nso i\u0027m not sure what\u0027s the motivation of the change.","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c69b3d5d259d5f3b52eacab05b068631b5e56f3f","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # NOTE(ihrachyshka): consumer topics will be declared later, to avoid"},{"line_number":380,"context_line":"        # leaving orphaned topics on AMQP broker side in case we don\u0027t reach to"},{"line_number":381,"context_line":"        # the consumer code and crash before it"},{"line_number":382,"context_line":"        self.connection \u003d n_rpc.create_connection()"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def _start_consumers(self):"},{"line_number":385,"context_line":"        # Define the listening consumers for the agent"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_8f7231ac","line":382,"in_reply_to":"fa80f949_2eab0e1f","updated":"2015-11-05 11:15:52.000000000","message":"Yes. start() will only run consumer threads to receive messages, but topics are declared on create_consumer() call.","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"120d9c7d725368f632bb34dd317564b97fc29f9c","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # NOTE(ihrachyshka): consumer topics will be declared later, to avoid"},{"line_number":380,"context_line":"        # leaving orphaned topics on AMQP broker side in case we don\u0027t reach to"},{"line_number":381,"context_line":"        # the consumer code and crash before it"},{"line_number":382,"context_line":"        self.connection \u003d n_rpc.create_connection()"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def _start_consumers(self):"},{"line_number":385,"context_line":"        # Define the listening consumers for the agent"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_dab02e8e","line":382,"in_reply_to":"fa80f949_6ebf08d1","updated":"2015-11-04 09:16:34.000000000","message":"declare_consumer immediately establishes connection to AMQP: https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/impl_rabbit.py#L837\n\nAnd on (re)connection, it declares all consumers on AMQP side, creating topics: https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/impl_rabbit.py#L648","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"41d17c87302cbdadc459a7233706e978f748471e","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # NOTE(ihrachyshka): consumer topics will be declared later, to avoid"},{"line_number":380,"context_line":"        # leaving orphaned topics on AMQP broker side in case we don\u0027t reach to"},{"line_number":381,"context_line":"        # the consumer code and crash before it"},{"line_number":382,"context_line":"        self.connection \u003d n_rpc.create_connection()"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def _start_consumers(self):"},{"line_number":385,"context_line":"        # Define the listening consumers for the agent"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_ae35be46","line":382,"in_reply_to":"fa80f949_8ecd5a5f","updated":"2015-11-05 09:02:56.000000000","message":"No, actually I tested it after your question and realized that clients are not triggering declarations. The problem is that when you declare a new consumer on a connection, it\u0027s immediately established, and all consumers are registered on the broker.\n\nSince clients are not really affecting the flow, I simplified the patch a bit in recent PSs.","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"850cfaeab48688c3fade6001cc7daffdabe0ddb6","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # NOTE(ihrachyshka): consumer topics will be declared later, to avoid"},{"line_number":380,"context_line":"        # leaving orphaned topics on AMQP broker side in case we don\u0027t reach to"},{"line_number":381,"context_line":"        # the consumer code and crash before it"},{"line_number":382,"context_line":"        self.connection \u003d n_rpc.create_connection()"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def _start_consumers(self):"},{"line_number":385,"context_line":"        # Define the listening consumers for the agent"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_9b5ef374","line":382,"in_reply_to":"fa80f949_8f7231ac","updated":"2015-11-05 13:06:00.000000000","message":"i tried with a small program [1] but it doesn\u0027t seem to\nregister the topic without start().  any idea?\n\n[1] http://paste.openstack.org/show/478091/","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"ad92d307eb216fa7f6f58e8efc93ded997d0a250","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # NOTE(ihrachyshka): consumer topics will be declared later, to avoid"},{"line_number":380,"context_line":"        # leaving orphaned topics on AMQP broker side in case we don\u0027t reach to"},{"line_number":381,"context_line":"        # the consumer code and crash before it"},{"line_number":382,"context_line":"        self.connection \u003d n_rpc.create_connection()"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def _start_consumers(self):"},{"line_number":385,"context_line":"        # Define the listening consumers for the agent"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_2eab0e1f","line":382,"in_reply_to":"fa80f949_ae35be46","updated":"2015-11-05 09:12:35.000000000","message":"then you mean create_consumer itself, which is get_rpc_server without start(), ends up with declare_consumer?","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"f9729619e2b7851ebe4505fbc6382673532e978c","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        # NOTE(ihrachyshka): consumer topics will be declared later, to avoid"},{"line_number":380,"context_line":"        # leaving orphaned topics on AMQP broker side in case we don\u0027t reach to"},{"line_number":381,"context_line":"        # the consumer code and crash before it"},{"line_number":382,"context_line":"        self.connection \u003d n_rpc.create_connection()"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    def _start_consumers(self):"},{"line_number":385,"context_line":"        # Define the listening consumers for the agent"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_8ecd5a5f","line":382,"in_reply_to":"fa80f949_dab02e8e","updated":"2015-11-05 09:00:25.000000000","message":"thank you for explanation.\n\nso, while create_consumer itself is ok, a (re)connection due to\nclient-side activity causes declare_consumer, right?","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":2860,"name":"litong01","email":"email4tong@yahoo.com","username":"litong01"},"change_message_id":"9f236708ba89123b400fef8aad92a333b199e6c9","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            consumers.append([topics.L2POPULATION, topics.UPDATE])"},{"line_number":395,"context_line":"        # NOTE(ihrachyshka): ideally, we would define the topics with ttl, to"},{"line_number":396,"context_line":"        # avoid leaving orphaned auto-delete topics on AMQP side; sadly,"},{"line_number":397,"context_line":"        # oslo.messaging does not support setting ttl for topics yet"},{"line_number":398,"context_line":"        self.connection \u003d agent_rpc.create_consumers("},{"line_number":399,"context_line":"            [self],"},{"line_number":400,"context_line":"            topics.AGENT,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_9477f6d3","line":397,"updated":"2015-11-03 16:56:12.000000000","message":"I do not think these comments are necessary since the comments will not help or describe the code below.","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"120d9c7d725368f632bb34dd317564b97fc29f9c","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            consumers.append([topics.L2POPULATION, topics.UPDATE])"},{"line_number":395,"context_line":"        # NOTE(ihrachyshka): ideally, we would define the topics with ttl, to"},{"line_number":396,"context_line":"        # avoid leaving orphaned auto-delete topics on AMQP side; sadly,"},{"line_number":397,"context_line":"        # oslo.messaging does not support setting ttl for topics yet"},{"line_number":398,"context_line":"        self.connection \u003d agent_rpc.create_consumers("},{"line_number":399,"context_line":"            [self],"},{"line_number":400,"context_line":"            topics.AGENT,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_fa5bb252","line":397,"in_reply_to":"fa80f949_3565e444","updated":"2015-11-04 09:16:34.000000000","message":"I mentioned TTL because that\u0027s the thing that we should adopt from oslo.messaging once support is there (I know folks are looking into it).\n\nWhat\u0027s your exact suggestion? Removing the comment?","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"664bc0388151591b8830313d84ff949f3f2c49dd","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            consumers.append([topics.L2POPULATION, topics.UPDATE])"},{"line_number":395,"context_line":"        # NOTE(ihrachyshka): ideally, we would define the topics with ttl, to"},{"line_number":396,"context_line":"        # avoid leaving orphaned auto-delete topics on AMQP side; sadly,"},{"line_number":397,"context_line":"        # oslo.messaging does not support setting ttl for topics yet"},{"line_number":398,"context_line":"        self.connection \u003d agent_rpc.create_consumers("},{"line_number":399,"context_line":"            [self],"},{"line_number":400,"context_line":"            topics.AGENT,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_da8287c8","line":397,"in_reply_to":"fa80f949_9477f6d3","updated":"2015-11-03 17:26:38.000000000","message":"On the contrary, I believe the comment describes why we solve orphaned topics issue with arranging code in smart way instead of setting ttl on AMQP.","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":2860,"name":"litong01","email":"email4tong@yahoo.com","username":"litong01"},"change_message_id":"ac8853ca4fa86393be4ccbd7ea666ef172f90a27","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            consumers.append([topics.L2POPULATION, topics.UPDATE])"},{"line_number":395,"context_line":"        # NOTE(ihrachyshka): ideally, we would define the topics with ttl, to"},{"line_number":396,"context_line":"        # avoid leaving orphaned auto-delete topics on AMQP side; sadly,"},{"line_number":397,"context_line":"        # oslo.messaging does not support setting ttl for topics yet"},{"line_number":398,"context_line":"        self.connection \u003d agent_rpc.create_consumers("},{"line_number":399,"context_line":"            [self],"},{"line_number":400,"context_line":"            topics.AGENT,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_3565e444","line":397,"in_reply_to":"fa80f949_da8287c8","updated":"2015-11-03 17:44:50.000000000","message":"Ihar, what I meant is the ttl reference. how does the code below in anyway have anything to do with ttl which does not exist in oslo? seems to me the below code simply created a connection by passing in an existing connection. Doing it a slightly different comparing to the existing code avoided creating topic too early, I think that the comments should be declared as such. The issue is that the code has nothing to do with TTL since it just delayed the creation of the topic which behaves different with TTL. Throwing the term TTL probably cause more confusion by just looking at the comment right there. Of course, just my 2 cents.","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"07e0af62be068f199e6e66c2c4520e388c2f4513","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            consumers.append([topics.L2POPULATION, topics.UPDATE])"},{"line_number":395,"context_line":"        # NOTE(ihrachyshka): ideally, we would define the topics with ttl, to"},{"line_number":396,"context_line":"        # avoid leaving orphaned auto-delete topics on AMQP side; sadly,"},{"line_number":397,"context_line":"        # oslo.messaging does not support setting ttl for topics yet"},{"line_number":398,"context_line":"        self.connection \u003d agent_rpc.create_consumers("},{"line_number":399,"context_line":"            [self],"},{"line_number":400,"context_line":"            topics.AGENT,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa80f949_7f9fb103","line":397,"in_reply_to":"fa80f949_fa5bb252","updated":"2015-11-04 10:07:13.000000000","message":"OK, I remove the comment.","commit_id":"d1f7aad068bd6317a8543fc1bf7720bad21c1998"}]}
