)]}'
{"ironic_lib/mdns.py":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"4a80e2ff1e94a1f46a15159d8c24c1a4b546a9d8","unresolved":false,"context_lines":[{"line_number":13,"context_line":"\"\"\"Multicast DNS implementation for API discovery."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This implementation follows RFC 6763 as clarified by the API SIG guideline"},{"line_number":16,"context_line":"https://review.openstack.org/651222."},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import collections"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_f45c6c7f","line":16,"updated":"2019-04-25 13:50:49.000000000","message":"nit: let\u0027s use the opendev url ?","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"95eeb5533065f2bdffa749c5e66a9554ec70824a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"\"\"\"Multicast DNS implementation for API discovery."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This implementation follows RFC 6763 as clarified by the API SIG guideline"},{"line_number":16,"context_line":"https://review.openstack.org/651222."},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import collections"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_f770eea7","line":16,"in_reply_to":"ffb9cba7_f45c6c7f","updated":"2019-04-25 13:57:57.000000000","message":"Done","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"4a80e2ff1e94a1f46a15159d8c24c1a4b546a9d8","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"opts \u003d ["},{"line_number":33,"context_line":"    cfg.IntOpt(\u0027registration_attempts\u0027,"},{"line_number":34,"context_line":"               min\u003d1, default\u003d5,"},{"line_number":35,"context_line":"               help\u003d\u0027Number of attempts to register a service. Currently \u0027"},{"line_number":36,"context_line":"                    \u0027has to be larger than 1 because of race conditions \u0027"},{"line_number":37,"context_line":"                    \u0027in the zeroconf library.\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_9472d010","line":34,"range":{"start_line":34,"start_character":15,"end_line":34,"end_character":20},"updated":"2019-04-25 13:50:49.000000000","message":"considering the issue in zeroconf, I would set the min to 2","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"95eeb5533065f2bdffa749c5e66a9554ec70824a","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"opts \u003d ["},{"line_number":33,"context_line":"    cfg.IntOpt(\u0027registration_attempts\u0027,"},{"line_number":34,"context_line":"               min\u003d1, default\u003d5,"},{"line_number":35,"context_line":"               help\u003d\u0027Number of attempts to register a service. Currently \u0027"},{"line_number":36,"context_line":"                    \u0027has to be larger than 1 because of race conditions \u0027"},{"line_number":37,"context_line":"                    \u0027in the zeroconf library.\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_577a1a88","line":34,"range":{"start_line":34,"start_character":15,"end_line":34,"end_character":20},"in_reply_to":"ffb9cba7_9472d010","updated":"2019-04-25 13:57:57.000000000","message":"I hope it gets fixed one day :) Anyway, the value of 1 is correct technically, so I\u0027d keep it.","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"b4a55ad8f836a5585c147ca97214c88b3de9ccb7","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        :param service_type: OpenStack service type, e.g. \"baremetal\"."},{"line_number":73,"context_line":"        :param endpoint: full endpoint to reach the service."},{"line_number":74,"context_line":"        :param params: optional properties as a dictionary."},{"line_number":75,"context_line":"        \"\"\""},{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            parsed \u003d _parse_endpoint(endpoint)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_3d15079d","line":74,"updated":"2019-04-25 15:27:01.000000000","message":"maybe add a raise section","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"60626c9f202dd5ea64a3966dcb80316124db2ebc","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            for attempt in range(CONF.mdns.registration_attempts):"},{"line_number":102,"context_line":"                try:"},{"line_number":103,"context_line":"                    self._zc.register_service(info)"},{"line_number":104,"context_line":"                except zeroconf.NonUniqueNameException:"},{"line_number":105,"context_line":"                    LOG.debug(\u0027Could not register %s - conflict\u0027, info)"},{"line_number":106,"context_line":"                    if attempt \u003d\u003d CONF.mdns.registration_attempts - 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_772f1ea1","line":103,"range":{"start_line":103,"start_character":46,"end_line":103,"end_character":50},"updated":"2019-04-25 14:36:43.000000000","message":"default DNS record TTL seems to be 60 secs, does it mean that service registration will expire after that? should we note that?","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"ace6c18d93f23321f6be2469d0d24ca9b9db9e9e","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            for attempt in range(CONF.mdns.registration_attempts):"},{"line_number":102,"context_line":"                try:"},{"line_number":103,"context_line":"                    self._zc.register_service(info)"},{"line_number":104,"context_line":"                except zeroconf.NonUniqueNameException:"},{"line_number":105,"context_line":"                    LOG.debug(\u0027Could not register %s - conflict\u0027, info)"},{"line_number":106,"context_line":"                    if attempt \u003d\u003d CONF.mdns.registration_attempts - 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_71c6389d","line":103,"range":{"start_line":103,"start_character":46,"end_line":103,"end_character":50},"in_reply_to":"ffb9cba7_35667b53","updated":"2019-04-26 13:30:30.000000000","message":"the Reaper should renew the record before expiring:\nhttps://github.com/jstasiak/python-zeroconf/blob/master/zeroconf.py#L1227","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"72d38de2b40676a1c34b748e119beca0e20b89b3","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            for attempt in range(CONF.mdns.registration_attempts):"},{"line_number":102,"context_line":"                try:"},{"line_number":103,"context_line":"                    self._zc.register_service(info)"},{"line_number":104,"context_line":"                except zeroconf.NonUniqueNameException:"},{"line_number":105,"context_line":"                    LOG.debug(\u0027Could not register %s - conflict\u0027, info)"},{"line_number":106,"context_line":"                    if attempt \u003d\u003d CONF.mdns.registration_attempts - 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_35667b53","line":103,"range":{"start_line":103,"start_character":46,"end_line":103,"end_character":50},"in_reply_to":"ffb9cba7_43bd78d6","updated":"2019-04-25 17:56:55.000000000","message":"\u003e Ironic *is* the mDNS server. \n\nAh, I did not get that!\n\nHaving it in a green thread seems more reliable to me though...\n\n\u003e TTL matters for a different case, that is largely irrelevant for us: if IPA caches the address, for how long should it keep it?\n\nI hope this TTL does not affect ZeroConf mDNS server itself... Will it expire its own record after TTL? There seem to be bits of code [1] mentioning record expiration...\n\n1. https://github.com/jstasiak/python-zeroconf/blob/master/zeroconf.py#L1228","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"ea1e41d91aa069b89e7b5b96e5ac82507d81c4f1","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            for attempt in range(CONF.mdns.registration_attempts):"},{"line_number":102,"context_line":"                try:"},{"line_number":103,"context_line":"                    self._zc.register_service(info)"},{"line_number":104,"context_line":"                except zeroconf.NonUniqueNameException:"},{"line_number":105,"context_line":"                    LOG.debug(\u0027Could not register %s - conflict\u0027, info)"},{"line_number":106,"context_line":"                    if attempt \u003d\u003d CONF.mdns.registration_attempts - 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_88c62f48","line":103,"range":{"start_line":103,"start_character":46,"end_line":103,"end_character":50},"in_reply_to":"ffb9cba7_68a5fbb4","updated":"2019-04-25 16:09:55.000000000","message":"Perhaps I am missing the big picture (I read the Story)...\n\nWhat is the role of mDNS server? Is it to just cache service announcements and respond to the new coming clients whenever service provider is not responding to mDNS queries anymore?","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"9cc1318e97ee5da9122809ec201c2ab963e6dade","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            for attempt in range(CONF.mdns.registration_attempts):"},{"line_number":102,"context_line":"                try:"},{"line_number":103,"context_line":"                    self._zc.register_service(info)"},{"line_number":104,"context_line":"                except zeroconf.NonUniqueNameException:"},{"line_number":105,"context_line":"                    LOG.debug(\u0027Could not register %s - conflict\u0027, info)"},{"line_number":106,"context_line":"                    if attempt \u003d\u003d CONF.mdns.registration_attempts - 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_c3af28e1","line":103,"range":{"start_line":103,"start_character":46,"end_line":103,"end_character":50},"in_reply_to":"ffb9cba7_68cbbb1d","updated":"2019-04-25 16:32:38.000000000","message":"Let me expand on the process:\n\nIronic conductor calls `zc.register_service`, that causes a one-time mDNS message which is received by the mDNS server and cached.\n\nOnce IPA comes up and calls `zc.get_service_info()`, a mDNS lookup query goes out, reaches mDNS server which responds from its cache.\n\nIs that the work flow we are aiming at?\n\nMy concern is this TTL - for how long the record stays in cache? Will the record be  available to IPA when it needs it?","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d4df3746c936a8b8c01d9142004e1f23a503c3d6","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            for attempt in range(CONF.mdns.registration_attempts):"},{"line_number":102,"context_line":"                try:"},{"line_number":103,"context_line":"                    self._zc.register_service(info)"},{"line_number":104,"context_line":"                except zeroconf.NonUniqueNameException:"},{"line_number":105,"context_line":"                    LOG.debug(\u0027Could not register %s - conflict\u0027, info)"},{"line_number":106,"context_line":"                    if attempt \u003d\u003d CONF.mdns.registration_attempts - 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_c213a65b","line":103,"range":{"start_line":103,"start_character":46,"end_line":103,"end_character":50},"in_reply_to":"ffb9cba7_772f1ea1","updated":"2019-04-25 14:41:59.000000000","message":"the server renews DNS records periodically. but we probably need to be able to tune the TTL.. I\u0027ll probably add more options in a follow-up or next patchset.","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"434b26c1c489fea969cd22e46a542fed684afdf7","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            for attempt in range(CONF.mdns.registration_attempts):"},{"line_number":102,"context_line":"                try:"},{"line_number":103,"context_line":"                    self._zc.register_service(info)"},{"line_number":104,"context_line":"                except zeroconf.NonUniqueNameException:"},{"line_number":105,"context_line":"                    LOG.debug(\u0027Could not register %s - conflict\u0027, info)"},{"line_number":106,"context_line":"                    if attempt \u003d\u003d CONF.mdns.registration_attempts - 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_68cbbb1d","line":103,"range":{"start_line":103,"start_character":46,"end_line":103,"end_character":50},"in_reply_to":"ffb9cba7_88c62f48","updated":"2019-04-25 16:15:31.000000000","message":"Which service provider are you referring to? The server, well, is the service provider in your definition perhaps? We have ironic announcing mDNS information and responding to queries and we have IPA requesting mDNS information.","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d094c151a64be3fd6f3aadccef0940ce162753db","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            for attempt in range(CONF.mdns.registration_attempts):"},{"line_number":102,"context_line":"                try:"},{"line_number":103,"context_line":"                    self._zc.register_service(info)"},{"line_number":104,"context_line":"                except zeroconf.NonUniqueNameException:"},{"line_number":105,"context_line":"                    LOG.debug(\u0027Could not register %s - conflict\u0027, info)"},{"line_number":106,"context_line":"                    if attempt \u003d\u003d CONF.mdns.registration_attempts - 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_68a5fbb4","line":103,"range":{"start_line":103,"start_character":46,"end_line":103,"end_character":50},"in_reply_to":"ffb9cba7_bd601703","updated":"2019-04-25 16:00:30.000000000","message":"Mmm, no, the server (e.g. ironic) will renew the records periodically by multicasting them. This logic is hidden inside the zeroconf library though.","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"a1e80b25b482f1e0457b4baacec3fa12b44a17bf","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            for attempt in range(CONF.mdns.registration_attempts):"},{"line_number":102,"context_line":"                try:"},{"line_number":103,"context_line":"                    self._zc.register_service(info)"},{"line_number":104,"context_line":"                except zeroconf.NonUniqueNameException:"},{"line_number":105,"context_line":"                    LOG.debug(\u0027Could not register %s - conflict\u0027, info)"},{"line_number":106,"context_line":"                    if attempt \u003d\u003d CONF.mdns.registration_attempts - 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_bd601703","line":103,"range":{"start_line":103,"start_character":46,"end_line":103,"end_character":50},"in_reply_to":"ffb9cba7_c213a65b","updated":"2019-04-25 15:35:31.000000000","message":"So if service provider capped DNS record TTL, that caching DNS server will not purge the record once it reached TTL in cache, but \"renew\" it somehow?\n\nWhat is \"renewal\" in this case? Pardon my mDNS ignorance.","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3167f9fe66e53599915d194fec873cf37a13be3e","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            for attempt in range(CONF.mdns.registration_attempts):"},{"line_number":102,"context_line":"                try:"},{"line_number":103,"context_line":"                    self._zc.register_service(info)"},{"line_number":104,"context_line":"                except zeroconf.NonUniqueNameException:"},{"line_number":105,"context_line":"                    LOG.debug(\u0027Could not register %s - conflict\u0027, info)"},{"line_number":106,"context_line":"                    if attempt \u003d\u003d CONF.mdns.registration_attempts - 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_43bd78d6","line":103,"range":{"start_line":103,"start_character":46,"end_line":103,"end_character":50},"in_reply_to":"ffb9cba7_c3af28e1","updated":"2019-04-25 16:42:50.000000000","message":"\u003e Ironic conductor calls `zc.register_service`, that causes a one-time mDNS message which is received by the mDNS server and cached.\n\nIronic *is* the mDNS server. The messages are sent for other mDNS peers to learn about the new server and for conflict resolutions\n\n\u003e Once IPA comes up and calls `zc.get_service_info()`, a mDNS lookup query goes out, reaches mDNS server which responds from its cache.\n\nYes, it reaches Ironic and Ironic responds.\n\n\u003e My concern is this TTL - for how long the record stays in cache? Will the record be  available to IPA when it needs it?\n\nI think my correction above actually solves this concern. While Ironic is alive, it can always respond to the request. \n\nTTL matters for a different case, that is largely irrelevant for us: if IPA caches the address, for how long should it keep it?","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"60626c9f202dd5ea64a3966dcb80316124db2ebc","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            port \u003d 80"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    hostname \u003d url.hostname"},{"line_number":141,"context_line":"    # FIXME(dtantsur): the zeroconf library does not support IPv6, use IPv4"},{"line_number":142,"context_line":"    # only resolving for now."},{"line_number":143,"context_line":"    ip \u003d socket.gethostbyname(hostname)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_57321aa9","line":140,"range":{"start_line":140,"start_character":15,"end_line":140,"end_character":27},"updated":"2019-04-25 14:36:43.000000000","message":"I wonder of `netloc` is more official?","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"b4a55ad8f836a5585c147ca97214c88b3de9ccb7","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            port \u003d 80"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    hostname \u003d url.hostname"},{"line_number":141,"context_line":"    # FIXME(dtantsur): the zeroconf library does not support IPv6, use IPv4"},{"line_number":142,"context_line":"    # only resolving for now."},{"line_number":143,"context_line":"    ip \u003d socket.gethostbyname(hostname)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_3d90a743","line":140,"range":{"start_line":140,"start_character":15,"end_line":140,"end_character":27},"in_reply_to":"ffb9cba7_222642b9","updated":"2019-04-25 15:27:01.000000000","message":"AFAIK netloc includes username, password, host and port, but only host is mandatory\nalthough I think in this case this should be ok","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"a1e80b25b482f1e0457b4baacec3fa12b44a17bf","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            port \u003d 80"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    hostname \u003d url.hostname"},{"line_number":141,"context_line":"    # FIXME(dtantsur): the zeroconf library does not support IPv6, use IPv4"},{"line_number":142,"context_line":"    # only resolving for now."},{"line_number":143,"context_line":"    ip \u003d socket.gethostbyname(hostname)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_1d3fe3d6","line":140,"range":{"start_line":140,"start_character":15,"end_line":140,"end_character":27},"in_reply_to":"ffb9cba7_3d90a743","updated":"2019-04-25 15:35:31.000000000","message":"yes, hostname is better","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d4df3746c936a8b8c01d9142004e1f23a503c3d6","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        else:"},{"line_number":138,"context_line":"            port \u003d 80"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    hostname \u003d url.hostname"},{"line_number":141,"context_line":"    # FIXME(dtantsur): the zeroconf library does not support IPv6, use IPv4"},{"line_number":142,"context_line":"    # only resolving for now."},{"line_number":143,"context_line":"    ip \u003d socket.gethostbyname(hostname)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_222642b9","line":140,"range":{"start_line":140,"start_character":15,"end_line":140,"end_character":27},"in_reply_to":"ffb9cba7_57321aa9","updated":"2019-04-25 14:41:59.000000000","message":"netloc seems to include a port, no?","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"60626c9f202dd5ea64a3966dcb80316124db2ebc","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    hostname \u003d url.hostname"},{"line_number":141,"context_line":"    # FIXME(dtantsur): the zeroconf library does not support IPv6, use IPv4"},{"line_number":142,"context_line":"    # only resolving for now."},{"line_number":143,"context_line":"    ip \u003d socket.gethostbyname(hostname)"},{"line_number":144,"context_line":"    if ip \u003d\u003d hostname:"},{"line_number":145,"context_line":"        # we need a host name for the service record. if what we have in"},{"line_number":146,"context_line":"        # the catalog is an IP address, use the local hostname instead"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_37bd26d8","line":143,"range":{"start_line":143,"start_character":16,"end_line":143,"end_character":29},"updated":"2019-04-25 14:36:43.000000000","message":"nit: this can throw, may be that\u0027s OK?","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d4df3746c936a8b8c01d9142004e1f23a503c3d6","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    hostname \u003d url.hostname"},{"line_number":141,"context_line":"    # FIXME(dtantsur): the zeroconf library does not support IPv6, use IPv4"},{"line_number":142,"context_line":"    # only resolving for now."},{"line_number":143,"context_line":"    ip \u003d socket.gethostbyname(hostname)"},{"line_number":144,"context_line":"    if ip \u003d\u003d hostname:"},{"line_number":145,"context_line":"        # we need a host name for the service record. if what we have in"},{"line_number":146,"context_line":"        # the catalog is an IP address, use the local hostname instead"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_a218f274","line":143,"range":{"start_line":143,"start_character":16,"end_line":143,"end_character":29},"in_reply_to":"ffb9cba7_37bd26d8","updated":"2019-04-25 14:41:59.000000000","message":"It\u0027s caught on line 78","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"60626c9f202dd5ea64a3966dcb80316124db2ebc","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        params[\u0027protocol\u0027] \u003d url.scheme"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    # zeroconf is pretty picky about this"},{"line_number":160,"context_line":"    if hostname and not hostname.endswith(\u0027.\u0027):"},{"line_number":161,"context_line":"        hostname \u003d hostname + \u0027.\u0027"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    return _endpoint(ip, hostname, port, params)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_979ad26b","line":160,"range":{"start_line":160,"start_character":7,"end_line":160,"end_character":15},"updated":"2019-04-25 14:36:43.000000000","message":"nit: if at line #147 it would be \u0027\u0027 (not None), this condition can be removed.","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d4df3746c936a8b8c01d9142004e1f23a503c3d6","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        params[\u0027protocol\u0027] \u003d url.scheme"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    # zeroconf is pretty picky about this"},{"line_number":160,"context_line":"    if hostname and not hostname.endswith(\u0027.\u0027):"},{"line_number":161,"context_line":"        hostname \u003d hostname + \u0027.\u0027"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    return _endpoint(ip, hostname, port, params)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_c241663b","line":160,"range":{"start_line":160,"start_character":7,"end_line":160,"end_character":15},"in_reply_to":"ffb9cba7_979ad26b","updated":"2019-04-25 14:41:59.000000000","message":"probably. dunno, I feel like None for \"no value\" is a bit cleaner.","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"a1e80b25b482f1e0457b4baacec3fa12b44a17bf","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        params[\u0027protocol\u0027] \u003d url.scheme"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    # zeroconf is pretty picky about this"},{"line_number":160,"context_line":"    if hostname and not hostname.endswith(\u0027.\u0027):"},{"line_number":161,"context_line":"        hostname \u003d hostname + \u0027.\u0027"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    return _endpoint(ip, hostname, port, params)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_bd0ed738","line":160,"range":{"start_line":160,"start_character":7,"end_line":160,"end_character":15},"in_reply_to":"ffb9cba7_c241663b","updated":"2019-04-25 15:35:31.000000000","message":"it seems hostname is None by default, so disregard this nit","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"60626c9f202dd5ea64a3966dcb80316124db2ebc","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    # zeroconf is pretty picky about this"},{"line_number":160,"context_line":"    if hostname and not hostname.endswith(\u0027.\u0027):"},{"line_number":161,"context_line":"        hostname \u003d hostname + \u0027.\u0027"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    return _endpoint(ip, hostname, port, params)"},{"line_number":164,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_9773b24d","line":161,"range":{"start_line":161,"start_character":18,"end_line":161,"end_character":19},"updated":"2019-04-25 14:36:43.000000000","message":"nit: +\u003d","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d4df3746c936a8b8c01d9142004e1f23a503c3d6","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    # zeroconf is pretty picky about this"},{"line_number":160,"context_line":"    if hostname and not hostname.endswith(\u0027.\u0027):"},{"line_number":161,"context_line":"        hostname \u003d hostname + \u0027.\u0027"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    return _endpoint(ip, hostname, port, params)"},{"line_number":164,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_a246b24e","line":161,"range":{"start_line":161,"start_character":18,"end_line":161,"end_character":19},"in_reply_to":"ffb9cba7_9773b24d","updated":"2019-04-25 14:41:59.000000000","message":"will fix if I have to respin","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"b4a55ad8f836a5585c147ca97214c88b3de9ccb7","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    \"\"\"Get an endpoint and its properties from mDNS."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    :param service_type: OpenStack service type."},{"line_number":170,"context_line":"    :returns: tuple (endpoint URL, properties as a dict)."},{"line_number":171,"context_line":"    \"\"\""},{"line_number":172,"context_line":"    delay \u003d 0.1"},{"line_number":173,"context_line":"    for attempt in range(CONF.mdns.lookup_attempts):"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_9d1d13bf","line":170,"updated":"2019-04-25 15:27:01.000000000","message":"maybe add a raise section","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"60626c9f202dd5ea64a3966dcb80316124db2ebc","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        name \u003d \u0027%s.%s\u0027 % (service_type, _MDNS_DOMAIN)"},{"line_number":176,"context_line":"        info \u003d zc.get_service_info(name, name)"},{"line_number":177,"context_line":"        if not info:"},{"line_number":178,"context_line":"            if attempt \u003d\u003d CONF.mdns.lookup_attempts - 1:"},{"line_number":179,"context_line":"                raise exception.ServiceLookupFailure(service\u003dservice_type)"},{"line_number":180,"context_line":"            else:"},{"line_number":181,"context_line":"                time.sleep(delay)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_1704a27a","line":178,"range":{"start_line":178,"start_character":0,"end_line":178,"end_character":56},"updated":"2019-04-25 14:36:43.000000000","message":"nit: may be you could remove this condition if the exception on the next line is moved below the loop","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d4df3746c936a8b8c01d9142004e1f23a503c3d6","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        name \u003d \u0027%s.%s\u0027 % (service_type, _MDNS_DOMAIN)"},{"line_number":176,"context_line":"        info \u003d zc.get_service_info(name, name)"},{"line_number":177,"context_line":"        if not info:"},{"line_number":178,"context_line":"            if attempt \u003d\u003d CONF.mdns.lookup_attempts - 1:"},{"line_number":179,"context_line":"                raise exception.ServiceLookupFailure(service\u003dservice_type)"},{"line_number":180,"context_line":"            else:"},{"line_number":181,"context_line":"                time.sleep(delay)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_22a962de","line":178,"range":{"start_line":178,"start_character":0,"end_line":178,"end_character":56},"in_reply_to":"ffb9cba7_1704a27a","updated":"2019-04-25 14:41:59.000000000","message":"will fix if I have to respin","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"60626c9f202dd5ea64a3966dcb80316124db2ebc","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        if not info:"},{"line_number":178,"context_line":"            if attempt \u003d\u003d CONF.mdns.lookup_attempts - 1:"},{"line_number":179,"context_line":"                raise exception.ServiceLookupFailure(service\u003dservice_type)"},{"line_number":180,"context_line":"            else:"},{"line_number":181,"context_line":"                time.sleep(delay)"},{"line_number":182,"context_line":"                delay *\u003d 2"},{"line_number":183,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_d79e0a53","line":180,"range":{"start_line":180,"start_character":12,"end_line":180,"end_character":16},"updated":"2019-04-25 14:36:43.000000000","message":"nit: else not needed","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"60626c9f202dd5ea64a3966dcb80316124db2ebc","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            # Otherwise use the provided hostname."},{"line_number":202,"context_line":"            host \u003d info.server.rstrip(\u0027.\u0027)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        return (\u0027{proto}://{host}:{port}{path}\u0027.format(proto\u003dprotocol,"},{"line_number":205,"context_line":"                                                       host\u003dhost,"},{"line_number":206,"context_line":"                                                       port\u003dinfo.port,"},{"line_number":207,"context_line":"                                                       path\u003dpath),"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_d7c7ea44","line":204,"range":{"start_line":204,"start_character":15,"end_line":204,"end_character":47},"updated":"2019-04-25 14:36:43.000000000","message":"nit: there is `urlunparse` function","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d4df3746c936a8b8c01d9142004e1f23a503c3d6","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            # Otherwise use the provided hostname."},{"line_number":202,"context_line":"            host \u003d info.server.rstrip(\u0027.\u0027)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        return (\u0027{proto}://{host}:{port}{path}\u0027.format(proto\u003dprotocol,"},{"line_number":205,"context_line":"                                                       host\u003dhost,"},{"line_number":206,"context_line":"                                                       port\u003dinfo.port,"},{"line_number":207,"context_line":"                                                       path\u003dpath),"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_82928e9d","line":204,"range":{"start_line":204,"start_character":15,"end_line":204,"end_character":47},"in_reply_to":"ffb9cba7_d7c7ea44","updated":"2019-04-25 14:41:59.000000000","message":"ack","commit_id":"ccc65bfcf5a7bef849ade3db2cdf7ccc50ab3102"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"10a2b5aa4f4732b78893f8618db528fcc6b930f7","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        .. note::"},{"line_number":184,"context_line":"            If another server is running for the same services, it will"},{"line_number":185,"context_line":"            re-register them immediately."},{"line_number":186,"context_line":"        \"\"\""},{"line_number":187,"context_line":"        for info in self._registered:"},{"line_number":188,"context_line":"            try:"},{"line_number":189,"context_line":"                self._zc.unregister_service(info)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfbec78f_ae3a5fe4","line":186,"updated":"2019-05-05 03:52:16.000000000","message":"Might be unrelated with this patch, but I think it\u0027s still in the big picture. I wonder if we have something like takeover for the mDNS, e.g. a periodic task to keep registering the service? How will each ironic service cooperate to provide the service announcement?","commit_id":"91e2ba7534c84dd7c317fcc31dd303d27d87ec95"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7290a45c818f6fb88b647f86330cdedaa158913a","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        .. note::"},{"line_number":184,"context_line":"            If another server is running for the same services, it will"},{"line_number":185,"context_line":"            re-register them immediately."},{"line_number":186,"context_line":"        \"\"\""},{"line_number":187,"context_line":"        for info in self._registered:"},{"line_number":188,"context_line":"            try:"},{"line_number":189,"context_line":"                self._zc.unregister_service(info)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dfbec78f_26d4e1bc","line":186,"in_reply_to":"dfbec78f_ae3a5fe4","updated":"2019-05-13 09:27:57.000000000","message":"The mDNS RFC accounts for HA configurations, in which several announcers (in our case conductors) announce the same thing.","commit_id":"91e2ba7534c84dd7c317fcc31dd303d27d87ec95"}]}
