)]}'
{"os_brick/initiator/connector.py":[{"author":{"_account_id":10725,"name":"Sergey Gotliv","email":"sgotliv@redhat.com","username":"sgotliv"},"change_message_id":"0af339028bc252226be634dc72143f4c6c5e367a","unresolved":false,"context_lines":[{"line_number":1045,"context_line":"                              {\u0027device\u0027: self.host_device})"},{"line_number":1046,"context_line":""},{"line_number":1047,"context_line":"            try:"},{"line_number":1048,"context_line":"                # Sometimes the multipath devices will show up as read only"},{"line_number":1049,"context_line":"                # initially and need additional time/rescans to get to RW."},{"line_number":1050,"context_line":"                self._linuxscsi.wait_for_rw(device_wwn, device_path)"},{"line_number":1051,"context_line":"            except exception.BlockDeviceReadOnly:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a2ca52d_9bb6a6f7","line":1048,"updated":"2015-10-17 08:58:32.000000000","message":"Patrick,\n\nI want to better understand a few things:\n\n1 According to this comment \"multipath\" devices sometimes show up as read only, but according to the bug libvirt couldn\u0027t open a single path (but maybe I misread the bug)\n\nCould not open \u0027/dev/disk/by-path/ip-172.99.112.13:3260-iscsi-iqn.2010-10.org.openstack:volume-561640e9-081a-430b-a7f8-9cadd63d2d00-lun-0\u0027: Operation not permitted\\r\\n\", \"id\": \"libvirt-16\"}\n\nThis is ^^^ a single path iscsi device, not a multipath FC device. Are you sure that you close the bug?\n\n2. Even if multipath is properly configured here on both environment and Nova/Cinder and multipathd is up and running, you still may not have a multipath device especially if there is only 1 physical path to that lun and \"find_multipaths yes\" appears in the multipath.conf (default for example in RHEL 7). \n\nSo do you want to check all block devices or just a multipath ones?","commit_id":"7603b1283d65f84359b12506da4f4b668740d058"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"a6af79eff8b8600ad187f56192d6e0622374d167","unresolved":false,"context_lines":[{"line_number":1045,"context_line":"                              {\u0027device\u0027: self.host_device})"},{"line_number":1046,"context_line":""},{"line_number":1047,"context_line":"            try:"},{"line_number":1048,"context_line":"                # Sometimes the multipath devices will show up as read only"},{"line_number":1049,"context_line":"                # initially and need additional time/rescans to get to RW."},{"line_number":1050,"context_line":"                self._linuxscsi.wait_for_rw(device_wwn, device_path)"},{"line_number":1051,"context_line":"            except exception.BlockDeviceReadOnly:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_e9e8fd18","line":1048,"in_reply_to":"5a2ca52d_9bb6a6f7","updated":"2015-10-18 00:20:04.000000000","message":"Ah, yea thats a good point.\n\nTo clarify, in the bug the occurrences seen in the gate (which I have not been able to repro or validate this change against) are single path since there is no multipath testing in the gate.\n\nThe errors I have seen in the Pure Storage CI system and what was reported by Netapp are all with multipath FC connections. For both of these backends single path devices do not seem to suffer from this problem.\n\nSo maybe what I\u0027ll do is mark this as a partial fix, since it is covering the case where the multipath devices are read-only, but not if a single path is read-only. It is very possible that there are actually different causes for the issues between the multipath FC read-only volumes and the single path iscsi ones seen in the gate.\n\nMy biggest concern right now is to get the FC CI systems that are trying to test multipath to get unbroken, as-is the choice is to generate noise or not test FC with multpathing... if we need to circle back and look at a more general solution for single-path FC/ISCSI/whatever thats fine.","commit_id":"7603b1283d65f84359b12506da4f4b668740d058"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f1481fba77392ff2a59eb97c94dd734641a62374","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"            try:"},{"line_number":1056,"context_line":"                # Sometimes the multipath devices will show up as read only"},{"line_number":1057,"context_line":"                # initially and need additional time/rescans to get to RW."},{"line_number":1058,"context_line":"                self._linuxscsi.wait_for_rw(device_wwn, device_path)"},{"line_number":1059,"context_line":"            except exception.BlockDeviceReadOnly:"},{"line_number":1060,"context_line":"                LOG.warning(_LW(\u0027Block device %s is still read-only. \u0027"},{"line_number":1061,"context_line":"                                \u0027Continuing anyway.\u0027), device_path)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_122547aa","line":1058,"updated":"2015-10-19 09:31:50.000000000","message":"-1: I think this wait should be conditional to the access_mode being \u0027rw\u0027","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"a18f2c24d15ebdeb079d530851c01fced544daf3","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"            try:"},{"line_number":1056,"context_line":"                # Sometimes the multipath devices will show up as read only"},{"line_number":1057,"context_line":"                # initially and need additional time/rescans to get to RW."},{"line_number":1058,"context_line":"                self._linuxscsi.wait_for_rw(device_wwn, device_path)"},{"line_number":1059,"context_line":"            except exception.BlockDeviceReadOnly:"},{"line_number":1060,"context_line":"                LOG.warning(_LW(\u0027Block device %s is still read-only. \u0027"},{"line_number":1061,"context_line":"                                \u0027Continuing anyway.\u0027), device_path)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_a5cf4c7e","line":1058,"in_reply_to":"3a29b11f_122547aa","updated":"2015-10-19 20:38:46.000000000","message":"Yea... I was concerned about that initially too, but the backend isn\u0027t ever actually told what the access mode for the volume or attachment is. That is all handled in Cinder and at the hypervisor level. It doesn\u0027t look like there is actually a point where a device should be attached ro at the block device level on the initiator. It might have a cinder access_mode set to ro, but thats for the hypervisor when it gives the disk to the instance.","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"1944f5e8155554c4ddf6d4482ca7f115412505d1","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"            try:"},{"line_number":1056,"context_line":"                # Sometimes the multipath devices will show up as read only"},{"line_number":1057,"context_line":"                # initially and need additional time/rescans to get to RW."},{"line_number":1058,"context_line":"                self._linuxscsi.wait_for_rw(device_wwn, device_path)"},{"line_number":1059,"context_line":"            except exception.BlockDeviceReadOnly:"},{"line_number":1060,"context_line":"                LOG.warning(_LW(\u0027Block device %s is still read-only. \u0027"},{"line_number":1061,"context_line":"                                \u0027Continuing anyway.\u0027), device_path)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_db4b4e58","line":1058,"in_reply_to":"3a29b11f_122547aa","updated":"2015-10-19 18:38:49.000000000","message":"yah this is one of the things we talked about as well.   I don\u0027t there is any attribute that tracks the rw/ro ability of an attached volume currently.","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"0201ce58786b85d5c52b17c0470b6a58934210f8","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"            try:"},{"line_number":1056,"context_line":"                # Sometimes the multipath devices will show up as read only"},{"line_number":1057,"context_line":"                # initially and need additional time/rescans to get to RW."},{"line_number":1058,"context_line":"                self._linuxscsi.wait_for_rw(device_wwn, device_path)"},{"line_number":1059,"context_line":"            except exception.BlockDeviceReadOnly:"},{"line_number":1060,"context_line":"                LOG.warning(_LW(\u0027Block device %s is still read-only. \u0027"},{"line_number":1061,"context_line":"                                \u0027Continuing anyway.\u0027), device_path)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_46b170e0","line":1058,"in_reply_to":"3a29b11f_8b21ec4f","updated":"2015-10-20 17:12:55.000000000","message":"Sure, I\u0027ll add the check in.","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b59074cf2d3a06d2e234ad2ea549822c593ee421","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"            try:"},{"line_number":1056,"context_line":"                # Sometimes the multipath devices will show up as read only"},{"line_number":1057,"context_line":"                # initially and need additional time/rescans to get to RW."},{"line_number":1058,"context_line":"                self._linuxscsi.wait_for_rw(device_wwn, device_path)"},{"line_number":1059,"context_line":"            except exception.BlockDeviceReadOnly:"},{"line_number":1060,"context_line":"                LOG.warning(_LW(\u0027Block device %s is still read-only. \u0027"},{"line_number":1061,"context_line":"                                \u0027Continuing anyway.\u0027), device_path)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_8b21ec4f","line":1058,"in_reply_to":"3a29b11f_a5cf4c7e","updated":"2015-10-20 09:17:46.000000000","message":"-1: If we have access_mode set to ro why would we want to wait for it to become writable, we are good to go anyway?","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"1cfcf1885c846c08dd1c1bfd4cdc4cb59d37f4a8","unresolved":false,"context_lines":[{"line_number":1054,"context_line":""},{"line_number":1055,"context_line":"            if (not (\u0027data\u0027 in connection_properties and"},{"line_number":1056,"context_line":"                     \u0027access_mode\u0027 in connection_properties[\u0027data\u0027] and"},{"line_number":1057,"context_line":"                     connection_properties[\u0027data\u0027][\u0027access_mode\u0027] \u003d\u003d \u0027ro\u0027)):"},{"line_number":1058,"context_line":"                try:"},{"line_number":1059,"context_line":"                    # Sometimes the multipath devices will show up as read only"},{"line_number":1060,"context_line":"                    # initially and need additional time/rescans to get to RW."}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_af5a66f0","line":1057,"updated":"2015-10-21 15:12:55.000000000","message":"nit: Lines 1056 and 1057 can be merged into one:\n\n connection_properties[\u0027data\u0027].get(\u0027access_mode\u0027, \u0027rw\u0027) \u003d\u003d \u0027ro\u0027)\n\nBecause doing it all in one line would be less readable:\n\n if connection_properties.get(\u0027data\u0027, {}).get(\u0027access_mode\u0027, \u0027rw\u0027) \u003d\u003d \u0027rw\u0027):","commit_id":"cd0c4c30a84ec8a2395e48f1d3ebff34af8c2dd0"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"4b7dff3586926149a98701666d9ff4b1a561eac8","unresolved":false,"context_lines":[{"line_number":1054,"context_line":""},{"line_number":1055,"context_line":"            if (not (\u0027data\u0027 in connection_properties and"},{"line_number":1056,"context_line":"                     \u0027access_mode\u0027 in connection_properties[\u0027data\u0027] and"},{"line_number":1057,"context_line":"                     connection_properties[\u0027data\u0027][\u0027access_mode\u0027] \u003d\u003d \u0027ro\u0027)):"},{"line_number":1058,"context_line":"                try:"},{"line_number":1059,"context_line":"                    # Sometimes the multipath devices will show up as read only"},{"line_number":1060,"context_line":"                    # initially and need additional time/rescans to get to RW."}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_937bdabd","line":1057,"in_reply_to":"3a29b11f_af5a66f0","updated":"2015-10-22 18:16:51.000000000","message":"Yea, I\u0027ll try and beautify this some... Further testing is showing that I might have the wrong thing here anyway ;)","commit_id":"cd0c4c30a84ec8a2395e48f1d3ebff34af8c2dd0"}],"os_brick/initiator/linuxscsi.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f1481fba77392ff2a59eb97c94dd734641a62374","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        else:"},{"line_number":165,"context_line":"            LOG.debug(\"%s has shown up.\", volume_path)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @utils.retry(exceptions\u003dexception.BlockDeviceReadOnly, retries\u003d5)"},{"line_number":168,"context_line":"    def wait_for_rw(self, wwn, device_path):"},{"line_number":169,"context_line":"        \"\"\"Wait for block device to be Read-Write.\"\"\""},{"line_number":170,"context_line":"        LOG.debug(\"Checking to see if %s is read-only.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_32ff2303","line":167,"updated":"2015-10-19 09:31:50.000000000","message":"?: I\u0027m not sure this is easier to read than a simple loop.","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"1944f5e8155554c4ddf6d4482ca7f115412505d1","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        else:"},{"line_number":165,"context_line":"            LOG.debug(\"%s has shown up.\", volume_path)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @utils.retry(exceptions\u003dexception.BlockDeviceReadOnly, retries\u003d5)"},{"line_number":168,"context_line":"    def wait_for_rw(self, wwn, device_path):"},{"line_number":169,"context_line":"        \"\"\"Wait for block device to be Read-Write.\"\"\""},{"line_number":170,"context_line":"        LOG.debug(\"Checking to see if %s is read-only.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_dbb90e30","line":167,"in_reply_to":"3a29b11f_32ff2303","updated":"2015-10-19 18:38:49.000000000","message":"this is already built in and used elsewhere in brick.  So, I\u0027d prefer that we use the same model.","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"9fd8eda9119b9b2892dcdf0184a33297d75c78b2","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        else:"},{"line_number":165,"context_line":"            LOG.debug(\"%s has shown up.\", volume_path)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @utils.retry(exceptions\u003dexception.BlockDeviceReadOnly, retries\u003d5)"},{"line_number":168,"context_line":"    def wait_for_rw(self, wwn, device_path):"},{"line_number":169,"context_line":"        \"\"\"Wait for block device to be Read-Write.\"\"\""},{"line_number":170,"context_line":"        LOG.debug(\"Checking to see if %s is read-only.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_c5f4c888","line":167,"in_reply_to":"3a29b11f_45d75823","updated":"2015-10-19 20:41:09.000000000","message":"edit: s/its also just that/its not that/","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b59074cf2d3a06d2e234ad2ea549822c593ee421","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        else:"},{"line_number":165,"context_line":"            LOG.debug(\"%s has shown up.\", volume_path)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @utils.retry(exceptions\u003dexception.BlockDeviceReadOnly, retries\u003d5)"},{"line_number":168,"context_line":"    def wait_for_rw(self, wwn, device_path):"},{"line_number":169,"context_line":"        \"\"\"Wait for block device to be Read-Write.\"\"\""},{"line_number":170,"context_line":"        LOG.debug(\"Checking to see if %s is read-only.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_2b645847","line":167,"in_reply_to":"3a29b11f_c5f4c888","updated":"2015-10-20 09:17:46.000000000","message":"Indeed those are compelling arguments. :-)","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"a18f2c24d15ebdeb079d530851c01fced544daf3","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        else:"},{"line_number":165,"context_line":"            LOG.debug(\"%s has shown up.\", volume_path)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    @utils.retry(exceptions\u003dexception.BlockDeviceReadOnly, retries\u003d5)"},{"line_number":168,"context_line":"    def wait_for_rw(self, wwn, device_path):"},{"line_number":169,"context_line":"        \"\"\"Wait for block device to be Read-Write.\"\"\""},{"line_number":170,"context_line":"        LOG.debug(\"Checking to see if %s is read-only.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_45d75823","line":167,"in_reply_to":"3a29b11f_dbb90e30","updated":"2015-10-19 20:38:46.000000000","message":"FWIW its also just that simple of a loop once we add in the increasing backoff and error handling. This is much cleaner than a first hacked together impl of this that wasn\u0027t using the retry decorator.","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b59074cf2d3a06d2e234ad2ea549822c593ee421","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            blkdev_parts \u003d blkdev.split(\u0027 \u0027)"},{"line_number":187,"context_line":"            ro \u003d blkdev_parts[-1]"},{"line_number":188,"context_line":"            name \u003d blkdev_parts[0]"},{"line_number":189,"context_line":"            if wwn in name and int(ro) \u003d\u003d 1:"},{"line_number":190,"context_line":"                LOG.debug(\"Block device %s is read-only\", device_path)"},{"line_number":191,"context_line":"                self._execute(\u0027multipath\u0027, \u0027-r\u0027, check_exit_code\u003d[0, 1, 21],"},{"line_number":192,"context_line":"                              run_as_root\u003dTrue, root_helper\u003dself._root_helper)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_2b1698a7","line":189,"updated":"2015-10-20 09:17:46.000000000","message":"?: Shouldn\u0027t we exit once we find the first writable path?","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"0201ce58786b85d5c52b17c0470b6a58934210f8","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            blkdev_parts \u003d blkdev.split(\u0027 \u0027)"},{"line_number":187,"context_line":"            ro \u003d blkdev_parts[-1]"},{"line_number":188,"context_line":"            name \u003d blkdev_parts[0]"},{"line_number":189,"context_line":"            if wwn in name and int(ro) \u003d\u003d 1:"},{"line_number":190,"context_line":"                LOG.debug(\"Block device %s is read-only\", device_path)"},{"line_number":191,"context_line":"                self._execute(\u0027multipath\u0027, \u0027-r\u0027, check_exit_code\u003d[0, 1, 21],"},{"line_number":192,"context_line":"                              run_as_root\u003dTrue, root_helper\u003dself._root_helper)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_66482c88","line":189,"in_reply_to":"3a29b11f_2b1698a7","updated":"2015-10-20 17:12:55.000000000","message":"Unfortunately no, it seems that if any of the dm-# pieces are read-only the whole top level /dev/mapper/foo device cannot be safely written to. Luckily that case only rarely happens (I saw it maybe 2-3 times after I\u0027ve beat the crap out an initiator with tempest). Typically they are either all ro or all rw, where we could take the shortcut, but IMO processing all the lines isn\u0027t such a bad price to pay to be sure it will work.","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"db2edb08892c4e244d305e0c3be95f5f1c213b1c","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            blkdev_parts \u003d blkdev.split(\u0027 \u0027)"},{"line_number":187,"context_line":"            ro \u003d blkdev_parts[-1]"},{"line_number":188,"context_line":"            name \u003d blkdev_parts[0]"},{"line_number":189,"context_line":"            if wwn in name and int(ro) \u003d\u003d 1:"},{"line_number":190,"context_line":"                LOG.debug(\"Block device %s is read-only\", device_path)"},{"line_number":191,"context_line":"                self._execute(\u0027multipath\u0027, \u0027-r\u0027, check_exit_code\u003d[0, 1, 21],"},{"line_number":192,"context_line":"                              run_as_root\u003dTrue, root_helper\u003dself._root_helper)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_cce84113","line":189,"in_reply_to":"3a29b11f_66482c88","updated":"2015-10-20 17:39:23.000000000","message":"If you saw it happen once, that is good enough reason for me, thanks for the explanation.\n\nWe need a note so nobody changes it in the future. ;-)","commit_id":"1d21a231a7b361b54d5d65c89bec4faedb66a744"}]}
