)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eba43d42b6a88f21e46db33efbf4248a69dc46b7","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     LiWenhai \u003cliwenhai66@163.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2021-09-17 09:58:24 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Trunk and port are residual in VM deleting scenario when southbound plugin/agent failed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"With following reproduce steps, trunk and port will be residual:"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"375c8a29_55a797f4","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":87},"updated":"2021-09-17 05:38:11.000000000","message":"This is a big long for \"git log\", please following the guide to rephrase. Some notes of [1]:\n\"\nThe first line should be limited to 50 characters and should not end with a period.\nSubsequent lines should be wrapped at 72 characters.\n\"\n\nSo, how about \"Remove trunk and port after VM failed to delete\"?\n\n[1] https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"3e8b66b5b2448731f64fca738eaed7cad74ceb1d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eba43d42b6a88f21e46db33efbf4248a69dc46b7","unresolved":true,"context_lines":[{"line_number":14,"context_line":" 4. Operator start to delete VM"},{"line_number":15,"context_line":" 5. Due to 3rd party plugin issue, port unbind failed. Host and device information are not updated. Trunk and port binding information are not updated. Port\u0027s status is normal and active."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":" Test result: operator fail to delete trunk as port is in bound status."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":" In trunk deleting scenario, VM that the port is bound will be checked"},{"line_number":20,"context_line":" and trunk can be deleted if the VM is no longer exist."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"2e542e1f_3b5c4571","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":1},"updated":"2021-09-17 05:38:11.000000000","message":"white space","commit_id":"3e8b66b5b2448731f64fca738eaed7cad74ceb1d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eba43d42b6a88f21e46db33efbf4248a69dc46b7","unresolved":true,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":" Test result: operator fail to delete trunk as port is in bound status."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":" In trunk deleting scenario, VM that the port is bound will be checked"},{"line_number":20,"context_line":" and trunk can be deleted if the VM is no longer exist."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":" Closes-Bug: #1938972"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"64f35cfb_dc508ae7","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":1},"updated":"2021-09-17 05:38:11.000000000","message":"white space","commit_id":"3e8b66b5b2448731f64fca738eaed7cad74ceb1d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eba43d42b6a88f21e46db33efbf4248a69dc46b7","unresolved":true,"context_lines":[{"line_number":17,"context_line":" Test result: operator fail to delete trunk as port is in bound status."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":" In trunk deleting scenario, VM that the port is bound will be checked"},{"line_number":20,"context_line":" and trunk can be deleted if the VM is no longer exist."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":" Closes-Bug: #1938972"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"370e8584_0bdb3944","line":20,"range":{"start_line":20,"start_character":49,"end_line":20,"end_character":54},"updated":"2021-09-17 05:38:11.000000000","message":"existed？","commit_id":"3e8b66b5b2448731f64fca738eaed7cad74ceb1d"}],"neutron/notifiers/nova.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"91d0fcd631a5cdaea8e8e87ab276e372ad54850f","unresolved":true,"context_lines":[{"line_number":291,"context_line":"                LOG.error(\"Error response returned from nova: %s\","},{"line_number":292,"context_line":"                          response)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def bound_with_nonexistent_server(self, port):"},{"line_number":295,"context_line":"        \"\"\"Return true only if port is bound with a nonexistent server\"\"\""},{"line_number":296,"context_line":"        if not self._is_compute_port(port):"},{"line_number":297,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffa8a0fd_f5af9a4b","line":294,"range":{"start_line":294,"start_character":4,"end_line":294,"end_character":37},"updated":"2021-09-15 07:53:32.000000000","message":"This kind of contradicts with class name, as it\u0027s not notifying but requesting info from nova.","commit_id":"6ad79c1b75d528bcaafeae6ab68ee4297d4e803c"},{"author":{"_account_id":33145,"name":"Kevin Li","email":"liwenhai3@huawei.com","username":"liwenhai"},"change_message_id":"305fd2bd9064c6ab7f348146cb51ee05a62e7da2","unresolved":true,"context_lines":[{"line_number":291,"context_line":"                LOG.error(\"Error response returned from nova: %s\","},{"line_number":292,"context_line":"                          response)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def bound_with_nonexistent_server(self, port):"},{"line_number":295,"context_line":"        \"\"\"Return true only if port is bound with a nonexistent server\"\"\""},{"line_number":296,"context_line":"        if not self._is_compute_port(port):"},{"line_number":297,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"62f6266e_980ae362","line":294,"range":{"start_line":294,"start_character":4,"end_line":294,"end_character":37},"in_reply_to":"ffa8a0fd_f5af9a4b","updated":"2021-09-16 03:29:45.000000000","message":"function is renamed","commit_id":"6ad79c1b75d528bcaafeae6ab68ee4297d4e803c"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"91d0fcd631a5cdaea8e8e87ab276e372ad54850f","unresolved":true,"context_lines":[{"line_number":300,"context_line":"        LOG.debug(\"Get server %s status\", server_uuid)"},{"line_number":301,"context_line":"        novaclient \u003d self._get_nova_client()"},{"line_number":302,"context_line":"        try:"},{"line_number":303,"context_line":"            novaclient.servers.get(server_uuid)"},{"line_number":304,"context_line":"        except nova_exceptions.NotFound:"},{"line_number":305,"context_line":"            LOG.warning(\u0027Nova returned not found for %s\u0027, server_uuid)"},{"line_number":306,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"a23a661a_26d66b9f","line":303,"range":{"start_line":303,"start_character":12,"end_line":303,"end_character":47},"updated":"2021-09-15 07:53:32.000000000","message":"will it always have rights to get all servers?","commit_id":"6ad79c1b75d528bcaafeae6ab68ee4297d4e803c"},{"author":{"_account_id":33145,"name":"Kevin Li","email":"liwenhai3@huawei.com","username":"liwenhai"},"change_message_id":"305fd2bd9064c6ab7f348146cb51ee05a62e7da2","unresolved":true,"context_lines":[{"line_number":300,"context_line":"        LOG.debug(\"Get server %s status\", server_uuid)"},{"line_number":301,"context_line":"        novaclient \u003d self._get_nova_client()"},{"line_number":302,"context_line":"        try:"},{"line_number":303,"context_line":"            novaclient.servers.get(server_uuid)"},{"line_number":304,"context_line":"        except nova_exceptions.NotFound:"},{"line_number":305,"context_line":"            LOG.warning(\u0027Nova returned not found for %s\u0027, server_uuid)"},{"line_number":306,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"2077e061_ea36de62","line":303,"range":{"start_line":303,"start_character":12,"end_line":303,"end_character":47},"in_reply_to":"a23a661a_26d66b9f","updated":"2021-09-16 03:29:45.000000000","message":"It works with account configured in [nova] section. And it get the right to retrieve server informaitons.","commit_id":"6ad79c1b75d528bcaafeae6ab68ee4297d4e803c"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eba43d42b6a88f21e46db33efbf4248a69dc46b7","unresolved":true,"context_lines":[{"line_number":291,"context_line":"                LOG.error(\"Error response returned from nova: %s\","},{"line_number":292,"context_line":"                          response)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def is_port_bound_with_nonexistent_server(self, port):"},{"line_number":295,"context_line":"        \"\"\"Return true only if port is bound with a nonexistent server\"\"\""},{"line_number":296,"context_line":"        if not self._is_compute_port(port):"},{"line_number":297,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"aebb60bf_8f534b0d","line":294,"range":{"start_line":294,"start_character":8,"end_line":294,"end_character":45},"updated":"2021-09-17 05:38:11.000000000","message":"This function looks like a helper which has nothing to do with the Nova notifaction. IMO, the only reason you put it here is because you want to use that \"_is_compute_port\" and \"_get_nova_client\" function. So, IMO, you can move these function out. And put this helper function to the trunk related file only.","commit_id":"3e8b66b5b2448731f64fca738eaed7cad74ceb1d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eba43d42b6a88f21e46db33efbf4248a69dc46b7","unresolved":true,"context_lines":[{"line_number":292,"context_line":"                          response)"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def is_port_bound_with_nonexistent_server(self, port):"},{"line_number":295,"context_line":"        \"\"\"Return true only if port is bound with a nonexistent server\"\"\""},{"line_number":296,"context_line":"        if not self._is_compute_port(port):"},{"line_number":297,"context_line":"            return False"},{"line_number":298,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"8fc57b8c_41609381","line":295,"range":{"start_line":295,"start_character":8,"end_line":295,"end_character":73},"updated":"2021-09-17 05:38:11.000000000","message":"IMO, the function name is enough.","commit_id":"3e8b66b5b2448731f64fca738eaed7cad74ceb1d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eba43d42b6a88f21e46db33efbf4248a69dc46b7","unresolved":true,"context_lines":[{"line_number":297,"context_line":"            return False"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        server_uuid \u003d port[\u0027device_id\u0027]"},{"line_number":300,"context_line":"        LOG.debug(\"Get server %s status\", server_uuid)"},{"line_number":301,"context_line":"        novaclient \u003d self._get_nova_client()"},{"line_number":302,"context_line":"        try:"},{"line_number":303,"context_line":"            novaclient.servers.get(server_uuid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3d245e32_98797868","line":300,"range":{"start_line":300,"start_character":8,"end_line":300,"end_character":54},"updated":"2021-09-17 05:38:11.000000000","message":"This should be set to line 302 near the real call of servers.get().","commit_id":"3e8b66b5b2448731f64fca738eaed7cad74ceb1d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eba43d42b6a88f21e46db33efbf4248a69dc46b7","unresolved":true,"context_lines":[{"line_number":300,"context_line":"        LOG.debug(\"Get server %s status\", server_uuid)"},{"line_number":301,"context_line":"        novaclient \u003d self._get_nova_client()"},{"line_number":302,"context_line":"        try:"},{"line_number":303,"context_line":"            novaclient.servers.get(server_uuid)"},{"line_number":304,"context_line":"        except nova_exceptions.NotFound:"},{"line_number":305,"context_line":"            LOG.warning(\u0027Nova returned not found for %s\u0027, server_uuid)"},{"line_number":306,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"adda6a73_9c653188","line":303,"range":{"start_line":303,"start_character":12,"end_line":303,"end_character":47},"updated":"2021-09-17 05:38:11.000000000","message":"Can race condtion happen between this check here and nova is doing VM deleting? This line is just fine, the VM is in nova DB. But after this, nova deletes the VM. Things will get better?","commit_id":"3e8b66b5b2448731f64fca738eaed7cad74ceb1d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eba43d42b6a88f21e46db33efbf4248a69dc46b7","unresolved":true,"context_lines":[{"line_number":307,"context_line":"        except Exception:"},{"line_number":308,"context_line":"            LOG.error(\u0027Failed to get server %s from nova\u0027, server_uuid)"},{"line_number":309,"context_line":"        else:"},{"line_number":310,"context_line":"            LOG.info(\u0027Port is bound with %s\u0027, server_uuid)"},{"line_number":311,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"997097ab_91b1abc5","line":310,"range":{"start_line":310,"start_character":16,"end_line":310,"end_character":20},"updated":"2021-09-17 05:38:11.000000000","message":"This can also be an debug log.","commit_id":"3e8b66b5b2448731f64fca738eaed7cad74ceb1d"}],"neutron/services/trunk/plugin.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eba43d42b6a88f21e46db33efbf4248a69dc46b7","unresolved":true,"context_lines":[{"line_number":293,"context_line":"            trunk \u003d self._get_trunk(context, trunk_id)"},{"line_number":294,"context_line":"            rules.trunk_can_be_managed(context, trunk)"},{"line_number":295,"context_line":"            trunk_port_validator \u003d rules.TrunkPortValidator(trunk.port_id)"},{"line_number":296,"context_line":"            if trunk_port_validator.can_be_trunked_or_untrunked(context) or \\"},{"line_number":297,"context_line":"                    trunk_port_validator.is_invalid_compute_port(context):"},{"line_number":298,"context_line":"                # NOTE(status_police): when a trunk is deleted, the logical"},{"line_number":299,"context_line":"                # object disappears from the datastore, therefore there is no"}],"source_content_type":"text/x-python","patch_set":4,"id":"2209db8a_7ca40ac3","line":296,"range":{"start_line":296,"start_character":76,"end_line":296,"end_character":77},"updated":"2021-09-17 05:38:11.000000000","message":"backslash is not recommended to used. Please use brackets. Something like this:\n\nif (trunk_port_validator.can_be_trunked_or_untrunked(context) or\n        trunk_port_validator.is_invalid_compute_port(context)):","commit_id":"3e8b66b5b2448731f64fca738eaed7cad74ceb1d"}],"neutron/services/trunk/rules.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eba43d42b6a88f21e46db33efbf4248a69dc46b7","unresolved":true,"context_lines":[{"line_number":154,"context_line":"        if not self._port:"},{"line_number":155,"context_line":"            core_plugin \u003d directory.get_plugin()"},{"line_number":156,"context_line":"            self._port \u003d core_plugin.get_port(context, self.port_id)"},{"line_number":157,"context_line":"        return nova.Notifier().is_port_bound_with_nonexistent_server("},{"line_number":158,"context_line":"            self._port)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ad1ffa2f_1f626a81","line":157,"range":{"start_line":157,"start_character":15,"end_line":157,"end_character":30},"updated":"2021-09-17 05:38:11.000000000","message":"Can that singleton call of get_instance() be called to avoid new instance everytime here?","commit_id":"3e8b66b5b2448731f64fca738eaed7cad74ceb1d"}],"neutron/tests/unit/notifiers/test_nova.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"eba43d42b6a88f21e46db33efbf4248a69dc46b7","unresolved":true,"context_lines":[{"line_number":184,"context_line":"    def test_delete_floatingip_deleted_port_no_notify(self):"},{"line_number":185,"context_line":"        port_id \u003d \u0027bee50827-bcee-4cc8-91c1-a27b0ce54222\u0027"},{"line_number":186,"context_line":"        with mock.patch.object("},{"line_number":187,"context_line":"                directory.get_plugin(), \u0027get_port\u0027,"},{"line_number":188,"context_line":"                side_effect\u003dn_exc.PortNotFound(port_id\u003dport_id)):"},{"line_number":189,"context_line":"            returned_obj \u003d {\u0027floatingip\u0027:"},{"line_number":190,"context_line":"                            {\u0027port_id\u0027: port_id}}"}],"source_content_type":"text/x-python","patch_set":4,"id":"29d5f952_81294111","line":187,"updated":"2021-09-17 05:38:11.000000000","message":"Nothing changed here.","commit_id":"3e8b66b5b2448731f64fca738eaed7cad74ceb1d"}]}
