)]}'
{"cinder/volume/targets/cxt.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"c7db86adaa1d9be9108a963a6658a3d3183e98ab","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                raise"},{"line_number":124,"context_line":"        except Exception as e_vol:"},{"line_number":125,"context_line":"            LOG.error(_LE(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027)"},{"line_number":126,"context_line":"                      % {\u0027vol_id\u0027: vol_id, \u0027e\u0027: six.text_type(e_vol)})"},{"line_number":127,"context_line":"            raise"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        m \u003d re.search(\u0027Auth_CHAP_Initiator\u003d\"(\\w+)\":\"(\\w+)\"\u0027, volume_conf)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da86d52c_62e98519","line":126,"updated":"2015-02-18 21:16:08.000000000","message":"Please, change %\u003d\u003e,","commit_id":"3608d20a2ff31136719c52df7cc3f060c726316b"},{"author":{"_account_id":12088,"name":"Anish Bhatt","email":"anish.7@gmail.com","username":"anish"},"change_message_id":"53b4e8166cf2ef88a866e44d20465cd7c71faedf","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                raise"},{"line_number":124,"context_line":"        except Exception as e_vol:"},{"line_number":125,"context_line":"            LOG.error(_LE(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027)"},{"line_number":126,"context_line":"                      % {\u0027vol_id\u0027: vol_id, \u0027e\u0027: six.text_type(e_vol)})"},{"line_number":127,"context_line":"            raise"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        m \u003d re.search(\u0027Auth_CHAP_Initiator\u003d\"(\\w+)\":\"(\\w+)\"\u0027, volume_conf)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da86d52c_02f52982","line":126,"in_reply_to":"da86d52c_62e98519","updated":"2015-02-18 21:25:43.000000000","message":"Done","commit_id":"3608d20a2ff31136719c52df7cc3f060c726316b"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"dba434183bd0c29e03c2febde063c97a6ad749a5","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                raise"},{"line_number":124,"context_line":"        except Exception as e_vol:"},{"line_number":125,"context_line":"            LOG.error(_LE(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027),"},{"line_number":126,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: e_vol})"},{"line_number":127,"context_line":"            raise"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        m \u003d re.search(\u0027Auth_CHAP_Initiator\u003d\"(\\w+)\":\"(\\w+)\"\u0027, volume_conf)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_00149a9e","line":126,"updated":"2015-02-23 21:01:03.000000000","message":"Please, use six.text_type(e_vol)","commit_id":"62fbb8405eb5d3ed64797e923309fc8df0359bb0"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"c6f14958352c6b18d141b28c0d43913c8623ee54","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                volume_conf \u003d f.read()"},{"line_number":114,"context_line":"        except IOError as e_fnf:"},{"line_number":115,"context_line":"            LOG.debug(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027,"},{"line_number":116,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: e_fnf})"},{"line_number":117,"context_line":"            # We don\u0027t run on anything non-linux"},{"line_number":118,"context_line":"            if e_fnf.errno \u003d\u003d 2:"},{"line_number":119,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_2034a5fa","line":116,"updated":"2015-03-10 13:45:24.000000000","message":"This is fine by me, but I\u0027m rather annoyed because a number of folks were absolutely insistent that the six.test_type adds were put in.  Now we\u0027re taking them back out.  Seems we need to get our act together here.","commit_id":"ad08c7a1f0c4e6a1e44b5ad02f9efbf86a2a878e"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"6eac899d7270a1c40ee3cdd2061e616a6f0901cd","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                volume_conf \u003d f.read()"},{"line_number":114,"context_line":"        except IOError as e_fnf:"},{"line_number":115,"context_line":"            LOG.debug(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027,"},{"line_number":116,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: e_fnf})"},{"line_number":117,"context_line":"            # We don\u0027t run on anything non-linux"},{"line_number":118,"context_line":"            if e_fnf.errno \u003d\u003d 2:"},{"line_number":119,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_9b7ea017","line":116,"in_reply_to":"9a80dd14_2034a5fa","updated":"2015-03-10 13:50:17.000000000","message":"This has been a very confusing subject, It appears part of the confusion is a difference in behavior between the standard Python logging, the oslo_logging library, and the openstack.common.logger that we use in cinder.\n\nI have tested this usage using our logger and the logger does correctly handle unicode strings in the exception formatting.","commit_id":"ad08c7a1f0c4e6a1e44b5ad02f9efbf86a2a878e"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"8effd80cc194189e4e27a40373cf52adf22fbefb","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                volume_conf \u003d f.read()"},{"line_number":114,"context_line":"        except IOError as e_fnf:"},{"line_number":115,"context_line":"            LOG.debug(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027,"},{"line_number":116,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: e_fnf})"},{"line_number":117,"context_line":"            # We don\u0027t run on anything non-linux"},{"line_number":118,"context_line":"            if e_fnf.errno \u003d\u003d 2:"},{"line_number":119,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_3b7f74e1","line":116,"in_reply_to":"9a80dd14_9b7ea017","updated":"2015-03-10 14:18:29.000000000","message":"I tested this as well and this will not throw an exception. The logger will call six.text_type().  If you are using % instead of \",\", it will throw an exception, but we are fine here.","commit_id":"ad08c7a1f0c4e6a1e44b5ad02f9efbf86a2a878e"}],"cinder/volume/targets/tgt.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"4627889b26acef5884b05fc0688cb7d58c3ef381","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            with open(volume_path, \u0027r\u0027) as f:"},{"line_number":132,"context_line":"                volume_conf \u003d f.read()"},{"line_number":133,"context_line":"        except IOError as ErrorFileNotFound:"},{"line_number":134,"context_line":"            LOG.debug(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027,"},{"line_number":135,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027:"},{"line_number":136,"context_line":"                       six.text_type(ErrorFileNotFound)})"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_37485b8a","line":133,"updated":"2015-02-13 15:08:57.000000000","message":"ErrorFileNotFound is actually a variable, so this should not be camel cased. Same below with ErrorVolumeException. I suggest changing these to either just \"e\" or something like ioerror.","commit_id":"b44947eb45956adb4ab84ff5119728f4c573f31f"},{"author":{"_account_id":12088,"name":"Anish Bhatt","email":"anish.7@gmail.com","username":"anish"},"change_message_id":"c5fff54b313e25c88bb65a8e6780365215a8967c","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            with open(volume_path, \u0027r\u0027) as f:"},{"line_number":132,"context_line":"                volume_conf \u003d f.read()"},{"line_number":133,"context_line":"        except IOError as ErrorFileNotFound:"},{"line_number":134,"context_line":"            LOG.debug(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027,"},{"line_number":135,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027:"},{"line_number":136,"context_line":"                       six.text_type(ErrorFileNotFound)})"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_1fd517b9","line":133,"in_reply_to":"da86d52c_37485b8a","updated":"2015-02-14 02:27:38.000000000","message":"Done","commit_id":"b44947eb45956adb4ab84ff5119728f4c573f31f"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"0805d647eb0e9c5d5489edce32860a1be2994d0b","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                raise"},{"line_number":142,"context_line":"        except Exception as e_vol:"},{"line_number":143,"context_line":"            LOG.debug(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027,"},{"line_number":144,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027:"},{"line_number":145,"context_line":"                       six.text_type(e_vol)})"},{"line_number":146,"context_line":"            raise"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_6f4fc192","line":144,"updated":"2015-02-18 14:42:21.000000000","message":"Why don\u0027t you add LOG.error here?","commit_id":"5752dcc8ebb8e1f0afafe7f78d828e6b26f3c564"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"c7db86adaa1d9be9108a963a6658a3d3183e98ab","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                raise"},{"line_number":142,"context_line":"        except Exception as e_vol:"},{"line_number":143,"context_line":"            LOG.error(_LE(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027)"},{"line_number":144,"context_line":"                      % {\u0027vol_id\u0027: vol_id, \u0027e\u0027: six.text_type(e_vol)})"},{"line_number":145,"context_line":"            raise"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        m \u003d re.search(\u0027incominguser (\\w+) (\\w+)\u0027, volume_conf)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da86d52c_02da8977","line":144,"updated":"2015-02-18 21:16:08.000000000","message":"%\u003d\u003e,","commit_id":"3608d20a2ff31136719c52df7cc3f060c726316b"},{"author":{"_account_id":12088,"name":"Anish Bhatt","email":"anish.7@gmail.com","username":"anish"},"change_message_id":"53b4e8166cf2ef88a866e44d20465cd7c71faedf","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                raise"},{"line_number":142,"context_line":"        except Exception as e_vol:"},{"line_number":143,"context_line":"            LOG.error(_LE(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027)"},{"line_number":144,"context_line":"                      % {\u0027vol_id\u0027: vol_id, \u0027e\u0027: six.text_type(e_vol)})"},{"line_number":145,"context_line":"            raise"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        m \u003d re.search(\u0027incominguser (\\w+) (\\w+)\u0027, volume_conf)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da86d52c_22eeadb5","line":144,"in_reply_to":"da86d52c_02da8977","updated":"2015-02-18 21:25:43.000000000","message":"Done","commit_id":"3608d20a2ff31136719c52df7cc3f060c726316b"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"0de8343b022b55cf389e41334df1a384f83b0617","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        except IOError as e_fnf:"},{"line_number":134,"context_line":"            LOG.debug(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027,"},{"line_number":135,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027:"},{"line_number":136,"context_line":"                       six.text_type(e_fnf)})"},{"line_number":137,"context_line":"            # tgt is linux specific"},{"line_number":138,"context_line":"            if e_fnf.errno \u003d\u003d 2:"},{"line_number":139,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_e577b4d2","line":136,"updated":"2015-02-23 04:45:19.000000000","message":"I think the six.text_type should be omitted as per guidelines (this is an ongoing battle):\nhttp://docs.openstack.org/developer/oslo.i18n/guidelines.html","commit_id":"412788ba8243294fd00b4520233523a1843fe0e5"},{"author":{"_account_id":12088,"name":"Anish Bhatt","email":"anish.7@gmail.com","username":"anish"},"change_message_id":"b2ebc8d3e6182ca576a1df190ab837d55a4ebecb","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        except IOError as e_fnf:"},{"line_number":134,"context_line":"            LOG.debug(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027,"},{"line_number":135,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027:"},{"line_number":136,"context_line":"                       six.text_type(e_fnf)})"},{"line_number":137,"context_line":"            # tgt is linux specific"},{"line_number":138,"context_line":"            if e_fnf.errno \u003d\u003d 2:"},{"line_number":139,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_3aae4686","line":136,"in_reply_to":"ba7be1f8_e577b4d2","updated":"2015-02-23 06:41:29.000000000","message":"Done","commit_id":"412788ba8243294fd00b4520233523a1843fe0e5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"f9508b813318d02eae71d183e43b4796fae21cb9","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        except IOError as e_fnf:"},{"line_number":134,"context_line":"            LOG.debug(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027,"},{"line_number":135,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027:"},{"line_number":136,"context_line":"                       six.text_type(e_fnf)})"},{"line_number":137,"context_line":"            # tgt is linux specific"},{"line_number":138,"context_line":"            if e_fnf.errno \u003d\u003d 2:"},{"line_number":139,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_f720474b","line":136,"in_reply_to":"ba7be1f8_e577b4d2","updated":"2015-02-23 06:01:02.000000000","message":"Hi John,\nYou are right about the guidelines, but this message is a debug message without _. If the exception is not wrapped, we\u0027ll get a UnicodeError exception (I think you discovered that in this patch https://review.openstack.org/#/c/143162/)? So if this message is a info or warning with _LI or _LW, using an exception without six.text_type should be fine as shown in the example in the guidelines.","commit_id":"412788ba8243294fd00b4520233523a1843fe0e5"},{"author":{"_account_id":12088,"name":"Anish Bhatt","email":"anish.7@gmail.com","username":"anish"},"change_message_id":"b2ebc8d3e6182ca576a1df190ab837d55a4ebecb","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        except IOError as e_fnf:"},{"line_number":134,"context_line":"            LOG.debug(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027,"},{"line_number":135,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027:"},{"line_number":136,"context_line":"                       six.text_type(e_fnf)})"},{"line_number":137,"context_line":"            # tgt is linux specific"},{"line_number":138,"context_line":"            if e_fnf.errno \u003d\u003d 2:"},{"line_number":139,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_5aa93a7a","line":136,"in_reply_to":"ba7be1f8_f720474b","updated":"2015-02-23 06:41:29.000000000","message":"Done","commit_id":"412788ba8243294fd00b4520233523a1843fe0e5"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"0de8343b022b55cf389e41334df1a384f83b0617","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                raise"},{"line_number":142,"context_line":"        except Exception as e_vol:"},{"line_number":143,"context_line":"            LOG.error(_LE(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027),"},{"line_number":144,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: six.text_type(e_vol)})"},{"line_number":145,"context_line":"            raise"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        m \u003d re.search(\u0027incominguser (\\w+) (\\w+)\u0027, volume_conf)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_654bc487","line":144,"updated":"2015-02-23 04:45:19.000000000","message":"same as above WRT six.text_type","commit_id":"412788ba8243294fd00b4520233523a1843fe0e5"},{"author":{"_account_id":12088,"name":"Anish Bhatt","email":"anish.7@gmail.com","username":"anish"},"change_message_id":"b2ebc8d3e6182ca576a1df190ab837d55a4ebecb","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                raise"},{"line_number":142,"context_line":"        except Exception as e_vol:"},{"line_number":143,"context_line":"            LOG.error(_LE(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027),"},{"line_number":144,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: six.text_type(e_vol)})"},{"line_number":145,"context_line":"            raise"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        m \u003d re.search(\u0027incominguser (\\w+) (\\w+)\u0027, volume_conf)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_9abad2be","line":144,"in_reply_to":"ba7be1f8_654bc487","updated":"2015-02-23 06:41:29.000000000","message":"Done","commit_id":"412788ba8243294fd00b4520233523a1843fe0e5"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"f9508b813318d02eae71d183e43b4796fae21cb9","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                raise"},{"line_number":142,"context_line":"        except Exception as e_vol:"},{"line_number":143,"context_line":"            LOG.error(_LE(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027),"},{"line_number":144,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: six.text_type(e_vol)})"},{"line_number":145,"context_line":"            raise"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        m \u003d re.search(\u0027incominguser (\\w+) (\\w+)\u0027, volume_conf)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_77329711","line":144,"in_reply_to":"ba7be1f8_654bc487","updated":"2015-02-23 06:01:02.000000000","message":"You are right. This one doesn\u0027t need six.text_type().","commit_id":"412788ba8243294fd00b4520233523a1843fe0e5"},{"author":{"_account_id":12088,"name":"Anish Bhatt","email":"anish.7@gmail.com","username":"anish"},"change_message_id":"b2ebc8d3e6182ca576a1df190ab837d55a4ebecb","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                raise"},{"line_number":142,"context_line":"        except Exception as e_vol:"},{"line_number":143,"context_line":"            LOG.error(_LE(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027),"},{"line_number":144,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: six.text_type(e_vol)})"},{"line_number":145,"context_line":"            raise"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        m \u003d re.search(\u0027incominguser (\\w+) (\\w+)\u0027, volume_conf)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_7ab7ded8","line":144,"in_reply_to":"ba7be1f8_77329711","updated":"2015-02-23 06:41:29.000000000","message":"Done","commit_id":"412788ba8243294fd00b4520233523a1843fe0e5"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"dba434183bd0c29e03c2febde063c97a6ad749a5","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            LOG.error(_LE(\"Failed recovery attempt to create \""},{"line_number":109,"context_line":"                          \"iscsi backing lun for Volume \""},{"line_number":110,"context_line":"                          \"ID:%(vol_id)s: %(e)s\"),"},{"line_number":111,"context_line":"                      {\u0027vol_id\u0027: name, \u0027e\u0027: e})"},{"line_number":112,"context_line":"        finally:"},{"line_number":113,"context_line":"            LOG.debug(\u0027StdOut from recreate backing lun: %s\u0027, out)"},{"line_number":114,"context_line":"            LOG.debug(\u0027StdErr from recreate backing lun: %s\u0027, err)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_e01ce6c3","line":111,"updated":"2015-02-23 21:01:03.000000000","message":"Should be six.text_type(e)","commit_id":"62fbb8405eb5d3ed64797e923309fc8df0359bb0"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"053efd4c3d8da6c3aadef09595f51eac21f26e1a","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            LOG.error(_LE(\"Failed recovery attempt to create \""},{"line_number":109,"context_line":"                          \"iscsi backing lun for Volume \""},{"line_number":110,"context_line":"                          \"ID:%(vol_id)s: %(e)s\"),"},{"line_number":111,"context_line":"                      {\u0027vol_id\u0027: name, \u0027e\u0027: e})"},{"line_number":112,"context_line":"        finally:"},{"line_number":113,"context_line":"            LOG.debug(\u0027StdOut from recreate backing lun: %s\u0027, out)"},{"line_number":114,"context_line":"            LOG.debug(\u0027StdErr from recreate backing lun: %s\u0027, err)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_0dae9e85","line":111,"in_reply_to":"9a80dd14_5bbeba00","updated":"2015-03-05 16:56:54.000000000","message":"Just to clarify and capture this here: six.text_type isn\u0027t needed here because the logger handles the conversion internally. The use of an _Lx wrapper does not make a difference.","commit_id":"62fbb8405eb5d3ed64797e923309fc8df0359bb0"},{"author":{"_account_id":12088,"name":"Anish Bhatt","email":"anish.7@gmail.com","username":"anish"},"change_message_id":"1bd0c5754d4432debcab61ab17e3a14ecb84384b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            LOG.error(_LE(\"Failed recovery attempt to create \""},{"line_number":109,"context_line":"                          \"iscsi backing lun for Volume \""},{"line_number":110,"context_line":"                          \"ID:%(vol_id)s: %(e)s\"),"},{"line_number":111,"context_line":"                      {\u0027vol_id\u0027: name, \u0027e\u0027: e})"},{"line_number":112,"context_line":"        finally:"},{"line_number":113,"context_line":"            LOG.debug(\u0027StdOut from recreate backing lun: %s\u0027, out)"},{"line_number":114,"context_line":"            LOG.debug(\u0027StdErr from recreate backing lun: %s\u0027, err)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_5bbeba00","line":111,"in_reply_to":"9a80dd14_c09abb13","updated":"2015-03-04 23:58:56.000000000","message":"Correct, discussed this with Ivan in the channel and he removed his -1","commit_id":"62fbb8405eb5d3ed64797e923309fc8df0359bb0"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"b6b99902bbd25e099733fac179518279ef4c6ac9","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            LOG.error(_LE(\"Failed recovery attempt to create \""},{"line_number":109,"context_line":"                          \"iscsi backing lun for Volume \""},{"line_number":110,"context_line":"                          \"ID:%(vol_id)s: %(e)s\"),"},{"line_number":111,"context_line":"                      {\u0027vol_id\u0027: name, \u0027e\u0027: e})"},{"line_number":112,"context_line":"        finally:"},{"line_number":113,"context_line":"            LOG.debug(\u0027StdOut from recreate backing lun: %s\u0027, out)"},{"line_number":114,"context_line":"            LOG.debug(\u0027StdErr from recreate backing lun: %s\u0027, err)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_c09abb13","line":111,"in_reply_to":"ba7be1f8_e01ce6c3","updated":"2015-03-04 23:47:52.000000000","message":"I could be mistaken, but I don\u0027t think you need to wrap this in six if it\u0027s a param to  the _L* functions now?","commit_id":"62fbb8405eb5d3ed64797e923309fc8df0359bb0"},{"author":{"_account_id":10115,"name":"Mitsuhiro Tanino","email":"mitsuhiro.tanino@lycorp.co.jp","username":"mtanino"},"change_message_id":"69bf53e1341fed1bcc61e5099bb466046e1baa67","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        vol_id \u003d iscsi_name.split(\u0027:\u0027)[1]"},{"line_number":128,"context_line":"        volume_path \u003d os.path.join(volumes_dir, vol_id)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            with open(volume_path, \u0027r\u0027) as f:"},{"line_number":132,"context_line":"                volume_conf \u003d f.read()"},{"line_number":133,"context_line":"        except IOError as e_fnf:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_31d2c200","line":130,"updated":"2015-03-06 03:17:12.000000000","message":"What is a difference doing this? In this case, we don\u0027t need to use Linux specific error number even if tgt only supports linux environment.\n\n    if os.path.exists(volume_path):\n        try:\n            with open(volume_path, \u0027r\u0027) as f:\n                volume_conf \u003d f.read()\n        except Exception as e_vol:\n            LOG.error(_LE(\u0027Failed to open config for Volume %(vol_id)s: \u0027\n                          \u0027%(e)s\u0027),\n                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: e_vol})\n            raise\n    else:\n        LOG.debug(\u0027Failed to open config for Volume %(vol_id)s: \u0027\n                  \u0027File does not exist\u0027,\n                  {\u0027vol_id\u0027: vol_id})\n        return None","commit_id":"62fbb8405eb5d3ed64797e923309fc8df0359bb0"},{"author":{"_account_id":12088,"name":"Anish Bhatt","email":"anish.7@gmail.com","username":"anish"},"change_message_id":"b6a523d34cd51a55ee74f9fdf43e3280d4224790","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        vol_id \u003d iscsi_name.split(\u0027:\u0027)[1]"},{"line_number":128,"context_line":"        volume_path \u003d os.path.join(volumes_dir, vol_id)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            with open(volume_path, \u0027r\u0027) as f:"},{"line_number":132,"context_line":"                volume_conf \u003d f.read()"},{"line_number":133,"context_line":"        except IOError as e_fnf:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_52c6544a","line":130,"in_reply_to":"9a80dd14_31d2c200","updated":"2015-03-06 05:17:01.000000000","message":"Only IOError with errno \u003d\u003d 2 implies file not found. IOError can be caused by other issues as well. Beyond this, someone else raised a point that I need to mention errno \u003d\u003d 2 is linux only, but tgt being linux only, this is okay. \n\nYes, we could do it your way as well, but originally this was done for cxt \u0026 tgt together, and I was trying to keep the approach for both the same. cxt got committed while this has languished on for a while.","commit_id":"62fbb8405eb5d3ed64797e923309fc8df0359bb0"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"053efd4c3d8da6c3aadef09595f51eac21f26e1a","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                volume_conf \u003d f.read()"},{"line_number":133,"context_line":"        except IOError as e_fnf:"},{"line_number":134,"context_line":"            LOG.debug(\u0027Failed to open config for Volume %(vol_id)s: %(e)s\u0027,"},{"line_number":135,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: six.text_type(e_fnf)})"},{"line_number":136,"context_line":"            # tgt is linux specific"},{"line_number":137,"context_line":"            if e_fnf.errno \u003d\u003d 2:"},{"line_number":138,"context_line":"                return None"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_0dc5be3b","line":135,"updated":"2015-03-05 16:56:54.000000000","message":"six.text_type could be removed here, but no harm with it left there.","commit_id":"62fbb8405eb5d3ed64797e923309fc8df0359bb0"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"dba434183bd0c29e03c2febde063c97a6ad749a5","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                raise"},{"line_number":141,"context_line":"        except Exception as e_vol:"},{"line_number":142,"context_line":"            LOG.error(_LE(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027),"},{"line_number":143,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: e_vol})"},{"line_number":144,"context_line":"            raise"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        m \u003d re.search(\u0027incominguser (\\w+) (\\w+)\u0027, volume_conf)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba7be1f8_6088f6e7","line":143,"updated":"2015-02-23 21:01:03.000000000","message":"The same as above.","commit_id":"62fbb8405eb5d3ed64797e923309fc8df0359bb0"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"053efd4c3d8da6c3aadef09595f51eac21f26e1a","unresolved":false,"context_lines":[{"line_number":315,"context_line":"            else:"},{"line_number":316,"context_line":"                LOG.error(_LE(\"Failed to remove iscsi target for Volume \""},{"line_number":317,"context_line":"                              \"ID: %(vol_id)s: %(e)s\"),"},{"line_number":318,"context_line":"                          {\u0027vol_id\u0027: vol_id, \u0027e\u0027: six.text_type(e)})"},{"line_number":319,"context_line":"                raise exception.ISCSITargetRemoveFailed(volume_id\u003dvol_id)"},{"line_number":320,"context_line":"        # NOTE(jdg): There\u0027s a bug in some versions of tgt that"},{"line_number":321,"context_line":"        # will sometimes fail silently when using the force flag"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_8de8ceb5","line":318,"updated":"2015-03-05 16:56:54.000000000","message":"Could be removed.","commit_id":"62fbb8405eb5d3ed64797e923309fc8df0359bb0"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"1591e6fbf6b059c484571472fbbaa3f78cf346fd","unresolved":false,"context_lines":[{"line_number":315,"context_line":"            else:"},{"line_number":316,"context_line":"                LOG.error(_LE(\"Failed to remove iscsi target for Volume \""},{"line_number":317,"context_line":"                              \"ID: %(vol_id)s: %(e)s\"),"},{"line_number":318,"context_line":"                          {\u0027vol_id\u0027: vol_id, \u0027e\u0027: six.text_type(e)})"},{"line_number":319,"context_line":"                raise exception.ISCSITargetRemoveFailed(volume_id\u003dvol_id)"},{"line_number":320,"context_line":"        # NOTE(jdg): There\u0027s a bug in some versions of tgt that"},{"line_number":321,"context_line":"        # will sometimes fail silently when using the force flag"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_b94cc29f","line":318,"in_reply_to":"9a80dd14_8de8ceb5","updated":"2015-03-06 14:17:15.000000000","message":"Just to clarify, my previous comment was referring to the use of six.text_type. Like the usage above, it is harmless having it in there, but it is redundant since the logger will take care of the unicode handling internally.","commit_id":"62fbb8405eb5d3ed64797e923309fc8df0359bb0"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"548408e925b170e858c75ddaa37afd0eec535ecc","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            if e_fnf.errno \u003d\u003d 2:"},{"line_number":137,"context_line":"                return None"},{"line_number":138,"context_line":"            else:"},{"line_number":139,"context_line":"                raise"},{"line_number":140,"context_line":"        except Exception as e_vol:"},{"line_number":141,"context_line":"            LOG.error(_LE(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027),"},{"line_number":142,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: e_vol})"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_844825cd","line":139,"updated":"2015-03-09 22:16:46.000000000","message":"Need to see a unit test for this exception being raised.","commit_id":"44faff003a1dba4535ab8fa8bed66fb2010261e0"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"548408e925b170e858c75ddaa37afd0eec535ecc","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        except Exception as e_vol:"},{"line_number":141,"context_line":"            LOG.error(_LE(\u0027Failed to open config for %(vol_id)s: %(e)s\u0027),"},{"line_number":142,"context_line":"                      {\u0027vol_id\u0027: vol_id, \u0027e\u0027: e_vol})"},{"line_number":143,"context_line":"            raise"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        m \u003d re.search(\u0027incominguser (\\w+) (\\w+)\u0027, volume_conf)"},{"line_number":146,"context_line":"        if m:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_a44369ad","line":143,"updated":"2015-03-09 22:16:46.000000000","message":"same","commit_id":"44faff003a1dba4535ab8fa8bed66fb2010261e0"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"0a190bc000cf05f68a3b0eb554cd7e2e7dba1429","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                # ER marker (Ref bug: #1398078)."},{"line_number":222,"context_line":"                LOG.warning(_LW(\u0027Could not create target because \u0027"},{"line_number":223,"context_line":"                                \u0027it already exists for volume: %s\u0027), vol_id)"},{"line_number":224,"context_line":"                LOG.debug(\u0027Exception was: %s\u0027, e)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"            LOG.error(_LE(\"Failed to create iscsi target for Volume \""},{"line_number":227,"context_line":"                          \"ID: %(vol_id)s: %(e)s\"),"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_3b4a3355","line":224,"updated":"2015-03-09 22:56:06.000000000","message":"You can remove this line. The exception is logged in line 226.","commit_id":"44faff003a1dba4535ab8fa8bed66fb2010261e0"},{"author":{"_account_id":12088,"name":"Anish Bhatt","email":"anish.7@gmail.com","username":"anish"},"change_message_id":"f42320bb29f9693ed50994c7399532816e20fe37","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                # ER marker (Ref bug: #1398078)."},{"line_number":222,"context_line":"                LOG.warning(_LW(\u0027Could not create target because \u0027"},{"line_number":223,"context_line":"                                \u0027it already exists for volume: %s\u0027), vol_id)"},{"line_number":224,"context_line":"                LOG.debug(\u0027Exception was: %s\u0027, e)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"            LOG.error(_LE(\"Failed to create iscsi target for Volume \""},{"line_number":227,"context_line":"                          \"ID: %(vol_id)s: %(e)s\"),"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_6f5ce519","line":224,"in_reply_to":"9a80dd14_3b4a3355","updated":"2015-03-10 01:08:04.000000000","message":"Done","commit_id":"44faff003a1dba4535ab8fa8bed66fb2010261e0"}]}
