)]}'
{"cinder/brick/local_dev/lvm.py":[{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"f45c0b4059c4fdceca9d0de4ebcfb47b30d50a68","unresolved":false,"context_lines":[{"line_number":617,"context_line":"                if timeutils.delta_seconds(starttime,"},{"line_number":618,"context_line":"                                           timeutils.utcnow()) \u003e timeout:"},{"line_number":619,"context_line":"                    raise exception.LogicalVolumeDeactivationTimeout(name\u003dname)"},{"line_number":620,"context_line":"                time.sleep(1)"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def activate_lv(self, name, is_snapshot\u003dFalse, permanent\u003dFalse):"},{"line_number":623,"context_line":"        \"\"\"Ensure that logical volume/snapshot logical volume is activated."}],"source_content_type":"text/x-python","patch_set":5,"id":"1aa78d24_0003aabf","line":620,"range":{"start_line":620,"start_character":16,"end_line":620,"end_character":20},"updated":"2016-07-13 23:23:03.000000000","message":"This depends on number of snapshots on target volume but  1sec is little bit longer, IMHO. Can we change this to 0.5sec?","commit_id":"ca2af88ca7d893179eb7fb25e43008e829b17d26"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"7767ae24524baec8eec57ff74be35c893994d5fa","unresolved":false,"context_lines":[{"line_number":617,"context_line":"                if timeutils.delta_seconds(starttime,"},{"line_number":618,"context_line":"                                           timeutils.utcnow()) \u003e timeout:"},{"line_number":619,"context_line":"                    raise exception.LogicalVolumeDeactivationTimeout(name\u003dname)"},{"line_number":620,"context_line":"                time.sleep(1)"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def activate_lv(self, name, is_snapshot\u003dFalse, permanent\u003dFalse):"},{"line_number":623,"context_line":"        \"\"\"Ensure that logical volume/snapshot logical volume is activated."}],"source_content_type":"text/x-python","patch_set":5,"id":"1aa78d24_8052fa66","line":620,"range":{"start_line":620,"start_character":16,"end_line":620,"end_character":20},"in_reply_to":"1aa78d24_0003aabf","updated":"2016-07-13 23:29:17.000000000","message":"Sure, that makes sense to me","commit_id":"ca2af88ca7d893179eb7fb25e43008e829b17d26"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"edbdab90b173d8d1bb9c057d8bd79e2903ab2871","unresolved":false,"context_lines":[{"line_number":587,"context_line":"                                  run_as_root\u003dTrue)"},{"line_number":588,"context_line":"        if out:"},{"line_number":589,"context_line":"            out \u003d out.strip()"},{"line_number":590,"context_line":"            if (out[4] \u003d\u003d \u0027a\u0027):"},{"line_number":591,"context_line":"                return True"},{"line_number":592,"context_line":"        return False"},{"line_number":593,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_2caaef85","line":590,"updated":"2016-07-14 20:17:14.000000000","message":"Can you put a sample output in a comment or the docstring? It makes it easier to debug if the output changes and we need to parse differently.","commit_id":"fc826c67f0d0fed14438fe2535a4fb6984ece89a"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"ff7aeb2132bc5c10bfef30f9c566737016f85b87","unresolved":false,"context_lines":[{"line_number":587,"context_line":"                                  run_as_root\u003dTrue)"},{"line_number":588,"context_line":"        if out:"},{"line_number":589,"context_line":"            out \u003d out.strip()"},{"line_number":590,"context_line":"            if (out[4] \u003d\u003d \u0027a\u0027):"},{"line_number":591,"context_line":"                return True"},{"line_number":592,"context_line":"        return False"},{"line_number":593,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_72ae8ee8","line":590,"in_reply_to":"1aa78d24_2caaef85","updated":"2016-07-14 20:54:35.000000000","message":"Sure, I\u0027ve updated to add a comment. It\u0027s a pretty pared down version of lvdisplay, just one line of output with either dashes or letters to specify things like read vs write, or snapshot vs no snapshot.","commit_id":"fc826c67f0d0fed14438fe2535a4fb6984ece89a"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"bb0111842f2e2523fe4513361f0694b243604b2e","unresolved":false,"context_lines":[{"line_number":606,"context_line":"            LOG.error(_LE(\u0027StdErr  :%s\u0027), err.stderr)"},{"line_number":607,"context_line":"            raise"},{"line_number":608,"context_line":""},{"line_number":609,"context_line":"        starttime \u003d timeutils.utcnow()"},{"line_number":610,"context_line":"        timeout \u003d 5"},{"line_number":611,"context_line":"        while True:"},{"line_number":612,"context_line":"            # Wait until lv is deactivated to return in"},{"line_number":613,"context_line":"            # order to prevent a race condition."},{"line_number":614,"context_line":"            if not self._lv_is_active(name):"},{"line_number":615,"context_line":"                break"},{"line_number":616,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_d5dd5be1","line":613,"range":{"start_line":609,"start_character":7,"end_line":613,"end_character":48},"updated":"2016-07-29 19:01:08.000000000","message":"Most places we try to use the retry helper for this kind of thing. https://github.com/openstack/cinder/blob/master/cinder/utils.py#L726\n\n\nWe do similar things in os-brick, as an example: https://github.com/openstack/os-brick/blob/master/os_brick/initiator/linuxscsi.py#L76","commit_id":"6cf9fc1bcaabda55d3cd78a4f382f74de9f7ffdf"}],"cinder/tests/unit/brick/test_brick_lvm.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"a248d59c5f1476eb6bfac78b910fec4f3b88d621","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        self.vg.vg_name \u003d \"test-volumes\""},{"line_number":352,"context_line":"        self.vg.extend_volume(\"test\", \"2G\")"},{"line_number":353,"context_line":"        self.assertFalse(self.vg.deactivate_lv.called)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def test_lv_deactivate(self):"},{"line_number":356,"context_line":"        with mock.patch.object(self.vg, \u0027_execute\u0027,"},{"line_number":357,"context_line":"                               side_effect\u003d[None,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_9269118f","line":354,"updated":"2016-07-12 12:29:01.000000000","message":"Can we get time.sleep mocked out as well? It\u0027s only sleeping for 1 second, but it\u0027s still time we don\u0027t need to add to the unit test run time.","commit_id":"5ced328a84b087486b67519384b9d4d0b1515a6e"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"da96aa6aa277f43e17677f31940e1864bad2afb4","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        self.vg.vg_name \u003d \"test-volumes\""},{"line_number":352,"context_line":"        self.vg.extend_volume(\"test\", \"2G\")"},{"line_number":353,"context_line":"        self.assertFalse(self.vg.deactivate_lv.called)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def test_lv_deactivate(self):"},{"line_number":356,"context_line":"        with mock.patch.object(self.vg, \u0027_execute\u0027,"},{"line_number":357,"context_line":"                               side_effect\u003d[None,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_ee3ce494","line":354,"in_reply_to":"1aa78d24_9269118f","updated":"2016-07-12 16:12:43.000000000","message":"These tests never actually hit time.sleep - the first one gets to deactivated \u003d True on the first time and the second one raises the exception right before it gets there. At first test_lv_deactivate was going through the loop twice and sleeping, but I noticed that paused the test for a second so I just had it exit the loop right away.","commit_id":"5ced328a84b087486b67519384b9d4d0b1515a6e"},{"author":{"_account_id":17275,"name":"Nate Potter","email":"nathaniel.potter@intel.com","username":"npotter"},"change_message_id":"91f4b330d99dac958f6e99345c7d16767c629037","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        self.vg.vg_name \u003d \"test-volumes\""},{"line_number":352,"context_line":"        self.vg.extend_volume(\"test\", \"2G\")"},{"line_number":353,"context_line":"        self.assertFalse(self.vg.deactivate_lv.called)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def test_lv_deactivate(self):"},{"line_number":356,"context_line":"        with mock.patch.object(self.vg, \u0027_execute\u0027,"},{"line_number":357,"context_line":"                               side_effect\u003d[None,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_ee94e437","line":354,"in_reply_to":"1aa78d24_ee3ce494","updated":"2016-07-12 16:14:00.000000000","message":"Would it be better to make them loop through time.sleep and mock it out to really hit full coverage of the code?","commit_id":"5ced328a84b087486b67519384b9d4d0b1515a6e"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"d8a544ebe4819b3485ef4fc0f03e7994c357d27b","unresolved":false,"context_lines":[{"line_number":351,"context_line":"        self.vg.vg_name \u003d \"test-volumes\""},{"line_number":352,"context_line":"        self.vg.extend_volume(\"test\", \"2G\")"},{"line_number":353,"context_line":"        self.assertFalse(self.vg.deactivate_lv.called)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def test_lv_deactivate(self):"},{"line_number":356,"context_line":"        with mock.patch.object(self.vg, \u0027_execute\u0027,"},{"line_number":357,"context_line":"                               side_effect\u003d[None,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_8969dac0","line":354,"in_reply_to":"1aa78d24_ee94e437","updated":"2016-07-12 16:25:15.000000000","message":"Oh, right. Sorry, looking again I see what you\u0027re saying. I don\u0027t see much value in forcing the loop, so I think the tests are sufficient as is. Thanks for clarifying.","commit_id":"5ced328a84b087486b67519384b9d4d0b1515a6e"}]}
