)]}'
{"tripleo_common/image/image_uploader.py":[{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"6c20255b3c2245278aaf95e12f8ed53fa3418d44","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                for addr in addrs[netifaces.AF_INET6]]"},{"line_number":116,"context_line":"        # Save the first address on the interface in case no hosts entries"},{"line_number":117,"context_line":"        address \u003d str(addrs[0])"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    with open(\u0027/etc/hosts\u0027, \u0027r\u0027) as hostsfile:"},{"line_number":120,"context_line":"        hosts \u003d hostsfile.read()"},{"line_number":121,"context_line":"    # Get only the \u003cname\u003e.ctlplane.\u003cdomain\u003e entries"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_6aa628ae","line":118,"updated":"2019-10-09 22:11:41.000000000","message":"Rather than parse /etc/hosts can you parse the output of executing `getent hosts`? This would be less error prone since /etc/hosts is a database and getent\u0027s job is to parse it.\n\nIts a shame /etc/hosts has multiple lines for the same IP address. If there was just one line you could just call socket.gethostbyaddr() and look for a \u003cname\u003e.ctlplane.\u003cdomain\u003e item","commit_id":"d419dcd836b1381b770c8a2a3b4b927f7e7e0645"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"f4eb5e792ebf35aeb5ccc86824031d39dfb953a4","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                for addr in addrs[netifaces.AF_INET6]]"},{"line_number":116,"context_line":"        # Save the first address on the interface in case no hosts entries"},{"line_number":117,"context_line":"        address \u003d str(addrs[0])"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    with open(\u0027/etc/hosts\u0027, \u0027r\u0027) as hostsfile:"},{"line_number":120,"context_line":"        hosts \u003d hostsfile.read()"},{"line_number":121,"context_line":"    # Get only the \u003cname\u003e.ctlplane.\u003cdomain\u003e entries"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_054d2599","line":118,"in_reply_to":"3fa7e38b_6aa628ae","updated":"2019-10-10 00:00:29.000000000","message":"Thanks Steve, that\u0027s a good idea.","commit_id":"d419dcd836b1381b770c8a2a3b4b927f7e7e0645"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"6c20255b3c2245278aaf95e12f8ed53fa3418d44","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        if netaddr.IPAddress(address).version \u003d\u003d 6:"},{"line_number":135,"context_line":"            raise ImageInvalidRegistryAddress("},{"line_number":136,"context_line":"                \u0027Registry address cannot be IPv6 address. Add entry in \u0027"},{"line_number":137,"context_line":"                \u0027/etc/hosts.\u0027)"},{"line_number":138,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":139,"context_line":"        pass"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_4ad7acef","line":137,"updated":"2019-10-09 22:11:41.000000000","message":"Is the issue here is the address ::, and appending :8787 to the end causing parsing issues? If so, the ipv6 address could be wrapped in []. (this may require more fixes below in host:port parsing)","commit_id":"d419dcd836b1381b770c8a2a3b4b927f7e7e0645"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"f751d0ee924a20ca354165f4abeb9d17e0949243","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        if netaddr.IPAddress(address).version \u003d\u003d 6:"},{"line_number":135,"context_line":"            raise ImageInvalidRegistryAddress("},{"line_number":136,"context_line":"                \u0027Registry address cannot be IPv6 address. Add entry in \u0027"},{"line_number":137,"context_line":"                \u0027/etc/hosts.\u0027)"},{"line_number":138,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":139,"context_line":"        pass"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_8a04c44b","line":137,"in_reply_to":"3fa7e38b_4ad7acef","updated":"2019-10-09 22:33:03.000000000","message":"oh, now I read https://github.com/containers/libpod/issues/3516","commit_id":"d419dcd836b1381b770c8a2a3b4b927f7e7e0645"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"f4eb5e792ebf35aeb5ccc86824031d39dfb953a4","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        if netaddr.IPAddress(address).version \u003d\u003d 6:"},{"line_number":135,"context_line":"            raise ImageInvalidRegistryAddress("},{"line_number":136,"context_line":"                \u0027Registry address cannot be IPv6 address. Add entry in \u0027"},{"line_number":137,"context_line":"                \u0027/etc/hosts.\u0027)"},{"line_number":138,"context_line":"    except netaddr.core.AddrFormatError:"},{"line_number":139,"context_line":"        pass"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_4556bd2c","line":137,"in_reply_to":"3fa7e38b_8a04c44b","updated":"2019-10-10 00:00:29.000000000","message":"yeah ... go look up the regex stuff they are doing in golang to parse the image reference. Looking at that I kind of understand that they don\u0027t want to fix this.","commit_id":"d419dcd836b1381b770c8a2a3b4b927f7e7e0645"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"47e332dcf293304a8b4bcb4352048b206087650e","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        subprocess.check_call([\u0027getent\u0027, \u0027hosts\u0027, ctlplane_hostname])"},{"line_number":105,"context_line":"        address \u003d ctlplane_hostname"},{"line_number":106,"context_line":"    except subprocess.CalledProcessError:"},{"line_number":107,"context_line":"        address \u003d \u0027localhost\u0027"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    return \u0027%s:%s\u0027 % (address, \u00278787\u0027)"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_40730b17","line":107,"range":{"start_line":107,"start_character":8,"end_line":107,"end_character":29},"updated":"2019-10-10 02:00:22.000000000","message":"with the switch to using the name for LocalContainerRegistry in https://review.opendev.org/687388 using localhost won\u0027t work. It probably did\u0027nt work when setting the ip address in the virtual host either.\n\nI\u0027ll update this to raise an error tomorrow.","commit_id":"6badf5bf6da505cfa7ac6ebe9838e7284d8774c0"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"f66881d083948381416683e74fa66132e80d6291","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        subprocess.check_call([\u0027getent\u0027, \u0027hosts\u0027, ctlplane_hostname])"},{"line_number":105,"context_line":"        address \u003d ctlplane_hostname"},{"line_number":106,"context_line":"    except subprocess.CalledProcessError:"},{"line_number":107,"context_line":"        address \u003d \u0027localhost\u0027"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    return \u0027%s:%s\u0027 % (address, \u00278787\u0027)"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_c1c5ac5d","line":107,"range":{"start_line":107,"start_character":8,"end_line":107,"end_character":29},"in_reply_to":"3fa7e38b_40730b17","updated":"2019-10-10 22:01:04.000000000","message":"yeah, localhost never worked except for deploying containerized undercloud","commit_id":"6badf5bf6da505cfa7ac6ebe9838e7284d8774c0"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"d8472c49186f29220a3406a38800616191b78a78","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"def get_undercloud_registry():"},{"line_number":101,"context_line":"    ctlplane_hostname \u003d \u0027.\u0027.join([socket.gethostname().split(\u0027.\u0027)[0],"},{"line_number":102,"context_line":"                                  \u0027ctlplane\u0027, \u0027localdomain\u0027])"},{"line_number":103,"context_line":"    try:"},{"line_number":104,"context_line":"        subprocess.check_call([\u0027getent\u0027, \u0027hosts\u0027, ctlplane_hostname])"},{"line_number":105,"context_line":"        address \u003d ctlplane_hostname"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_5c344893","line":102,"range":{"start_line":102,"start_character":47,"end_line":102,"end_character":58},"updated":"2019-10-10 16:39:04.000000000","message":"we cannot assume this is localdomain. see: https://review.opendev.org/#/c/687347/3/tripleoclient/v1/overcloud_deploy.py@131","commit_id":"21dad3caf31189abc0a2a17836769e1add27ca73"},{"author":{"_account_id":4571,"name":"Steve Baker","email":"sbaker@redhat.com","username":"steve-stevebaker"},"change_message_id":"f66881d083948381416683e74fa66132e80d6291","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"def get_undercloud_registry():"},{"line_number":101,"context_line":"    ctlplane_hostname \u003d \u0027.\u0027.join([socket.gethostname().split(\u0027.\u0027)[0],"},{"line_number":102,"context_line":"                                  \u0027ctlplane\u0027, \u0027localdomain\u0027])"},{"line_number":103,"context_line":"    try:"},{"line_number":104,"context_line":"        subprocess.check_call([\u0027getent\u0027, \u0027hosts\u0027, ctlplane_hostname])"},{"line_number":105,"context_line":"        address \u003d ctlplane_hostname"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_c1c12c31","line":102,"range":{"start_line":102,"start_character":47,"end_line":102,"end_character":58},"in_reply_to":"3fa7e38b_5c344893","updated":"2019-10-10 22:01:04.000000000","message":"If you call `getent hosts undercloud.ctlplane` then you should get back\n  \n  192.168.24.1 undercloud.ctlplane.localdomain undercloud.ctlplane\n\nthis would let you discover the full name to use for the address","commit_id":"21dad3caf31189abc0a2a17836769e1add27ca73"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"7a7f538715f3e698d248a414d06c0f74d5528a1b","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"def get_undercloud_registry():"},{"line_number":101,"context_line":"    ctlplane_hostname \u003d \u0027.\u0027.join([socket.gethostname().split(\u0027.\u0027)[0],"},{"line_number":102,"context_line":"                                  \u0027ctlplane\u0027, \u0027localdomain\u0027])"},{"line_number":103,"context_line":"    try:"},{"line_number":104,"context_line":"        subprocess.check_call([\u0027getent\u0027, \u0027hosts\u0027, ctlplane_hostname])"},{"line_number":105,"context_line":"        address \u003d ctlplane_hostname"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_8d7fdbdd","line":102,"range":{"start_line":102,"start_character":47,"end_line":102,"end_character":58},"in_reply_to":"3fa7e38b_c1c12c31","updated":"2019-10-11 17:39:03.000000000","message":"yes, thanks Steve!","commit_id":"21dad3caf31189abc0a2a17836769e1add27ca73"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"33a58e9d4954acdb873ce6e85cc4b1fba3ba9611","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    addr \u003d \u0027localhost\u0027"},{"line_number":103,"context_line":"    if \u0027br-ctlplane\u0027 in netifaces.interfaces():"},{"line_number":104,"context_line":"        addrs \u003d netifaces.ifaddresses(\u0027br-ctlplane\u0027)"},{"line_number":105,"context_line":"        if netifaces.AF_INET in addrs and addrs[netifaces.AF_INET]:"},{"line_number":106,"context_line":"            addr \u003d addrs[netifaces.AF_INET][0].get(\u0027addr\u0027, \u0027localhost\u0027)"},{"line_number":107,"context_line":"        elif netifaces.AF_INET6 in addrs and addrs[netifaces.AF_INET6]:"},{"line_number":108,"context_line":"            addr \u003d addrs[netifaces.AF_INET6][0].get(\u0027addr\u0027, \u0027localhost\u0027)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_f34ec8c0","side":"PARENT","line":106,"range":{"start_line":105,"start_character":0,"end_line":106,"end_character":71},"updated":"2019-10-23 16:53:01.000000000","message":"This is an address and not a hostname so this breaks matching values for the insecure registry list and what we use for container image modification when we switched to a hostname. TBH I think this logic still needs to be in place and we need to do something different for IPV6","commit_id":"71f3f9841aad2521612c22e633297ad96628090d"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"7f6d37ed302f323933f9a7efe467068bbe066562","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    addr \u003d \u0027localhost\u0027"},{"line_number":103,"context_line":"    if \u0027br-ctlplane\u0027 in netifaces.interfaces():"},{"line_number":104,"context_line":"        addrs \u003d netifaces.ifaddresses(\u0027br-ctlplane\u0027)"},{"line_number":105,"context_line":"        if netifaces.AF_INET in addrs and addrs[netifaces.AF_INET]:"},{"line_number":106,"context_line":"            addr \u003d addrs[netifaces.AF_INET][0].get(\u0027addr\u0027, \u0027localhost\u0027)"},{"line_number":107,"context_line":"        elif netifaces.AF_INET6 in addrs and addrs[netifaces.AF_INET6]:"},{"line_number":108,"context_line":"            addr \u003d addrs[netifaces.AF_INET6][0].get(\u0027addr\u0027, \u0027localhost\u0027)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_908bc066","side":"PARENT","line":106,"range":{"start_line":105,"start_character":0,"end_line":106,"end_character":71},"in_reply_to":"3fa7e38b_8a15d29d","updated":"2019-10-24 03:36:23.000000000","message":"I reverted this change to use the netifaces approach again. The standalone deployment fail\u0027s the same way, and re-running the standalone deployment succeeds.\n\nI filed a bug: https://bugs.launchpad.net/tripleo/+bug/1849590\n\nIt would be trivial to add the entry to /etc/hosts before tripleoclient.v1.tripleo_deploy.Deploy._prepare_container_images executes. But, this would not fix the issue with only having the IP in DockerInsecureRegistryAddress, unless we always fall back to the IP in https://review.opendev.org/690780 (i.e not verify if the IP is in insecure registry, simply assume it is ...)","commit_id":"71f3f9841aad2521612c22e633297ad96628090d"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"2cb3f701b8a35925e25f10aa156b4628721ac056","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    addr \u003d \u0027localhost\u0027"},{"line_number":103,"context_line":"    if \u0027br-ctlplane\u0027 in netifaces.interfaces():"},{"line_number":104,"context_line":"        addrs \u003d netifaces.ifaddresses(\u0027br-ctlplane\u0027)"},{"line_number":105,"context_line":"        if netifaces.AF_INET in addrs and addrs[netifaces.AF_INET]:"},{"line_number":106,"context_line":"            addr \u003d addrs[netifaces.AF_INET][0].get(\u0027addr\u0027, \u0027localhost\u0027)"},{"line_number":107,"context_line":"        elif netifaces.AF_INET6 in addrs and addrs[netifaces.AF_INET6]:"},{"line_number":108,"context_line":"            addr \u003d addrs[netifaces.AF_INET6][0].get(\u0027addr\u0027, \u0027localhost\u0027)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_8a15d29d","side":"PARENT","line":106,"range":{"start_line":105,"start_character":0,"end_line":106,"end_character":71},"in_reply_to":"3fa7e38b_f34ec8c0","updated":"2019-10-24 02:38:48.000000000","message":"I pushed a patch that only use the hostname if it\u0027s in insecure registries. Then fall back to the IP. This passes the container image prepare, i.e tripleo-container-image-prepare.log looks good.\n\nHowever, since both the old and new code return \u0027localhost\u0027 the when tripleo_common.image.kolla_builder.container_images_prepare was called by tripleoclient.v1.tripleo_deploy.Deploy._prepare_container_images. NOTE: that this call happens prior to setting up etc/hosts and also prior to setting up br-ctlplane.\n\n\nFirst run\n---------\n  Standalone/docker_config.yaml:    image: localhost:8787/tripleomaster/centos-binary-keystone:current-tripleo-devel\n\nError:\n \"Error: unable to pull localhost:8787/tripleomaster/centos-binary-keystone:current-tripleo-devel: unable to pull image: Error initializing source docker://localhost:8787/tripleomaster/centos-binary-keystone:current-tripleo-devel: pinging docker registry returned: Get https://localhost:8787/v2/: http: server gave HTTP response to HTTPS client\",\n\n\nSecond run\n----------\n  Standalone/docker_config.yaml:    image: 172.20.0.50:8787/tripleomaster/centos-binary-keystone:current-tripleo-devel\n\nDeployment successful!\n\n\nHow the #%!#% did this work before?\nDid we always have to run the standalone deployment two times? (i.e also prior to this patch?)","commit_id":"71f3f9841aad2521612c22e633297ad96628090d"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"51ff9441f678e473ce07c36b543b9d95bcbebb5f","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"def get_undercloud_registry():"},{"line_number":101,"context_line":"    ctlplane_hostname \u003d \u0027.\u0027.join([socket.gethostname().split(\u0027.\u0027)[0],"},{"line_number":102,"context_line":"                                  \u0027ctlplane\u0027])"},{"line_number":103,"context_line":"    cmd \u003d [\u0027getent\u0027, \u0027hosts\u0027, ctlplane_hostname]"},{"line_number":104,"context_line":"    process \u003d subprocess.Popen(cmd, stdout\u003dsubprocess.PIPE)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_4ce5d7db","line":101,"updated":"2019-10-22 15:21:15.000000000","message":"This breaks the standalone because we don\u0027t have hostname.ctlplane in the env before we deploy.  IMHO we should be using localhost by default still","commit_id":"162e3a00069d9e1aba1487eda8427ab3f45aac77"}],"tripleo_common/tests/image/test_image_uploader.py":[{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"95c4e70014bc30659470f2da427b9b917b39167f","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                          mock_popen):"},{"line_number":100,"context_line":"        mock_process \u003d mock.Mock()"},{"line_number":101,"context_line":"        mock_process.communicate.return_value \u003d ("},{"line_number":102,"context_line":"            \u0027fd12::1 uc.ctlplane.localdomain uc.ctlplane\u0027, \u0027\u0027)"},{"line_number":103,"context_line":"        mock_process.returncode \u003d 0"},{"line_number":104,"context_line":"        mock_popen.return_value \u003d mock_process"},{"line_number":105,"context_line":"        self.assertEqual(\u0027uc.ctlplane.localdomain:8787\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_b8be9aab","line":102,"range":{"start_line":102,"start_character":13,"end_line":102,"end_character":20},"updated":"2019-10-11 12:07:19.000000000","message":"Should this be an IPv4 address?  Otherwise this test is same as test_get_undercloud_registry_ipv6().","commit_id":"abd8b9f86e5541ad24130719d5d757402e8af9ed"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"7a7f538715f3e698d248a414d06c0f74d5528a1b","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                                          mock_popen):"},{"line_number":100,"context_line":"        mock_process \u003d mock.Mock()"},{"line_number":101,"context_line":"        mock_process.communicate.return_value \u003d ("},{"line_number":102,"context_line":"            \u0027fd12::1 uc.ctlplane.localdomain uc.ctlplane\u0027, \u0027\u0027)"},{"line_number":103,"context_line":"        mock_process.returncode \u003d 0"},{"line_number":104,"context_line":"        mock_popen.return_value \u003d mock_process"},{"line_number":105,"context_line":"        self.assertEqual(\u0027uc.ctlplane.localdomain:8787\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_cd7953fc","line":102,"range":{"start_line":102,"start_character":13,"end_line":102,"end_character":20},"in_reply_to":"3fa7e38b_b8be9aab","updated":"2019-10-11 17:39:03.000000000","message":"Done","commit_id":"abd8b9f86e5541ad24130719d5d757402e8af9ed"}]}
