)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7770,"name":"Abhishek Chanda","email":"abhishek.becs@gmail.com","username":"abhishek"},"change_message_id":"a9871c48675df12cac90e5acd595d3fe9cf38696","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2013-12-14 21:18:31 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Nova Docker driver must remove network namespace"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I6fa306d06fb16f8ceddb06e22566974237082759"},{"line_number":10,"context_line":"Closes-Bug: 1261007"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAATn%2F9LtA%3D","line":8,"updated":"2013-12-15 12:33:59.000000000","message":"The commit message should be better\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"101c5e97a9ae19150557755bb80f3754c50a72e9"}],"nova/tests/virt/docker/test_driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"96b4325de3e3a59408f1a23076d0b527f88135e5","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        def fake_teardown_network(self, container_id):"},{"line_number":60,"context_line":"            return"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        self.stubs.Set(nova.virt.docker.driver.DockerDriver,"},{"line_number":63,"context_line":"                       \u0027_teardown_network\u0027,"},{"line_number":64,"context_line":"                       fake_teardown_network)"},{"line_number":65,"context_line":"        self.context \u003d context.RequestContext(\u0027fake_user\u0027, \u0027fake_project\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F%2FsM0%3D","line":62,"updated":"2014-01-09 15:30:11.000000000","message":"Use mock, stubs are just mox.  If you want this applied to all tests, you can decorate the class with it.","commit_id":"73b37bff837adfd0ebbfa592e72203b9887bfe31"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"96b4325de3e3a59408f1a23076d0b527f88135e5","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            fake_find_container_by_name)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        self.stubs.Set(nova.virt.docker.driver.DockerDriver,"},{"line_number":178,"context_line":"                       \u0027_teardown_network\u0027,"},{"line_number":179,"context_line":"                       lambda s, container_id:"},{"line_number":180,"context_line":"                            self.assertEqual(container_id, \"fake_id\"))"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F%2FsLs%3D","line":178,"updated":"2014-01-09 15:30:11.000000000","message":"First, use mock now.\n\nSecond, you\u0027re just asserting that container_id is passed to _teardown_network, but not testing at all what _teardown_network does, i.e. you\u0027re not testing that ProcessExecutionError flow at all.  You need test coverage for that.  You can mock out the subprocess execution, but the logic in that method needs testing.","commit_id":"73b37bff837adfd0ebbfa592e72203b9887bfe31"}],"nova/virt/docker/driver.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"cbc17781d846fcb072dfe2122c402a4c5301e428","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        try:"},{"line_number":328,"context_line":"            utils.execute(\u0027ip\u0027, \u0027netns\u0027, \u0027delete\u0027, container_id,"},{"line_number":329,"context_line":"                run_as_root\u003dTrue)"},{"line_number":330,"context_line":"        except Exception:"},{"line_number":331,"context_line":"            LOG.error(\u0027Cannot remove network namespace, netns id: {0}\u0027"},{"line_number":332,"context_line":"                .format(container_id))"},{"line_number":333,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F9LnA%3D","line":330,"updated":"2013-12-15 14:40:44.000000000","message":"please use except processutils.ProcessExecutionError the Exception here may be too braad","commit_id":"bac75acf4f51291092aa2d349f7f62058eb0b047"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"cbc17781d846fcb072dfe2122c402a4c5301e428","unresolved":false,"context_lines":[{"line_number":328,"context_line":"            utils.execute(\u0027ip\u0027, \u0027netns\u0027, \u0027delete\u0027, container_id,"},{"line_number":329,"context_line":"                run_as_root\u003dTrue)"},{"line_number":330,"context_line":"        except Exception:"},{"line_number":331,"context_line":"            LOG.error(\u0027Cannot remove network namespace, netns id: {0}\u0027"},{"line_number":332,"context_line":"                .format(container_id))"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    def reboot(self, context, instance, network_info, reboot_type,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F9LnY%3D","line":331,"updated":"2013-12-15 14:40:44.000000000","message":"please use the i18n format:\n LOG.error(_(\u0027Cannot remove network namespa...)","commit_id":"bac75acf4f51291092aa2d349f7f62058eb0b047"},{"author":{"_account_id":8641,"name":"DennyZhang","email":"filebat.mark@gmail.com","username":"dennyzhang"},"change_message_id":"a28b4e5630c6c6c90f77b60d28912be533338b9e","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            utils.execute(\u0027ip\u0027, \u0027netns\u0027, \u0027delete\u0027, container_id,"},{"line_number":330,"context_line":"                run_as_root\u003dTrue)"},{"line_number":331,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":332,"context_line":"            LOG.error(_(\u0027Cannot remove network namespace, netns id: %s\u0027),"},{"line_number":333,"context_line":"                      container_id)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def reboot(self, context, instance, network_info, reboot_type,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATn%2F8tZU%3D","line":332,"updated":"2013-12-22 03:08:03.000000000","message":"If the linux network namespace doesn\u0027t exist, we may not log error, if the removal fail.","commit_id":"d1a6c93837ea5b8b5fcf52357fd9ce2ecbe20621"},{"author":{"_account_id":9173,"name":"Daniel Kuffner","email":"daniel.kuffner@gmail.com","username":"dkuffner"},"change_message_id":"aae78358780a9db4756b80c40e6b5e9496abb964","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            utils.execute(\u0027ip\u0027, \u0027netns\u0027, \u0027delete\u0027, container_id,"},{"line_number":330,"context_line":"                run_as_root\u003dTrue)"},{"line_number":331,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":332,"context_line":"            LOG.error(_(\u0027Cannot remove network namespace, netns id: %s\u0027),"},{"line_number":333,"context_line":"                      container_id)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def reboot(self, context, instance, network_info, reboot_type,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATn%2F8tLk%3D","line":332,"in_reply_to":"AAAATn%2F8tMI%3D","updated":"2013-12-22 09:06:00.000000000","message":"yes, neutron does a lookup before deleting. \nI still think it is a race condition but the chance is minimal.\n\nhttps://github.com/openstack/neutron/blob/master/neutron/agent/linux/ip_lib.py#L146\n\nthanks.","commit_id":"d1a6c93837ea5b8b5fcf52357fd9ce2ecbe20621"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"61d1a2df1ab0fb1b02e3524f4ae019cca717a770","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            utils.execute(\u0027ip\u0027, \u0027netns\u0027, \u0027delete\u0027, container_id,"},{"line_number":330,"context_line":"                run_as_root\u003dTrue)"},{"line_number":331,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":332,"context_line":"            LOG.error(_(\u0027Cannot remove network namespace, netns id: %s\u0027),"},{"line_number":333,"context_line":"                      container_id)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def reboot(self, context, instance, network_info, reboot_type,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATn%2F8tMI%3D","line":332,"in_reply_to":"AAAATn%2F8tMU%3D","updated":"2013-12-22 08:54:26.000000000","message":"please look at the neutron treatment of this - you may be able to do the exists implementation - https://github.com/openstack/neutron/blob/master/neutron/agent/linux/ip_lib.py#L443","commit_id":"d1a6c93837ea5b8b5fcf52357fd9ce2ecbe20621"},{"author":{"_account_id":9173,"name":"Daniel Kuffner","email":"daniel.kuffner@gmail.com","username":"dkuffner"},"change_message_id":"23f5e6715110d22d06b264398203ac286933a4eb","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            utils.execute(\u0027ip\u0027, \u0027netns\u0027, \u0027delete\u0027, container_id,"},{"line_number":330,"context_line":"                run_as_root\u003dTrue)"},{"line_number":331,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":332,"context_line":"            LOG.error(_(\u0027Cannot remove network namespace, netns id: %s\u0027),"},{"line_number":333,"context_line":"                      container_id)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def reboot(self, context, instance, network_info, reboot_type,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATn%2F8tMU%3D","line":332,"in_reply_to":"AAAATn%2F8tZU%3D","updated":"2013-12-22 08:42:48.000000000","message":"Any suggestion how to differentiate between the case of the network cannot be removed and network doesn\u0027t exist anymore.\n\nI could try to find the network namespace in the except block and only print an error if it still present. \n\nAnother solution would be to try to find the network namespace before I try to delete it, but that could be race condition.\n\nthanks for you feedback","commit_id":"d1a6c93837ea5b8b5fcf52357fd9ce2ecbe20621"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"96b4325de3e3a59408f1a23076d0b527f88135e5","unresolved":false,"context_lines":[{"line_number":322,"context_line":"    def _teardown_network(self, container_id):"},{"line_number":323,"context_line":"        try:"},{"line_number":324,"context_line":"            output, err \u003d utils.execute(\u0027ip\u0027, \u0027-o\u0027, \u0027netns\u0027, \u0027list\u0027)"},{"line_number":325,"context_line":"            for line in output.split(\u0027\\n\u0027):"},{"line_number":326,"context_line":"                if container_id \u003d\u003d line.strip():"},{"line_number":327,"context_line":"                    utils.execute(\u0027ip\u0027, \u0027netns\u0027, \u0027delete\u0027, container_id,"},{"line_number":328,"context_line":"                        run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F%2FsNQ%3D","line":325,"updated":"2014-01-09 15:30:11.000000000","message":"Couldn\u0027t you just do if container_id in output?  Is there some other case that you have to avoid which requires parsing each line?","commit_id":"73b37bff837adfd0ebbfa592e72203b9887bfe31"},{"author":{"_account_id":9173,"name":"Daniel Kuffner","email":"daniel.kuffner@gmail.com","username":"dkuffner"},"change_message_id":"0770c93eabfa4d0b0868fbdb688704b62f730f7a","unresolved":false,"context_lines":[{"line_number":322,"context_line":"    def _teardown_network(self, container_id):"},{"line_number":323,"context_line":"        try:"},{"line_number":324,"context_line":"            output, err \u003d utils.execute(\u0027ip\u0027, \u0027-o\u0027, \u0027netns\u0027, \u0027list\u0027)"},{"line_number":325,"context_line":"            for line in output.split(\u0027\\n\u0027):"},{"line_number":326,"context_line":"                if container_id \u003d\u003d line.strip():"},{"line_number":327,"context_line":"                    utils.execute(\u0027ip\u0027, \u0027netns\u0027, \u0027delete\u0027, container_id,"},{"line_number":328,"context_line":"                        run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F%2FsG8%3D","line":325,"in_reply_to":"AAAAUH%2F%2FsNQ%3D","updated":"2014-01-09 15:43:40.000000000","message":"I will try that out","commit_id":"73b37bff837adfd0ebbfa592e72203b9887bfe31"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"96b4325de3e3a59408f1a23076d0b527f88135e5","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                        run_as_root\u003dTrue)"},{"line_number":329,"context_line":"                    break"},{"line_number":330,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":331,"context_line":"            LOG.error(_(\u0027Cannot remove network namespace, netns id: %s\u0027),"},{"line_number":332,"context_line":"                      container_id)"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    def reboot(self, context, instance, network_info, reboot_type,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F%2FsOM%3D","line":331,"updated":"2014-01-09 15:30:11.000000000","message":"Hmm, is error the right level here?  Theoretically this means a sysadmin should be called in the middle of the night to fix this.  Is warning better?  Is there something that should be put into the message for what the user should do/try for resolving this or manually cleaning it up?","commit_id":"73b37bff837adfd0ebbfa592e72203b9887bfe31"},{"author":{"_account_id":9173,"name":"Daniel Kuffner","email":"daniel.kuffner@gmail.com","username":"dkuffner"},"change_message_id":"0770c93eabfa4d0b0868fbdb688704b62f730f7a","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                        run_as_root\u003dTrue)"},{"line_number":329,"context_line":"                    break"},{"line_number":330,"context_line":"        except processutils.ProcessExecutionError:"},{"line_number":331,"context_line":"            LOG.error(_(\u0027Cannot remove network namespace, netns id: %s\u0027),"},{"line_number":332,"context_line":"                      container_id)"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    def reboot(self, context, instance, network_info, reboot_type,"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F%2FsHE%3D","line":331,"in_reply_to":"AAAAUH%2F%2FsOM%3D","updated":"2014-01-09 15:43:40.000000000","message":"Warning is fine with me, it is a potential resource leak but not a disaster. \n\nThe message contains the netns id which can be used by the administrator to make investigations. For me is this error more theoretical nature since I never had a problem to remove a namespace.","commit_id":"73b37bff837adfd0ebbfa592e72203b9887bfe31"}]}
