)]}'
{"oslo/utils/netutils.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"b2c20cf86c6ad694a8f1d72ce4674cfed3d3f248","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    \"\"\""},{"line_number":111,"context_line":"    try:"},{"line_number":112,"context_line":"        csock \u003d socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"},{"line_number":113,"context_line":"        csock.connect((\u00278.8.8.8\u0027, 80))"},{"line_number":114,"context_line":"        (addr, port) \u003d csock.getsockname()"},{"line_number":115,"context_line":"        csock.close()"},{"line_number":116,"context_line":"        return addr"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_5e2cef47","line":113,"updated":"2014-09-30 15:35:29.000000000","message":"Using address from RFC5737 might be better.","commit_id":"87c349a54c690e4f2933b738e5d27a820fbb0c37"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3305fe3dc442a4f5e565c0f901a1f56bf469ab50","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    \"\"\""},{"line_number":111,"context_line":"    try:"},{"line_number":112,"context_line":"        csock \u003d socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"},{"line_number":113,"context_line":"        csock.connect((\u00278.8.8.8\u0027, 80))"},{"line_number":114,"context_line":"        (addr, port) \u003d csock.getsockname()"},{"line_number":115,"context_line":"        csock.close()"},{"line_number":116,"context_line":"        return addr"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_e1bb460c","line":113,"in_reply_to":"baa201ad_41589232","updated":"2014-09-30 16:06:48.000000000","message":"Yep. That sounds cleaner.","commit_id":"87c349a54c690e4f2933b738e5d27a820fbb0c37"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"cef1634297099ef7f982442700a216757bab460f","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    \"\"\""},{"line_number":111,"context_line":"    try:"},{"line_number":112,"context_line":"        csock \u003d socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"},{"line_number":113,"context_line":"        csock.connect((\u00278.8.8.8\u0027, 80))"},{"line_number":114,"context_line":"        (addr, port) \u003d csock.getsockname()"},{"line_number":115,"context_line":"        csock.close()"},{"line_number":116,"context_line":"        return addr"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_41589232","line":113,"in_reply_to":"baa201ad_5e2cef47","updated":"2014-09-30 16:00:22.000000000","message":"Do you mean use IP from `documentation address block`?","commit_id":"87c349a54c690e4f2933b738e5d27a820fbb0c37"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"b2c20cf86c6ad694a8f1d72ce4674cfed3d3f248","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        return _get_my_ipv4_address()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"def _get_my_ipv4_address():"},{"line_number":122,"context_line":"    \"\"\"Run ip route/addr commands to figure out the best ipv4"},{"line_number":123,"context_line":"    \"\"\""},{"line_number":124,"context_line":"    LOCALHOST \u003d \u0027127.0.0.1\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_be1a3b15","line":121,"updated":"2014-09-30 15:35:29.000000000","message":"This looks very non portable :(","commit_id":"87c349a54c690e4f2933b738e5d27a820fbb0c37"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"cef1634297099ef7f982442700a216757bab460f","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        return _get_my_ipv4_address()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"def _get_my_ipv4_address():"},{"line_number":122,"context_line":"    \"\"\"Run ip route/addr commands to figure out the best ipv4"},{"line_number":123,"context_line":"    \"\"\""},{"line_number":124,"context_line":"    LOCALHOST \u003d \u0027127.0.0.1\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_3e5bab88","line":121,"in_reply_to":"baa201ad_be1a3b15","updated":"2014-09-30 16:00:22.000000000","message":"In the case of getting errors in the check_output we simply return 127.0.0.1.","commit_id":"87c349a54c690e4f2933b738e5d27a820fbb0c37"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"eb092aec589c186d2aa18dd803d7eb5b6d663f80","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        (addr, port) \u003d csock.getsockname()"},{"line_number":115,"context_line":"        csock.close()"},{"line_number":116,"context_line":"        return addr"},{"line_number":117,"context_line":"    except socket.error:"},{"line_number":118,"context_line":"        return _get_my_ipv4_address()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_6b3ba59c","line":117,"updated":"2014-10-01 08:31:02.000000000","message":"what should happened, if we will get en another exception here?","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"24de5574fc909de7cfc75602ca826636e2e11ad7","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        (addr, port) \u003d csock.getsockname()"},{"line_number":115,"context_line":"        csock.close()"},{"line_number":116,"context_line":"        return addr"},{"line_number":117,"context_line":"    except socket.error:"},{"line_number":118,"context_line":"        return _get_my_ipv4_address()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_6373c115","line":117,"in_reply_to":"baa201ad_6b3ba59c","updated":"2014-10-01 15:52:18.000000000","message":"The only exception we can get in this place is socket.error.","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"36408a9968e2a10601f4ac45130145f46135291f","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    \"\"\""},{"line_number":124,"context_line":"    LOCALHOST \u003d \u0027127.0.0.1\u0027"},{"line_number":125,"context_line":"    try:"},{"line_number":126,"context_line":"        out \u003d subprocess.check_output([\u0027ip\u0027, \u0027-f\u0027, \u0027inet\u0027, \u0027-o\u0027, \u0027route\u0027,"},{"line_number":127,"context_line":"                                       \u0027show\u0027])"},{"line_number":128,"context_line":"        # Find the default route"},{"line_number":129,"context_line":"        regex_default \u003d (\u0027default\\s*via\\s*\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_6de74713","line":126,"updated":"2014-09-30 18:33:58.000000000","message":"check_output doesn\u0027t exist in 2.6 :-/\n\n  Python 2.6.6 (r266:84292, Dec 19 2012, 19:54:30) \n  [GCC 3.4.6 20060404 (Red Hat 3.4.6-11)] on linux2\n  Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n  \u003e\u003e\u003e import subprocess\n  \u003e\u003e\u003e subprocess.check_output\n  Traceback (most recent call last):\n    File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  AttributeError: \u0027module\u0027 object has no attribute \u0027check_output\u0027r","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"24de5574fc909de7cfc75602ca826636e2e11ad7","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    \"\"\""},{"line_number":124,"context_line":"    LOCALHOST \u003d \u0027127.0.0.1\u0027"},{"line_number":125,"context_line":"    try:"},{"line_number":126,"context_line":"        out \u003d subprocess.check_output([\u0027ip\u0027, \u0027-f\u0027, \u0027inet\u0027, \u0027-o\u0027, \u0027route\u0027,"},{"line_number":127,"context_line":"                                       \u0027show\u0027])"},{"line_number":128,"context_line":"        # Find the default route"},{"line_number":129,"context_line":"        regex_default \u003d (\u0027default\\s*via\\s*\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_7e9c36c1","line":126,"in_reply_to":"baa201ad_6de74713","updated":"2014-10-01 15:52:18.000000000","message":"looking for what to use instead of check_output.","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"eb092aec589c186d2aa18dd803d7eb5b6d663f80","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            if (match.group(3) \u003d\u003d iface and"},{"line_number":143,"context_line":"                    netaddr.IPAddress(gateway) in subnet):"},{"line_number":144,"context_line":"                try:"},{"line_number":145,"context_line":"                    return _get_ipv4_address_for_interface(iface)"},{"line_number":146,"context_line":"                except Exception:"},{"line_number":147,"context_line":"                    pass"},{"line_number":148,"context_line":"    except Exception as ex:"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_cbdd7172","line":145,"updated":"2014-10-01 08:31:02.000000000","message":"so you raise Exception in _get_ipv4_address_for_interface(), then catch them here and do nothing with it - just pass. It looks a bit strange for me.","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"24de5574fc909de7cfc75602ca826636e2e11ad7","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            if (match.group(3) \u003d\u003d iface and"},{"line_number":143,"context_line":"                    netaddr.IPAddress(gateway) in subnet):"},{"line_number":144,"context_line":"                try:"},{"line_number":145,"context_line":"                    return _get_ipv4_address_for_interface(iface)"},{"line_number":146,"context_line":"                except Exception:"},{"line_number":147,"context_line":"                    pass"},{"line_number":148,"context_line":"    except Exception as ex:"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_a3cbe91c","line":145,"in_reply_to":"baa201ad_cbdd7172","updated":"2014-10-01 15:52:18.000000000","message":"in this case we return LOCALHOST. see L150","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"eb092aec589c186d2aa18dd803d7eb5b6d663f80","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                except Exception:"},{"line_number":147,"context_line":"                    pass"},{"line_number":148,"context_line":"    except Exception as ex:"},{"line_number":149,"context_line":"            LOG.error(_(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":150,"context_line":"    return LOCALHOST"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_ebd87581","line":149,"updated":"2014-10-01 08:31:02.000000000","message":"nit: _LE(\"...\")","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"24de5574fc909de7cfc75602ca826636e2e11ad7","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                except Exception:"},{"line_number":147,"context_line":"                    pass"},{"line_number":148,"context_line":"    except Exception as ex:"},{"line_number":149,"context_line":"            LOG.error(_(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":150,"context_line":"    return LOCALHOST"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_238539ad","line":149,"in_reply_to":"baa201ad_ebd87581","updated":"2014-10-01 15:52:18.000000000","message":"will fix in the next patch","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"eb092aec589c186d2aa18dd803d7eb5b6d663f80","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        if address:"},{"line_number":164,"context_line":"            return address[0]"},{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            msg \u003d _(\u0027IPv4 address is not found.: %s\u0027) % out"},{"line_number":167,"context_line":"            raise Exception(msg)"},{"line_number":168,"context_line":"    except Exception as ex:"},{"line_number":169,"context_line":"        msg \u003d _(\"Couldn\u0027t get IPv4 of %(interface)s\""}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_8b21a9a1","line":166,"updated":"2014-10-01 08:31:02.000000000","message":"_LE() I suppose","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"24de5574fc909de7cfc75602ca826636e2e11ad7","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        if address:"},{"line_number":164,"context_line":"            return address[0]"},{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            msg \u003d _(\u0027IPv4 address is not found.: %s\u0027) % out"},{"line_number":167,"context_line":"            raise Exception(msg)"},{"line_number":168,"context_line":"    except Exception as ex:"},{"line_number":169,"context_line":"        msg \u003d _(\"Couldn\u0027t get IPv4 of %(interface)s\""}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_83bd056b","line":166,"in_reply_to":"baa201ad_8b21a9a1","updated":"2014-10-01 15:52:18.000000000","message":"ditto","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"eb092aec589c186d2aa18dd803d7eb5b6d663f80","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            return address[0]"},{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            msg \u003d _(\u0027IPv4 address is not found.: %s\u0027) % out"},{"line_number":167,"context_line":"            raise Exception(msg)"},{"line_number":168,"context_line":"    except Exception as ex:"},{"line_number":169,"context_line":"        msg \u003d _(\"Couldn\u0027t get IPv4 of %(interface)s\""},{"line_number":170,"context_line":"                \" : %(ex)s\") % {\u0027interface\u0027: iface, \u0027ex\u0027: ex}"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_6b864567","line":167,"updated":"2014-10-01 08:31:02.000000000","message":"what do you think about some more specific exception here?","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"24de5574fc909de7cfc75602ca826636e2e11ad7","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            return address[0]"},{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            msg \u003d _(\u0027IPv4 address is not found.: %s\u0027) % out"},{"line_number":167,"context_line":"            raise Exception(msg)"},{"line_number":168,"context_line":"    except Exception as ex:"},{"line_number":169,"context_line":"        msg \u003d _(\"Couldn\u0027t get IPv4 of %(interface)s\""},{"line_number":170,"context_line":"                \" : %(ex)s\") % {\u0027interface\u0027: iface, \u0027ex\u0027: ex}"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_7e27d6b6","line":167,"in_reply_to":"baa201ad_6b864567","updated":"2014-10-01 15:52:18.000000000","message":"This function isn\u0027t supposed to be called directly. In any case, all exceptions from this function will be caught in _get_my_ipv4_address().","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"eb092aec589c186d2aa18dd803d7eb5b6d663f80","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        msg \u003d _(\"Couldn\u0027t get IPv4 of %(interface)s\""},{"line_number":170,"context_line":"                \" : %(ex)s\") % {\u0027interface\u0027: iface, \u0027ex\u0027: ex}"},{"line_number":171,"context_line":"        LOG.error(msg)"},{"line_number":172,"context_line":"        raise Exception(msg)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"class _ModifiedSplitResult(parse.SplitResult):"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_ab802d47","line":172,"updated":"2014-10-01 08:31:02.000000000","message":"same suggestions as below","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"24de5574fc909de7cfc75602ca826636e2e11ad7","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        msg \u003d _(\"Couldn\u0027t get IPv4 of %(interface)s\""},{"line_number":170,"context_line":"                \" : %(ex)s\") % {\u0027interface\u0027: iface, \u0027ex\u0027: ex}"},{"line_number":171,"context_line":"        LOG.error(msg)"},{"line_number":172,"context_line":"        raise Exception(msg)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"class _ModifiedSplitResult(parse.SplitResult):"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_be213ea1","line":172,"in_reply_to":"baa201ad_ab802d47","updated":"2014-10-01 15:52:18.000000000","message":"ditto","commit_id":"847e0fd2878c17729cadf54d7e3d525bb49b457e"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"f567d6f7ea882f80d7e8a0549eb553dab205e051","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                except Exception:"},{"line_number":146,"context_line":"                    pass"},{"line_number":147,"context_line":"    except Exception as ex:"},{"line_number":148,"context_line":"            LOG.error(_LW(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":149,"context_line":"    return LOCALHOST"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_da936bf8","line":148,"updated":"2014-10-01 17:57:25.000000000","message":"The spacing seems off here.","commit_id":"0e3afdd1bf953608576b76eea59f41969006bdc8"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"01d092845a6f4534e682d8a759aaab8a24bb1d5e","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                except Exception:"},{"line_number":146,"context_line":"                    pass"},{"line_number":147,"context_line":"    except Exception as ex:"},{"line_number":148,"context_line":"            LOG.error(_LW(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":149,"context_line":"    return LOCALHOST"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_3dd71125","line":148,"in_reply_to":"baa201ad_da936bf8","updated":"2014-10-01 18:13:01.000000000","message":"Done","commit_id":"0e3afdd1bf953608576b76eea59f41969006bdc8"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"0abf32e15d9a8dca3a26d510294e2f9b0afe0d70","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                except Exception:"},{"line_number":146,"context_line":"                    pass"},{"line_number":147,"context_line":"    except Exception as ex:"},{"line_number":148,"context_line":"        LOG.error(_LW(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":149,"context_line":"    return LOCALHOST"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_5de9357f","line":148,"updated":"2014-10-01 18:31:36.000000000","message":"It looks like all of the _LW\u0027s in this file should be _LE\u0027s because they\u0027re being logged at the error level, not warning.","commit_id":"c5b8648b810e7d53a817554dd8187273775e3ac5"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"f2c4d9e11a71ec78800a723963fa210d1a690e1d","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                try:"},{"line_number":145,"context_line":"                    return _get_ipv4_address_for_interface(iface)"},{"line_number":146,"context_line":"                except Exception:"},{"line_number":147,"context_line":"                    pass"},{"line_number":148,"context_line":"    except Exception as ex:"},{"line_number":149,"context_line":"        LOG.error(_LE(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":150,"context_line":"    return LOCALHOST"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_6a4a3156","line":147,"updated":"2014-10-07 20:59:53.000000000","message":"See my comment below, but I think we should collect the exception\u0027s message here and save it to be logged on line 149 if we ultimately fail to find the address.","commit_id":"d41eba1cd3e550f98d7231f5b24d424c71bd22ee"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"6e0dbf0dadf21a854d4d64fc084baf841db00576","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                try:"},{"line_number":145,"context_line":"                    return _get_ipv4_address_for_interface(iface)"},{"line_number":146,"context_line":"                except Exception:"},{"line_number":147,"context_line":"                    pass"},{"line_number":148,"context_line":"    except Exception as ex:"},{"line_number":149,"context_line":"        LOG.error(_LE(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":150,"context_line":"    return LOCALHOST"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_d6a8f422","line":147,"in_reply_to":"baa201ad_6a4a3156","updated":"2014-10-09 12:22:57.000000000","message":"Done","commit_id":"d41eba1cd3e550f98d7231f5b24d424c71bd22ee"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"f2c4d9e11a71ec78800a723963fa210d1a690e1d","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                except Exception:"},{"line_number":147,"context_line":"                    pass"},{"line_number":148,"context_line":"    except Exception as ex:"},{"line_number":149,"context_line":"        LOG.error(_LE(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":150,"context_line":"    return LOCALHOST"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_a4752fcc","line":149,"updated":"2014-10-07 20:59:53.000000000","message":"I don\u0027t think this should be an error message.  Nothing necessarily blows up if we failed to find the ip, we just return localhost.  I would even go so far as to say this should be INFO level.  It doesn\u0027t necessarily mean anything is wrong.","commit_id":"d41eba1cd3e550f98d7231f5b24d424c71bd22ee"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"6e0dbf0dadf21a854d4d64fc084baf841db00576","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                except Exception:"},{"line_number":147,"context_line":"                    pass"},{"line_number":148,"context_line":"    except Exception as ex:"},{"line_number":149,"context_line":"        LOG.error(_LE(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":150,"context_line":"    return LOCALHOST"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_d691d4f2","line":149,"in_reply_to":"baa201ad_a4752fcc","updated":"2014-10-09 12:22:57.000000000","message":"Done","commit_id":"d41eba1cd3e550f98d7231f5b24d424c71bd22ee"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"f2c4d9e11a71ec78800a723963fa210d1a690e1d","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        if address:"},{"line_number":164,"context_line":"            return address[0]"},{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            msg \u003d _LE(\u0027IPv4 address is not found.: %s\u0027) % out[0]"},{"line_number":167,"context_line":"            raise Exception(msg)"},{"line_number":168,"context_line":"    except Exception as ex:"},{"line_number":169,"context_line":"        msg \u003d _LE(\"Couldn\u0027t get IPv4 of %(interface)s\""}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_a45c4f4c","line":166,"updated":"2014-10-07 20:59:53.000000000","message":"This message is completely ignored in the calling code.  We might as well remove it.\n\nEdit: Or treat it the same way I\u0027m suggesting we treat the one below.","commit_id":"d41eba1cd3e550f98d7231f5b24d424c71bd22ee"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"6e0dbf0dadf21a854d4d64fc084baf841db00576","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        if address:"},{"line_number":164,"context_line":"            return address[0]"},{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            msg \u003d _LE(\u0027IPv4 address is not found.: %s\u0027) % out[0]"},{"line_number":167,"context_line":"            raise Exception(msg)"},{"line_number":168,"context_line":"    except Exception as ex:"},{"line_number":169,"context_line":"        msg \u003d _LE(\"Couldn\u0027t get IPv4 of %(interface)s\""}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_76bae86f","line":166,"in_reply_to":"baa201ad_a45c4f4c","updated":"2014-10-09 12:22:57.000000000","message":"Done","commit_id":"d41eba1cd3e550f98d7231f5b24d424c71bd22ee"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"f2c4d9e11a71ec78800a723963fa210d1a690e1d","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            return address[0]"},{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            msg \u003d _LE(\u0027IPv4 address is not found.: %s\u0027) % out[0]"},{"line_number":167,"context_line":"            raise Exception(msg)"},{"line_number":168,"context_line":"    except Exception as ex:"},{"line_number":169,"context_line":"        msg \u003d _LE(\"Couldn\u0027t get IPv4 of %(interface)s\""},{"line_number":170,"context_line":"                  \" : %(ex)s\") % {\u0027interface\u0027: iface, \u0027ex\u0027: ex}"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_443ba3ea","line":167,"updated":"2014-10-07 20:59:53.000000000","message":"Also, we shouldn\u0027t be raising bare Exceptions.  Can we create an Exception subclass to use in these functions?","commit_id":"d41eba1cd3e550f98d7231f5b24d424c71bd22ee"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"6e0dbf0dadf21a854d4d64fc084baf841db00576","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            return address[0]"},{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            msg \u003d _LE(\u0027IPv4 address is not found.: %s\u0027) % out[0]"},{"line_number":167,"context_line":"            raise Exception(msg)"},{"line_number":168,"context_line":"    except Exception as ex:"},{"line_number":169,"context_line":"        msg \u003d _LE(\"Couldn\u0027t get IPv4 of %(interface)s\""},{"line_number":170,"context_line":"                  \" : %(ex)s\") % {\u0027interface\u0027: iface, \u0027ex\u0027: ex}"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_96ae6c2e","line":167,"in_reply_to":"baa201ad_443ba3ea","updated":"2014-10-09 12:22:57.000000000","message":"Done","commit_id":"d41eba1cd3e550f98d7231f5b24d424c71bd22ee"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"f2c4d9e11a71ec78800a723963fa210d1a690e1d","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    except Exception as ex:"},{"line_number":169,"context_line":"        msg \u003d _LE(\"Couldn\u0027t get IPv4 of %(interface)s\""},{"line_number":170,"context_line":"                  \" : %(ex)s\") % {\u0027interface\u0027: iface, \u0027ex\u0027: ex}"},{"line_number":171,"context_line":"        LOG.error(msg)"},{"line_number":172,"context_line":"        raise Exception(msg)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_6a6151d2","line":171,"updated":"2014-10-07 20:59:53.000000000","message":"This definitely shouldn\u0027t be error level.  We actually swallow these exceptions in the calling code too, which tells me this doesn\u0027t fit the definition of an error and we\u0027re just spamming the logs.\n\nIn fact, I\u0027d kind of like to remove this log call entirely.  We should just raise the exception with the appropriate message here and collect those messages in the caller.  Then, if the whole operation ultimately fails we can log these details since they might be helpful to someone trying to figure out why the ip can\u0027t be found.","commit_id":"d41eba1cd3e550f98d7231f5b24d424c71bd22ee"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"6e0dbf0dadf21a854d4d64fc084baf841db00576","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    except Exception as ex:"},{"line_number":169,"context_line":"        msg \u003d _LE(\"Couldn\u0027t get IPv4 of %(interface)s\""},{"line_number":170,"context_line":"                  \" : %(ex)s\") % {\u0027interface\u0027: iface, \u0027ex\u0027: ex}"},{"line_number":171,"context_line":"        LOG.error(msg)"},{"line_number":172,"context_line":"        raise Exception(msg)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baa201ad_b6ab701d","line":171,"in_reply_to":"baa201ad_6a6151d2","updated":"2014-10-09 12:22:57.000000000","message":"Done","commit_id":"d41eba1cd3e550f98d7231f5b24d424c71bd22ee"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"06031351a1bfca2bf4a52a4bb710f4b919815a86","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    return is_valid_ipv4(address) or is_valid_ipv6(address)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class IPError(Exception):"},{"line_number":104,"context_line":"    \"\"\"Raised on failure to get the IP address.\"\"\""},{"line_number":105,"context_line":"    pass"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_5472f111","line":103,"updated":"2014-10-13 14:58:57.000000000","message":"I\u0027ve missed discussion - could you please inform, why do we need this exception here? We don\u0027t raise in anyway...","commit_id":"d942b85a22bdcf5f8404966c4cc7c6a162bf3b47"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"dfede57ab2b17b150aea930e1f9ce29e6f46d984","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    return is_valid_ipv4(address) or is_valid_ipv6(address)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class IPError(Exception):"},{"line_number":104,"context_line":"    \"\"\"Raised on failure to get the IP address.\"\"\""},{"line_number":105,"context_line":"    pass"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_bdfce140","line":103,"in_reply_to":"baa201ad_5472f111","updated":"2014-10-13 15:24:40.000000000","message":"Just specific exception for log output. Raised at L172, L176 and reraised in L152.","commit_id":"d942b85a22bdcf5f8404966c4cc7c6a162bf3b47"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"5503d1470f423dec89550f959f0d4d9959442368","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    return is_valid_ipv4(address) or is_valid_ipv6(address)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class IPError(Exception):"},{"line_number":104,"context_line":"    \"\"\"Raised on failure to get the IP address.\"\"\""},{"line_number":105,"context_line":"    pass"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_f3a2f149","line":103,"in_reply_to":"baa201ad_6191dd99","updated":"2014-10-14 16:34:02.000000000","message":"How so?  Raising Exception is almost always the wrong thing to do because it makes it impossible to catch without also catching everything else, and creating a subclass of Exception is the simplest way around that.  The only reason not to do this would be if there\u0027s an existing exception we could use instead, but I\u0027m fine with this module defining its own exceptions so I\u0027m not too concerned about that either.","commit_id":"d942b85a22bdcf5f8404966c4cc7c6a162bf3b47"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"612c7623e4a286a0932389e503ae371de2f71b99","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    return is_valid_ipv4(address) or is_valid_ipv6(address)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class IPError(Exception):"},{"line_number":104,"context_line":"    \"\"\"Raised on failure to get the IP address.\"\"\""},{"line_number":105,"context_line":"    pass"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_c0d53cb8","line":103,"in_reply_to":"baa201ad_bdfce140","updated":"2014-10-13 16:05:00.000000000","message":"Originally the code was raising plain Exceptions, which is something we don\u0027t like to do.  I don\u0027t see anything wrong with this solution.","commit_id":"d942b85a22bdcf5f8404966c4cc7c6a162bf3b47"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"81fce83da4948e8c5e0daccc54084a48101d8482","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    return is_valid_ipv4(address) or is_valid_ipv6(address)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class IPError(Exception):"},{"line_number":104,"context_line":"    \"\"\"Raised on failure to get the IP address.\"\"\""},{"line_number":105,"context_line":"    pass"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_6191dd99","line":103,"in_reply_to":"baa201ad_c0d53cb8","updated":"2014-10-14 08:37:27.000000000","message":"IMO, this is not wrong, but rather not required here.","commit_id":"d942b85a22bdcf5f8404966c4cc7c6a162bf3b47"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"06031351a1bfca2bf4a52a4bb710f4b919815a86","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    try:"},{"line_number":117,"context_line":"        csock \u003d socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"},{"line_number":118,"context_line":"        csock.connect((\u0027192.0.2.0\u0027, 80))"},{"line_number":119,"context_line":"        (addr, port) \u003d csock.getsockname()"},{"line_number":120,"context_line":"        csock.close()"},{"line_number":121,"context_line":"        return addr"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_1affb302","line":118,"updated":"2014-10-13 14:58:57.000000000","message":"it can return local IP in case if there is configuration for work with local network. I\u0027d suggest to return \u00278.8.8.8\u0027 here","commit_id":"d942b85a22bdcf5f8404966c4cc7c6a162bf3b47"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"dfede57ab2b17b150aea930e1f9ce29e6f46d984","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    try:"},{"line_number":117,"context_line":"        csock \u003d socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"},{"line_number":118,"context_line":"        csock.connect((\u0027192.0.2.0\u0027, 80))"},{"line_number":119,"context_line":"        (addr, port) \u003d csock.getsockname()"},{"line_number":120,"context_line":"        csock.close()"},{"line_number":121,"context_line":"        return addr"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_bd586158","line":118,"in_reply_to":"baa201ad_1affb302","updated":"2014-10-13 15:24:40.000000000","message":"This address is reserved for documentation use. Is it possible to use it for local network?","commit_id":"d942b85a22bdcf5f8404966c4cc7c6a162bf3b47"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"612c7623e4a286a0932389e503ae371de2f71b99","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    try:"},{"line_number":117,"context_line":"        csock \u003d socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"},{"line_number":118,"context_line":"        csock.connect((\u0027192.0.2.0\u0027, 80))"},{"line_number":119,"context_line":"        (addr, port) \u003d csock.getsockname()"},{"line_number":120,"context_line":"        csock.close()"},{"line_number":121,"context_line":"        return addr"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_e38faa73","line":118,"in_reply_to":"baa201ad_bd586158","updated":"2014-10-13 16:05:00.000000000","message":"We actually use 192.0.2.X addresses for tripleo in our test environments.  I don\u0027t recall exactly why we did that though.\n\nThat said, technically someone could shadow any ip address we choose and the worst that will happen is we return localhost, which is what we would have fallen back to anyway.\n\nSo I\u0027m kind of indifferent on this.  If your code blows up because this fails then you\u0027re on shaky ground to begin with.  The understood fallback behavior of this whole function is \"return localhost\" and callers need to be prepared to handle it.","commit_id":"d942b85a22bdcf5f8404966c4cc7c6a162bf3b47"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"06031351a1bfca2bf4a52a4bb710f4b919815a86","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                try:"},{"line_number":150,"context_line":"                    return _get_ipv4_address_for_interface(iface)"},{"line_number":151,"context_line":"                except Exception:"},{"line_number":152,"context_line":"                    raise"},{"line_number":153,"context_line":"    except Exception as ex:"},{"line_number":154,"context_line":"        LOG.info(_LI(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":155,"context_line":"    return LOCALHOST"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_da6b6b83","line":152,"updated":"2014-10-13 14:58:57.000000000","message":"I really don\u0027t like this constructions","commit_id":"d942b85a22bdcf5f8404966c4cc7c6a162bf3b47"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"612c7623e4a286a0932389e503ae371de2f71b99","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                try:"},{"line_number":150,"context_line":"                    return _get_ipv4_address_for_interface(iface)"},{"line_number":151,"context_line":"                except Exception:"},{"line_number":152,"context_line":"                    raise"},{"line_number":153,"context_line":"    except Exception as ex:"},{"line_number":154,"context_line":"        LOG.info(_LI(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":155,"context_line":"    return LOCALHOST"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_800fb487","line":152,"in_reply_to":"baa201ad_7da2794c","updated":"2014-10-13 16:05:00.000000000","message":"It does nothing now.  The entire try...except block could be removed and it wouldn\u0027t change the behavior in any way because we\u0027re catching and immediately re-raising the same exception.\n\nI would just remove the try...except.","commit_id":"d942b85a22bdcf5f8404966c4cc7c6a162bf3b47"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"c78c12f4e25bd319133f212259481ebe3c3c124c","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                try:"},{"line_number":150,"context_line":"                    return _get_ipv4_address_for_interface(iface)"},{"line_number":151,"context_line":"                except Exception:"},{"line_number":152,"context_line":"                    raise"},{"line_number":153,"context_line":"    except Exception as ex:"},{"line_number":154,"context_line":"        LOG.info(_LI(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":155,"context_line":"    return LOCALHOST"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_63b01ade","line":152,"in_reply_to":"baa201ad_800fb487","updated":"2014-10-13 16:15:04.000000000","message":"my bad, sorry.","commit_id":"d942b85a22bdcf5f8404966c4cc7c6a162bf3b47"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"dfede57ab2b17b150aea930e1f9ce29e6f46d984","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                try:"},{"line_number":150,"context_line":"                    return _get_ipv4_address_for_interface(iface)"},{"line_number":151,"context_line":"                except Exception:"},{"line_number":152,"context_line":"                    raise"},{"line_number":153,"context_line":"    except Exception as ex:"},{"line_number":154,"context_line":"        LOG.info(_LI(\"Couldn\u0027t get IPv4 : %(ex)s\") % {\u0027ex\u0027: ex})"},{"line_number":155,"context_line":"    return LOCALHOST"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa201ad_7da2794c","line":152,"in_reply_to":"baa201ad_da6b6b83","updated":"2014-10-13 15:24:40.000000000","message":"What is wrong with this construction?","commit_id":"d942b85a22bdcf5f8404966c4cc7c6a162bf3b47"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5bdd533458711208030e2b1797dd3716edf0e2b8","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    pass"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def get_my_ip():"},{"line_number":109,"context_line":"    \"\"\"Returns the actual ip of the local machine."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    This code figures out what source address would be used if some traffic"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_a93bc3c6","line":108,"updated":"2014-10-13 16:57:11.000000000","message":"Will this function ever return an IPv6 address, or should we make clear in the documentation (and name?) that it will only return IPv4?","commit_id":"7b7b3083857fa5b9d1291bda821bff00767bd1a3"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"4b68672e8b9beff6b9ac4771beb0d26ccf8892ea","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    try:"},{"line_number":117,"context_line":"        csock \u003d socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"},{"line_number":118,"context_line":"        csock.connect((\u0027192.0.2.0\u0027, 80))"},{"line_number":119,"context_line":"        (addr, port) \u003d csock.getsockname()"},{"line_number":120,"context_line":"        csock.close()"},{"line_number":121,"context_line":"        return addr"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_016f31c6","line":118,"updated":"2014-10-14 08:37:18.000000000","message":"Ben,\n\nI\u0027ve deployed TripleO on my local PC and now I get `192.168.122.1` IP, instead of external.","commit_id":"7b7b3083857fa5b9d1291bda821bff00767bd1a3"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"b558fd0bb1f560f97b62fa011c89627d07500404","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    try:"},{"line_number":117,"context_line":"        csock \u003d socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"},{"line_number":118,"context_line":"        csock.connect((\u0027192.0.2.0\u0027, 80))"},{"line_number":119,"context_line":"        (addr, port) \u003d csock.getsockname()"},{"line_number":120,"context_line":"        csock.close()"},{"line_number":121,"context_line":"        return addr"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_33cc7961","line":118,"in_reply_to":"baa201ad_016f31c6","updated":"2014-10-14 16:27:10.000000000","message":"That\u0027s the default libvirt network.  The addresses used by the seed and all subsequent nodes deployed are 192.0.2.X (the seed is 192.0.2.1 and the others count up from there).","commit_id":"7b7b3083857fa5b9d1291bda821bff00767bd1a3"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3a70e57c2df8dc1a72ec199c7eefaed2c9c835bc","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        interface \u003d gtw[\u0027default\u0027][netifaces.AF_INET][1]"},{"line_number":142,"context_line":"        return netifaces.ifaddresses(interface)[netifaces.AF_INET][0][\u0027addr\u0027]"},{"line_number":143,"context_line":"    except Exception:"},{"line_number":144,"context_line":"        LOG.info(_LI(\"Couldn\u0027t get IPv4\"))"},{"line_number":145,"context_line":"    return LOCALHOST"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_69765c08","line":144,"updated":"2014-11-19 17:55:18.000000000","message":"We will want to add more detail to this log message. I\u0027ve attached a follow-up patch: https://review.openstack.org/135680","commit_id":"ed9a695564822004336d4551ca8a23d79bdeb568"}]}
