)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"43dc6c12574426aa96baeb15134dc4192fc09655","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"cf5ead7c_37aa9177","updated":"2022-06-30 06:43:03.000000000","message":"Hi Bo, Thanks for your PR!\n\nI found the commit which has introduced this bug. I will investigate that commit too because it seems to be totally opposite to this PR.\nhttps://opendev.org/openstack/trove/commit/0f666fb95f1909932fe635d8717e7ff66d7f7b44\n\nThanks in advance,\nHirotaka\n\n","commit_id":"c08fafd36f06a227f1efdee454bd213ce650a825"},{"author":{"_account_id":33822,"name":"Qiannan Lyu","email":"qiannan.lyu@hotmail.com","username":"qiannan"},"change_message_id":"0cafa1a32e1cd5922e1863c3ec293855ba45d9b6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"7cbade98_57cf071d","updated":"2022-06-30 08:41:29.000000000","message":"LGTM","commit_id":"c08fafd36f06a227f1efdee454bd213ce650a825"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"e669fad5e77982c4f6e92a4d985f4a0c53de5d03","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f98e95b8_8a5f6be4","updated":"2022-06-30 08:35:05.000000000","message":"LGTM. Let\u0027s be careful together because Trove\u0027s code is very confusing, For example, net-id or network-id, addr or address...\n\nThanks!\nHirotaka","commit_id":"c08fafd36f06a227f1efdee454bd213ce650a825"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"b99bc16afc1941687a703c619f2a9ddb3312cbb4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"878c7113_bd1e0b13","in_reply_to":"cf5ead7c_37aa9177","updated":"2022-06-30 08:18:56.000000000","message":"In previous commit log[1]. \n\n\u003e The instance.addresses value will be a dictionary of network: [addr_info] key/value pairs.\n\u003e ...(snip)...\n\u003e The nova api changed quite a while ago so we need to catch up.\n\nI think that was a wrong description because:\n* We don\u0027t currently use nova api when initializing instance.addresses since the commit[2].\n* instance.addresses is currently a list instance.\n\n---\n[1]: https://opendev.org/openstack/trove/commit/0f666fb95f1909932fe635d8717e7ff66d7f7b44\n[2]: https://opendev.org/openstack/trove/commit/429c39890e3242c6a502037673943b38452c5811\n\n\nHere is my short investigation:\n\n`instance.addresses` is `SimpleInstance.addresses` property which returns `self.db_info.addresses`.\n\n```\n    @property\n    def addresses(self):\n        if hasattr(self.db_info, \u0027addresses\u0027):\n            return self.db_info.addresses\n        else:\n            return None\n```\nhttps://opendev.org/openstack/trove/src/branch/master/trove/instance/models.py#L229\n\nSimpleInstance constructor initializes self.db_info which is passed by the second parameter.\n```\n    def __init__(self, context, db_info, datastore_status, root_password\u003dNone,\n                 ds_version\u003dNone, ds\u003dNone, locality\u003dNone):\n```\nhttps://opendev.org/openstack/trove/src/branch/master/trove/instance/models.py#L199\n\ndb_info.address, which is currently a `list` instance, is initialized here in load_simple_instance_addresses:\n```\n    addresses \u003d []\n    user_ports \u003d []\n    client \u003d clients.create_neutron_client(context, db_info.region_id)\n    ports \u003d neutron.get_instance_ports(client, db_info.compute_instance_id)\n    for port in ports:\n        if port[\u0027network_id\u0027] not in CONF.management_networks:\n            LOG.debug(\u0027Found user port %s for instance %s\u0027, port[\u0027id\u0027]n,\n                      db_info.id)\n\n            user_ports.append(port[\u0027id\u0027])\n            for ip in port[\u0027fixed_ips\u0027]:\n                # TODO(lxkong): IPv6 is not supported\n                if netutils.is_valid_ipv4(ip.get(\u0027ip_address\u0027)):\n                    addresses.append(\n                        {\n                            \u0027address\u0027: ip[\u0027ip_address\u0027],\n                            \u0027type\u0027: \u0027private\u0027,\n                            \u0027network\u0027: port[\u0027network_id\u0027]\n                        }\n                    )\n\n            fips \u003d neutron.get_port_fips(client, port[\u0027id\u0027])\n            if len(fips) \u003d\u003d 0:\n                continue\n            fip \u003d fips[0]\n            addresses.append(\n                {\u0027address\u0027: fip[\u0027floating_ip_address\u0027], \u0027type\u0027: \u0027public\u0027})\n\n    db_info.ports \u003d user_ports\n    db_info.addresses \u003d addresses\n```\nhttps://opendev.org/openstack/trove/src/branch/master/trove/instance/models.py#L142-L177","commit_id":"c08fafd36f06a227f1efdee454bd213ce650a825"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"32fd219ae1d8fc23428771aeef2b68843ca19590","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"665ffa01_103187c1","in_reply_to":"f98e95b8_8a5f6be4","updated":"2022-07-07 14:53:55.000000000","message":"Hi, Hirotaka, thanks for your carefully review. this helps a lot.","commit_id":"c08fafd36f06a227f1efdee454bd213ce650a825"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"0b4d2bb4a3adc4c3f89d295a9f6bb16bd5a3a943","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"801d85f4_d5c2273d","updated":"2022-07-14 13:57:41.000000000","message":"recheck","commit_id":"7fbed57c4ef9cbcbdb4df78e37a1f0b2a29a4120"}],"trove/tests/fakes/dns.py":[{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"e2d10b4b6d9ff62881de170ef7d17889435a75f2","unresolved":true,"context_lines":[{"line_number":78,"context_line":"        # the ability to return the IP from the API as well as a hostname,"},{"line_number":79,"context_line":"        # since that lines up to the DnsEntry\u0027s content field."},{"line_number":80,"context_line":"        ip_addresses \u003d mgmt_instance.server[\u0027addresses\u0027]"},{"line_number":81,"context_line":"        for network_name, ip_list in ip_addresses:"},{"line_number":82,"context_line":"            if entry.content \u003d\u003d ip[\u0027address\u0027]:"},{"line_number":83,"context_line":"                return"},{"line_number":84,"context_line":"        fail(\"Couldn\u0027t find IP address %s among these values: %s\""}],"source_content_type":"text/x-python","patch_set":1,"id":"f92b097b_a445d8d2","line":81,"updated":"2022-07-07 14:52:23.000000000","message":"ip_addresses should be a list?  Do we need two loop variable(network_name and ip_list)? may be we should remove network_name?","commit_id":"c08fafd36f06a227f1efdee454bd213ce650a825"},{"author":{"_account_id":28691,"name":"Bo Tran","email":"ministry.96.nd@gmail.com","username":"ministry"},"change_message_id":"8bece81c2d27b2aea59fad9a56f6a05c832ebab0","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        # the ability to return the IP from the API as well as a hostname,"},{"line_number":79,"context_line":"        # since that lines up to the DnsEntry\u0027s content field."},{"line_number":80,"context_line":"        ip_addresses \u003d mgmt_instance.server[\u0027addresses\u0027]"},{"line_number":81,"context_line":"        for network_name, ip_list in ip_addresses:"},{"line_number":82,"context_line":"            if entry.content \u003d\u003d ip[\u0027address\u0027]:"},{"line_number":83,"context_line":"                return"},{"line_number":84,"context_line":"        fail(\"Couldn\u0027t find IP address %s among these values: %s\""}],"source_content_type":"text/x-python","patch_set":1,"id":"211981ca_2d5533bb","line":81,"in_reply_to":"f92b097b_a445d8d2","updated":"2022-07-12 10:12:29.000000000","message":"i think it not need","commit_id":"c08fafd36f06a227f1efdee454bd213ce650a825"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"e2d10b4b6d9ff62881de170ef7d17889435a75f2","unresolved":true,"context_lines":[{"line_number":79,"context_line":"        # since that lines up to the DnsEntry\u0027s content field."},{"line_number":80,"context_line":"        ip_addresses \u003d mgmt_instance.server[\u0027addresses\u0027]"},{"line_number":81,"context_line":"        for network_name, ip_list in ip_addresses:"},{"line_number":82,"context_line":"            if entry.content \u003d\u003d ip[\u0027address\u0027]:"},{"line_number":83,"context_line":"                return"},{"line_number":84,"context_line":"        fail(\"Couldn\u0027t find IP address %s among these values: %s\""},{"line_number":85,"context_line":"             % (entry.content, ip_addresses))"}],"source_content_type":"text/x-python","patch_set":1,"id":"044303e1_eb96c0e1","line":82,"range":{"start_line":82,"start_character":32,"end_line":82,"end_character":34},"updated":"2022-07-07 14:52:23.000000000","message":"ip is not defined?","commit_id":"c08fafd36f06a227f1efdee454bd213ce650a825"},{"author":{"_account_id":28691,"name":"Bo Tran","email":"ministry.96.nd@gmail.com","username":"ministry"},"change_message_id":"8bece81c2d27b2aea59fad9a56f6a05c832ebab0","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        # since that lines up to the DnsEntry\u0027s content field."},{"line_number":80,"context_line":"        ip_addresses \u003d mgmt_instance.server[\u0027addresses\u0027]"},{"line_number":81,"context_line":"        for network_name, ip_list in ip_addresses:"},{"line_number":82,"context_line":"            if entry.content \u003d\u003d ip[\u0027address\u0027]:"},{"line_number":83,"context_line":"                return"},{"line_number":84,"context_line":"        fail(\"Couldn\u0027t find IP address %s among these values: %s\""},{"line_number":85,"context_line":"             % (entry.content, ip_addresses))"}],"source_content_type":"text/x-python","patch_set":1,"id":"69e8cc6c_08499604","line":82,"range":{"start_line":82,"start_character":32,"end_line":82,"end_character":34},"in_reply_to":"044303e1_eb96c0e1","updated":"2022-07-12 10:12:29.000000000","message":"Done","commit_id":"c08fafd36f06a227f1efdee454bd213ce650a825"}]}
