)]}'
{"nova/network/base_api.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"a19b5ceaed8a8985a792445b257cad81e33c0601","unresolved":false,"context_lines":[{"line_number":34,"context_line":"def update_instance_cache_with_nw_info(impl, context, instance,"},{"line_number":35,"context_line":"                                       nw_info\u003dNone, update_cells\u003dTrue):"},{"line_number":36,"context_line":"    try:"},{"line_number":37,"context_line":"        if instance.deleted:"},{"line_number":38,"context_line":"            LOG.info(_LI(\u0027instance is deleted, no further info case update\u0027),"},{"line_number":39,"context_line":"                     instance\u003dinstance)"},{"line_number":40,"context_line":"            return"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        if not isinstance(nw_info, network_model.NetworkInfo):"},{"line_number":43,"context_line":"            nw_info \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_b31d9268","line":40,"range":{"start_line":37,"start_character":0,"end_line":40,"end_character":18},"updated":"2016-11-22 12:44:40.000000000","message":"This block should be out of try-except block for simple code.","commit_id":"ef3c738be7840a0c01e217e267bc28c2593905d1"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"b18f4b3718d5c19387d230c0a55ba4ec22448d42","unresolved":false,"context_lines":[{"line_number":34,"context_line":"def update_instance_cache_with_nw_info(impl, context, instance,"},{"line_number":35,"context_line":"                                       nw_info\u003dNone, update_cells\u003dTrue):"},{"line_number":36,"context_line":"    try:"},{"line_number":37,"context_line":"        if instance.deleted:"},{"line_number":38,"context_line":"            LOG.info(_LI(\u0027instance is deleted, no further info case update\u0027),"},{"line_number":39,"context_line":"                     instance\u003dinstance)"},{"line_number":40,"context_line":"            return"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        if not isinstance(nw_info, network_model.NetworkInfo):"},{"line_number":43,"context_line":"            nw_info \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_19e9041b","line":40,"range":{"start_line":37,"start_character":0,"end_line":40,"end_character":18},"in_reply_to":"7a77a97e_b31d9268","updated":"2016-11-22 14:07:11.000000000","message":"Done","commit_id":"ef3c738be7840a0c01e217e267bc28c2593905d1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2a67fd7d37b45546c90b0482eb79ec497c9468d3","unresolved":false,"context_lines":[{"line_number":34,"context_line":"def update_instance_cache_with_nw_info(impl, context, instance,"},{"line_number":35,"context_line":"                                       nw_info\u003dNone, update_cells\u003dTrue):"},{"line_number":36,"context_line":"    if instance.deleted:"},{"line_number":37,"context_line":"        LOG.info(_LI(\u0027instance is deleted, no further info case update\u0027),"},{"line_number":38,"context_line":"                 instance\u003dinstance)"},{"line_number":39,"context_line":"        return"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_95715047","line":38,"range":{"start_line":37,"start_character":0,"end_line":38,"end_character":35},"updated":"2016-11-22 15:57:34.000000000","message":"Is this significant enough to be an \u0027info\u0027. \u0027debug\u0027 seems more appropriate","commit_id":"b136dafb4b2ef7a0e29a26d4ed5a1e1ac9ff220c"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"dc2bed20ca5047357eff8a97e37d8aa223080b67","unresolved":false,"context_lines":[{"line_number":34,"context_line":"def update_instance_cache_with_nw_info(impl, context, instance,"},{"line_number":35,"context_line":"                                       nw_info\u003dNone, update_cells\u003dTrue):"},{"line_number":36,"context_line":"    if instance.deleted:"},{"line_number":37,"context_line":"        LOG.info(_LI(\u0027instance is deleted, no further info case update\u0027),"},{"line_number":38,"context_line":"                 instance\u003dinstance)"},{"line_number":39,"context_line":"        return"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_69f4d8ce","line":38,"range":{"start_line":37,"start_character":0,"end_line":38,"end_character":35},"in_reply_to":"7a77a97e_168383cd","updated":"2016-11-22 18:04:22.000000000","message":"ok, goot catch, will update it","commit_id":"b136dafb4b2ef7a0e29a26d4ed5a1e1ac9ff220c"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"e09bf73b159d05fc536324bcd0dae902f87a958f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"def update_instance_cache_with_nw_info(impl, context, instance,"},{"line_number":35,"context_line":"                                       nw_info\u003dNone, update_cells\u003dTrue):"},{"line_number":36,"context_line":"    if instance.deleted:"},{"line_number":37,"context_line":"        LOG.info(_LI(\u0027instance is deleted, no further info case update\u0027),"},{"line_number":38,"context_line":"                 instance\u003dinstance)"},{"line_number":39,"context_line":"        return"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_168383cd","line":38,"range":{"start_line":37,"start_character":0,"end_line":38,"end_character":35},"in_reply_to":"7a77a97e_95715047","updated":"2016-11-22 17:53:46.000000000","message":"+1 for debug level because this seems normal thing and it is not necessary to fulfill a log file with this message.","commit_id":"b136dafb4b2ef7a0e29a26d4ed5a1e1ac9ff220c"},{"author":{"_account_id":18339,"name":"Sivasathurappan Radhakrishnan","email":"siva.radhakrishnan@intel.com","username":"sivakrishnan"},"change_message_id":"e16a279b25c24d3cb24e70e4de20e1dcc126573b","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from nova.db import base"},{"line_number":24,"context_line":"from nova import hooks"},{"line_number":25,"context_line":"from nova.i18n import _, _LE, _LI"},{"line_number":26,"context_line":"from nova.network import model as network_model"},{"line_number":27,"context_line":"from nova import objects"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a77a97e_ec65561d","line":25,"updated":"2016-11-22 18:42:52.000000000","message":"nit: import of _LI can be remove if not being used.","commit_id":"602ef6013555bcb82efc6fd80c365b2962d38c00"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"4977c230acb3ca4b660e07e2a5ea3b61d6b30a48","unresolved":false,"context_lines":[{"line_number":33,"context_line":"@hooks.add_hook(\u0027instance_network_info\u0027)"},{"line_number":34,"context_line":"def update_instance_cache_with_nw_info(impl, context, instance,"},{"line_number":35,"context_line":"                                       nw_info\u003dNone, update_cells\u003dTrue):"},{"line_number":36,"context_line":"    if instance.deleted:"},{"line_number":37,"context_line":"        LOG.debug(\u0027instance is deleted, no further info cache update\u0027,"},{"line_number":38,"context_line":"                  instance\u003dinstance)"},{"line_number":39,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_91e4390e","line":36,"updated":"2016-11-23 13:50:07.000000000","message":"I think I prefer your fix because you avoid calling something which we know that is going to fail but in the other side, are we sure on that this error can only comes from here ? I mean we call instance.info_cache.refresh in several other places.\n\nCan\u0027t you fix it in compute/utils.py refresh_info_cache_for_instance ?","commit_id":"602ef6013555bcb82efc6fd80c365b2962d38c00"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d4215a32d84260791bc9dbb012462a1116f9f1c0","unresolved":false,"context_lines":[{"line_number":33,"context_line":"@hooks.add_hook(\u0027instance_network_info\u0027)"},{"line_number":34,"context_line":"def update_instance_cache_with_nw_info(impl, context, instance,"},{"line_number":35,"context_line":"                                       nw_info\u003dNone, update_cells\u003dTrue):"},{"line_number":36,"context_line":"    if instance.deleted:"},{"line_number":37,"context_line":"        LOG.debug(\u0027instance is deleted, no further info cache update\u0027,"},{"line_number":38,"context_line":"                  instance\u003dinstance)"},{"line_number":39,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_db368751","line":36,"in_reply_to":"5a74a57a_1097fe48","updated":"2016-11-24 20:28:51.000000000","message":"seems the error here (from bug) is the instance is deleted when compute node not started up, so API layer deleted it and mark it \u0027deleted\u0027 then when compute service start\nit reported some problem\n\nso I think we don\u0027t need consider other situations , as even if the instance deleted (when compute service already start) ,we still can handle it","commit_id":"602ef6013555bcb82efc6fd80c365b2962d38c00"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"4e2553ebaadd6a6abc45818bfce820ab49d82175","unresolved":false,"context_lines":[{"line_number":33,"context_line":"@hooks.add_hook(\u0027instance_network_info\u0027)"},{"line_number":34,"context_line":"def update_instance_cache_with_nw_info(impl, context, instance,"},{"line_number":35,"context_line":"                                       nw_info\u003dNone, update_cells\u003dTrue):"},{"line_number":36,"context_line":"    if instance.deleted:"},{"line_number":37,"context_line":"        LOG.debug(\u0027instance is deleted, no further info cache update\u0027,"},{"line_number":38,"context_line":"                  instance\u003dinstance)"},{"line_number":39,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_1097fe48","line":36,"in_reply_to":"5a74a57a_91e4390e","updated":"2016-11-24 19:20:30.000000000","message":"ok, I only pay attention to the bug itself, but not consider it in a whole, will give a thought and update patch accordingly, thanks~","commit_id":"602ef6013555bcb82efc6fd80c365b2962d38c00"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"b5283a9d72ca18de8bed34c3497de37933bc9f06","unresolved":false,"context_lines":[{"line_number":34,"context_line":"def update_instance_cache_with_nw_info(impl, context, instance,"},{"line_number":35,"context_line":"                                       nw_info\u003dNone, update_cells\u003dTrue):"},{"line_number":36,"context_line":"    if instance.deleted:"},{"line_number":37,"context_line":"        LOG.debug(\u0027instance is deleted, no further info cache update\u0027,"},{"line_number":38,"context_line":"                  instance\u003dinstance)"},{"line_number":39,"context_line":"        return"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_3e41863a","line":37,"range":{"start_line":37,"start_character":19,"end_line":37,"end_character":20},"updated":"2016-12-01 10:28:30.000000000","message":"Should be uppercased i.","commit_id":"319d74d71026c78a48df12d3a1daa3eff536d33d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c5258da6d11a1d264b213844b92ff284695112a1","unresolved":false,"context_lines":[{"line_number":33,"context_line":"@hooks.add_hook(\u0027instance_network_info\u0027)"},{"line_number":34,"context_line":"def update_instance_cache_with_nw_info(impl, context, instance,"},{"line_number":35,"context_line":"                                       nw_info\u003dNone, update_cells\u003dTrue):"},{"line_number":36,"context_line":"    if instance.deleted:"},{"line_number":37,"context_line":"        LOG.debug(\u0027Instance is deleted, no further info cache update\u0027,"},{"line_number":38,"context_line":"                  instance\u003dinstance)"},{"line_number":39,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a71b18c_ebd62026","line":36,"updated":"2016-12-02 15:35:16.000000000","message":"I worry about this value being stale. Plus this other change handles the problem globally:\n\nhttps://review.openstack.org/#/c/398308/\n\nSo I prefer that we go with ^ for this fix.","commit_id":"c4236afdab11afd0bec209dfd62021b36696e9a5"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"63c172483b0766644b8ddee70e69ad46163490ec","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        # from the DB first."},{"line_number":53,"context_line":"        ic \u003d objects.InstanceInfoCache.new(context, instance.uuid)"},{"line_number":54,"context_line":"        ic.network_info \u003d nw_info"},{"line_number":55,"context_line":"        ic.save(update_cells\u003dupdate_cells)"},{"line_number":56,"context_line":"    except Exception:"},{"line_number":57,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":58,"context_line":"            LOG.exception(_LE(\u0027Failed storing info cache\u0027), instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a71b18c_3e623bd9","line":55,"updated":"2016-12-08 10:40:14.000000000","message":"after another look I don\u0027t think https://review.openstack.org/#/c/398308 addressed this issue\n\nthe root caues of this bug is this line\nic.save will raise exception and I think it\u0027s not from \nrefresh_info_cache_for_instance funciton","commit_id":"c4236afdab11afd0bec209dfd62021b36696e9a5"}],"nova/tests/unit/network/test_api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6bd4706c8defd13105a015f708ad98efa08f4b2e","unresolved":false,"context_lines":[{"line_number":582,"context_line":""},{"line_number":583,"context_line":"    def test_update_nw_info_none_instance_deleted(self, db_mock, api_mock):"},{"line_number":584,"context_line":"        instance \u003d objects.Instance(uuid\u003dFAKE_UUID, deleted\u003dTrue)"},{"line_number":585,"context_line":"        api_mock._get_instance_nw_info.return_value \u003d self.nw_info"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"        base_api.update_instance_cache_with_nw_info(api_mock, self.context,"},{"line_number":588,"context_line":"                                           instance, None)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f436f4f_159f2251","line":585,"range":{"start_line":585,"start_character":8,"end_line":585,"end_character":66},"updated":"2017-08-08 15:24:34.000000000","message":"Why do we need this? This is confusing with the self.assertFalse(api_mock.called) below.","commit_id":"db8e647c82138525f2d6ba0dd5c62c086e139c75"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6bd4706c8defd13105a015f708ad98efa08f4b2e","unresolved":false,"context_lines":[{"line_number":585,"context_line":"        api_mock._get_instance_nw_info.return_value \u003d self.nw_info"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"        base_api.update_instance_cache_with_nw_info(api_mock, self.context,"},{"line_number":588,"context_line":"                                           instance, None)"},{"line_number":589,"context_line":"        self.assertFalse(api_mock.called)"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    def test_update_nw_info_one_network(self, db_mock, api_mock):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f436f4f_559daa57","line":588,"range":{"start_line":588,"start_character":53,"end_line":588,"end_character":57},"updated":"2017-08-08 15:24:34.000000000","message":"nit: using a kwarg here would be nice, or just omit this.","commit_id":"db8e647c82138525f2d6ba0dd5c62c086e139c75"}]}
