)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9a97ec7f446230769f39f808bb8137a9819509b0","unresolved":false,"context_lines":[{"line_number":13,"context_line":"now filter out floating IPs from the list of server IP addresses"},{"line_number":14,"context_line":"to compare only number of fixed IPs as this test is only about adding"},{"line_number":15,"context_line":"and removing fixed IPs to the server."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I38c17da4ff492569cf572718c4443ebcc4718f62"},{"line_number":18,"context_line":"Closes-Bug: #1834758"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_814e806c","line":16,"updated":"2019-07-01 21:02:32.000000000","message":"The bug report says a floating IP shows up in the list between the time we get the original list of IPs and after the fixed IP is added - what is adding that floating IP? Does it depend on neutron configuration so it\u0027s environment specific? Or are there concurrently running tests sharing the same server resource?","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"12d69e49dbc8da5379d8a8dcb84811f8d1ad90ae","unresolved":false,"context_lines":[{"line_number":13,"context_line":"now filter out floating IPs from the list of server IP addresses"},{"line_number":14,"context_line":"to compare only number of fixed IPs as this test is only about adding"},{"line_number":15,"context_line":"and removing fixed IPs to the server."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I38c17da4ff492569cf572718c4443ebcc4718f62"},{"line_number":18,"context_line":"Closes-Bug: #1834758"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9fb8cfa7_d92d488f","line":16,"in_reply_to":"9fb8cfa7_814e806c","updated":"2019-07-02 06:48:04.000000000","message":"IIUC floating IP is added by https://github.com/openstack/tempest/blob/e467c3c9f255408fd7ec50972a733acac6420420/tempest/common/compute.py#L248\nAnd it looks for me that this floating IP isn\u0027t in the list returned by /servers/\u003cserver_id\u003e/ips call immediately but is added to it \"in the meantime\". Maybe because of some work on neutron\u0027s side to attach this FIP to the port or because of some background information exchange between nova and neutron when server is already created.","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"}],"tempest/api/compute/servers/test_attach_interfaces.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9a97ec7f446230769f39f808bb8137a9819509b0","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        def _wait_for_ip_increase():"},{"line_number":368,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":369,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":370,"context_line":"            return len(list(_addresses.values())[0]) \u003d\u003d original_ip_count + 1"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"        if not test_utils.call_until_true("},{"line_number":373,"context_line":"                _wait_for_ip_increase, CONF.compute.build_timeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_c160f8d1","side":"PARENT","line":370,"range":{"start_line":370,"start_character":56,"end_line":370,"end_character":77},"updated":"2019-07-01 21:02:32.000000000","message":"So the problem is this can be original_ip_count + \u003e1 right?\n\nWhy don\u0027t we do this instead?\n\nself.assertGreater(len(list(_addresses.values())[0]), original_ip_count)","commit_id":"3eb3c29e979fd3f13c205d62119748952d63054a"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"12d69e49dbc8da5379d8a8dcb84811f8d1ad90ae","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        def _wait_for_ip_increase():"},{"line_number":368,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":369,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":370,"context_line":"            return len(list(_addresses.values())[0]) \u003d\u003d original_ip_count + 1"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"        if not test_utils.call_until_true("},{"line_number":373,"context_line":"                _wait_for_ip_increase, CONF.compute.build_timeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_5646077d","side":"PARENT","line":370,"range":{"start_line":370,"start_character":56,"end_line":370,"end_character":77},"in_reply_to":"9fb8cfa7_c160f8d1","updated":"2019-07-02 06:48:04.000000000","message":"I didn\u0027t wan\u0027t to change existing test logic and this currently is checking if exactly 1 new fixed ip was added.\nAlso currently (in master) it is checking only if one (any) IP was added so theoretically it is possible that it will pass here even if addition of fixed IP will fail but floating IP will \"appear\" in the list somewhere between L350 and this one.\n\nSo based on what I wrote above I don\u0027t think that checking with assertGreater would be sufficient here.","commit_id":"3eb3c29e979fd3f13c205d62119748952d63054a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9a97ec7f446230769f39f808bb8137a9819509b0","unresolved":false,"context_lines":[{"line_number":350,"context_line":"            server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":351,"context_line":"        # There should be one entry for the single network mapped to a list of"},{"line_number":352,"context_line":"        # addresses, which at this point should have at least one entry."},{"line_number":353,"context_line":"        # Note that we could start with two addresses depending on how tempest"},{"line_number":354,"context_line":"        # is configured for using floating IPs."},{"line_number":355,"context_line":"        self.assertEqual(1, len(addresses), addresses)  # number of networks"},{"line_number":356,"context_line":"        # Keep track of the original addresses so we can know which IP is new."},{"line_number":357,"context_line":"        original_ips \u003d [addr[\u0027addr\u0027] for addr in list(addresses.values())[0]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_817760a0","line":354,"range":{"start_line":353,"start_character":8,"end_line":354,"end_character":47},"updated":"2019-07-01 21:02:32.000000000","message":"Maybe this is the answer to my question in the commit message.","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9a97ec7f446230769f39f808bb8137a9819509b0","unresolved":false,"context_lines":[{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        def _get_server_floating_ips():"},{"line_number":368,"context_line":"            _floating_ips \u003d []"},{"line_number":369,"context_line":"            _server \u003d self.os_primary.servers_client.show_server("},{"line_number":370,"context_line":"                server[\u0027id\u0027])[\u0027server\u0027]"},{"line_number":371,"context_line":"            for _ip_set in _server[\u0027addresses\u0027]:"},{"line_number":372,"context_line":"                for _ip in _server[\u0027addresses\u0027][_ip_set]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_a1d6244e","line":369,"updated":"2019-07-01 21:02:32.000000000","message":"Ah you have to get this because https://developer.openstack.org/api-ref/compute/#list-ips doesn\u0027t return the type (fixed vs floating), I was wondering if we could have just filtered the result from list_addresses.\n\nNow I\u0027m reminded of this spec https://review.opendev.org/#/c/521392/ that was never implemented but that\u0027s tangential to what you\u0027re trying to fix here.","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"343ce541f7084e040b06171ba0bc1441b0f60bf0","unresolved":false,"context_lines":[{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        def _get_server_floating_ips():"},{"line_number":368,"context_line":"            _floating_ips \u003d []"},{"line_number":369,"context_line":"            _server \u003d self.os_primary.servers_client.show_server("},{"line_number":370,"context_line":"                server[\u0027id\u0027])[\u0027server\u0027]"},{"line_number":371,"context_line":"            for _ip_set in _server[\u0027addresses\u0027]:"},{"line_number":372,"context_line":"                for _ip in _server[\u0027addresses\u0027][_ip_set]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_eeeaa5d6","line":369,"in_reply_to":"9fb8cfa7_366a73ec","updated":"2019-07-03 15:28:41.000000000","message":"yeah, that is not yet implemented. and maybe supporting the query with \u0027type\u0027 on that APIs will be more efficient.","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"12d69e49dbc8da5379d8a8dcb84811f8d1ad90ae","unresolved":false,"context_lines":[{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        def _get_server_floating_ips():"},{"line_number":368,"context_line":"            _floating_ips \u003d []"},{"line_number":369,"context_line":"            _server \u003d self.os_primary.servers_client.show_server("},{"line_number":370,"context_line":"                server[\u0027id\u0027])[\u0027server\u0027]"},{"line_number":371,"context_line":"            for _ip_set in _server[\u0027addresses\u0027]:"},{"line_number":372,"context_line":"                for _ip in _server[\u0027addresses\u0027][_ip_set]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_366a73ec","line":369,"in_reply_to":"9fb8cfa7_a1d6244e","updated":"2019-07-02 06:48:04.000000000","message":"yes, it\u0027s not available in return of /servers/server_id/ips call","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"343ce541f7084e040b06171ba0bc1441b0f60bf0","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        def _wait_for_ip_increase():"},{"line_number":378,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":379,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":380,"context_line":"            _ips \u003d [addr[\u0027addr\u0027] for addr in list(_addresses.values())[0]]"},{"line_number":381,"context_line":"            if len(_ips) \u003d\u003d original_ip_count + 1:"},{"line_number":382,"context_line":"                return True"},{"line_number":383,"context_line":"            # If not, lets remove any floating IP from the list and check again"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_ae64ad4a","line":380,"range":{"start_line":380,"start_character":12,"end_line":380,"end_character":16},"updated":"2019-07-03 15:28:41.000000000","message":"can we log the _ips here which will be easy to debug the failure? otherwise it will be difficult to know the cause of failure as multiple comparison conditions.","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"689700eb06514544ddc3478da6ef3f37380c2137","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        def _wait_for_ip_increase():"},{"line_number":378,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":379,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":380,"context_line":"            _ips \u003d [addr[\u0027addr\u0027] for addr in list(_addresses.values())[0]]"},{"line_number":381,"context_line":"            if len(_ips) \u003d\u003d original_ip_count + 1:"},{"line_number":382,"context_line":"                return True"},{"line_number":383,"context_line":"            # If not, lets remove any floating IP from the list and check again"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_819ae9c2","line":380,"range":{"start_line":380,"start_character":12,"end_line":380,"end_character":16},"in_reply_to":"9fb8cfa7_ae64ad4a","updated":"2019-07-04 08:23:39.000000000","message":"Done","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"f45f72118d76e1c9f3fce3872cd0e556d1acd449","unresolved":false,"context_lines":[{"line_number":378,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":379,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":380,"context_line":"            _ips \u003d [addr[\u0027addr\u0027] for addr in list(_addresses.values())[0]]"},{"line_number":381,"context_line":"            if len(_ips) \u003d\u003d original_ip_count + 1:"},{"line_number":382,"context_line":"                return True"},{"line_number":383,"context_line":"            # If not, lets remove any floating IP from the list and check again"},{"line_number":384,"context_line":"            _fips \u003d _get_server_floating_ips()"},{"line_number":385,"context_line":"            _ips \u003d [_ip for _ip in _ips if _ip not in _fips]"},{"line_number":386,"context_line":"            return len(_ips) \u003d\u003d original_ip_count + 1"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_15aad86f","line":383,"range":{"start_line":381,"start_character":0,"end_line":383,"end_character":79},"updated":"2019-07-01 07:45:58.000000000","message":"Shall we always strip floating ip from server ips?\ne.g., what if the server\u0027s internal ip is not attached but its floating ip is attached?","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a05ef4c512b9e3b1eb815c6bd4d15c84e26a62a4","unresolved":false,"context_lines":[{"line_number":378,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":379,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":380,"context_line":"            _ips \u003d [addr[\u0027addr\u0027] for addr in list(_addresses.values())[0]]"},{"line_number":381,"context_line":"            if len(_ips) \u003d\u003d original_ip_count + 1:"},{"line_number":382,"context_line":"                return True"},{"line_number":383,"context_line":"            # If not, lets remove any floating IP from the list and check again"},{"line_number":384,"context_line":"            _fips \u003d _get_server_floating_ips()"},{"line_number":385,"context_line":"            _ips \u003d [_ip for _ip in _ips if _ip not in _fips]"},{"line_number":386,"context_line":"            return len(_ips) \u003d\u003d original_ip_count + 1"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_15f17895","line":383,"range":{"start_line":381,"start_character":0,"end_line":383,"end_character":79},"in_reply_to":"9fb8cfa7_15aad86f","updated":"2019-07-01 07:54:55.000000000","message":"Floating IP can be associated only to fixed IP so server must have fixed IP to have floating IP too.\nI don\u0027t think it is always needed because sometimes it may happened that \"original_ips\" will already have both floating and fixed IP in the list and in such case if You will here drop floating IP than this will also not match as it should.\n\nWe could remove floating IPs always from list here and from original_ips list in L357 but I think that would cause unnecessary API calls so I didn\u0027t add it there.","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"343ce541f7084e040b06171ba0bc1441b0f60bf0","unresolved":false,"context_lines":[{"line_number":378,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":379,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":380,"context_line":"            _ips \u003d [addr[\u0027addr\u0027] for addr in list(_addresses.values())[0]]"},{"line_number":381,"context_line":"            if len(_ips) \u003d\u003d original_ip_count + 1:"},{"line_number":382,"context_line":"                return True"},{"line_number":383,"context_line":"            # If not, lets remove any floating IP from the list and check again"},{"line_number":384,"context_line":"            _fips \u003d _get_server_floating_ips()"},{"line_number":385,"context_line":"            _ips \u003d [_ip for _ip in _ips if _ip not in _fips]"},{"line_number":386,"context_line":"            return len(_ips) \u003d\u003d original_ip_count + 1"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_6ee9d5b5","line":383,"range":{"start_line":381,"start_character":0,"end_line":383,"end_character":79},"in_reply_to":"9fb8cfa7_15f17895","updated":"2019-07-03 15:28:41.000000000","message":"yeah, it will be fixed_ip + Floating IP always and you cannot associate multiple floating IP to single fixed IP it will be 409 if fixed ip is already associated. \n\nThis approach lgtm.","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"343ce541f7084e040b06171ba0bc1441b0f60bf0","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            if len(_ips) \u003d\u003d original_ip_count + 1:"},{"line_number":382,"context_line":"                return True"},{"line_number":383,"context_line":"            # If not, lets remove any floating IP from the list and check again"},{"line_number":384,"context_line":"            _fips \u003d _get_server_floating_ips()"},{"line_number":385,"context_line":"            _ips \u003d [_ip for _ip in _ips if _ip not in _fips]"},{"line_number":386,"context_line":"            return len(_ips) \u003d\u003d original_ip_count + 1"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        if not test_utils.call_until_true("},{"line_number":389,"context_line":"                _wait_for_ip_increase, CONF.compute.build_timeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_6e37954f","line":386,"range":{"start_line":384,"start_character":0,"end_line":386,"end_character":53},"updated":"2019-07-03 15:28:41.000000000","message":"you can check this only if len(_ips) \u003e original_ip_count which is the case of more floating IP. If IP is not associated then len(ips) will be same as original_ip_count and we do not need to remove the Floating IPs case.","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"689700eb06514544ddc3478da6ef3f37380c2137","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            if len(_ips) \u003d\u003d original_ip_count + 1:"},{"line_number":382,"context_line":"                return True"},{"line_number":383,"context_line":"            # If not, lets remove any floating IP from the list and check again"},{"line_number":384,"context_line":"            _fips \u003d _get_server_floating_ips()"},{"line_number":385,"context_line":"            _ips \u003d [_ip for _ip in _ips if _ip not in _fips]"},{"line_number":386,"context_line":"            return len(_ips) \u003d\u003d original_ip_count + 1"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        if not test_utils.call_until_true("},{"line_number":389,"context_line":"                _wait_for_ip_increase, CONF.compute.build_timeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_e1b4fd37","line":386,"range":{"start_line":384,"start_character":0,"end_line":386,"end_character":53},"in_reply_to":"9fb8cfa7_6e37954f","updated":"2019-07-04 08:23:39.000000000","message":"Done","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"343ce541f7084e040b06171ba0bc1441b0f60bf0","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        def _wait_for_ip_decrease():"},{"line_number":411,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":412,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":413,"context_line":"            _ips \u003d [addr[\u0027addr\u0027] for addr in list(_addresses.values())[0]]"},{"line_number":414,"context_line":"            if len(_ips) \u003d\u003d original_ip_count:"},{"line_number":415,"context_line":"                return True"},{"line_number":416,"context_line":"            # If not, lets remove any floating IP from the list and check again"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_0e53796e","line":413,"range":{"start_line":413,"start_character":12,"end_line":413,"end_character":16},"updated":"2019-07-03 15:28:41.000000000","message":"ditto. log please","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"689700eb06514544ddc3478da6ef3f37380c2137","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        def _wait_for_ip_decrease():"},{"line_number":411,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":412,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":413,"context_line":"            _ips \u003d [addr[\u0027addr\u0027] for addr in list(_addresses.values())[0]]"},{"line_number":414,"context_line":"            if len(_ips) \u003d\u003d original_ip_count:"},{"line_number":415,"context_line":"                return True"},{"line_number":416,"context_line":"            # If not, lets remove any floating IP from the list and check again"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_c1e5413a","line":413,"range":{"start_line":413,"start_character":12,"end_line":413,"end_character":16},"in_reply_to":"9fb8cfa7_0e53796e","updated":"2019-07-04 08:23:39.000000000","message":"Done","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"343ce541f7084e040b06171ba0bc1441b0f60bf0","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        def _wait_for_ip_decrease():"},{"line_number":411,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":412,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":413,"context_line":"            _ips \u003d [addr[\u0027addr\u0027] for addr in list(_addresses.values())[0]]"},{"line_number":414,"context_line":"            if len(_ips) \u003d\u003d original_ip_count:"},{"line_number":415,"context_line":"                return True"},{"line_number":416,"context_line":"            # If not, lets remove any floating IP from the list and check again"},{"line_number":417,"context_line":"            _fips \u003d _get_server_floating_ips()"},{"line_number":418,"context_line":"            _ips \u003d [_ip for _ip in _ips if _ip not in _fips]"},{"line_number":419,"context_line":"            return len(_ips) \u003d\u003d original_ip_count + 1"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        if not test_utils.call_until_true("},{"line_number":422,"context_line":"                _wait_for_ip_decrease, CONF.compute.build_timeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_ae97cdeb","line":419,"range":{"start_line":412,"start_character":0,"end_line":419,"end_character":53},"updated":"2019-07-03 15:28:41.000000000","message":"but one question. do we need to change here? I mean is it possible that fixed IP is removed but floating IP is still in server address list?\n\nor you are considering the case of time floating IP gets removed?","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"343ce541f7084e040b06171ba0bc1441b0f60bf0","unresolved":false,"context_lines":[{"line_number":416,"context_line":"            # If not, lets remove any floating IP from the list and check again"},{"line_number":417,"context_line":"            _fips \u003d _get_server_floating_ips()"},{"line_number":418,"context_line":"            _ips \u003d [_ip for _ip in _ips if _ip not in _fips]"},{"line_number":419,"context_line":"            return len(_ips) \u003d\u003d original_ip_count + 1"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        if not test_utils.call_until_true("},{"line_number":422,"context_line":"                _wait_for_ip_decrease, CONF.compute.build_timeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_2ed51db8","line":419,"range":{"start_line":419,"start_character":32,"end_line":419,"end_character":53},"updated":"2019-07-03 15:28:41.000000000","message":"it should be original_ip_count? not +1","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"07e359c3e33807a2ff80566dadbcfef98899fa55","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        def _wait_for_ip_decrease():"},{"line_number":411,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":412,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":413,"context_line":"            _ips \u003d [addr[\u0027addr\u0027] for addr in list(_addresses.values())[0]]"},{"line_number":414,"context_line":"            if len(_ips) \u003d\u003d original_ip_count:"},{"line_number":415,"context_line":"                return True"},{"line_number":416,"context_line":"            # If not, lets remove any floating IP from the list and check again"},{"line_number":417,"context_line":"            _fips \u003d _get_server_floating_ips()"},{"line_number":418,"context_line":"            _ips \u003d [_ip for _ip in _ips if _ip not in _fips]"},{"line_number":419,"context_line":"            return len(_ips) \u003d\u003d original_ip_count + 1"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        if not test_utils.call_until_true("},{"line_number":422,"context_line":"                _wait_for_ip_decrease, CONF.compute.build_timeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_dc176aed","line":419,"range":{"start_line":412,"start_character":0,"end_line":419,"end_character":53},"in_reply_to":"7faddb67_0121194e","updated":"2019-07-04 09:03:16.000000000","message":"But at step#4 when you removed the floating IP at L418 the total _ips are only 1 fixed ip right ? but you are expecting original_ip_count + 1 at L419\n\nOther easy way it always filter the fixed IP for comparision when increased or decreased. That can be simple and easy way.\n\nI mean instead of _get_server_floating_ips() make a func _get_server_fixed_ips() and use that when compariying the fixed ip count.","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"f56c6a5d1f8d8d628fdca7d4d78d06446a07a3b8","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        def _wait_for_ip_decrease():"},{"line_number":411,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":412,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":413,"context_line":"            _ips \u003d [addr[\u0027addr\u0027] for addr in list(_addresses.values())[0]]"},{"line_number":414,"context_line":"            if len(_ips) \u003d\u003d original_ip_count:"},{"line_number":415,"context_line":"                return True"},{"line_number":416,"context_line":"            # If not, lets remove any floating IP from the list and check again"},{"line_number":417,"context_line":"            _fips \u003d _get_server_floating_ips()"},{"line_number":418,"context_line":"            _ips \u003d [_ip for _ip in _ips if _ip not in _fips]"},{"line_number":419,"context_line":"            return len(_ips) \u003d\u003d original_ip_count + 1"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        if not test_utils.call_until_true("},{"line_number":422,"context_line":"                _wait_for_ip_decrease, CONF.compute.build_timeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_37b1f7e2","line":419,"range":{"start_line":412,"start_character":0,"end_line":419,"end_character":53},"in_reply_to":"7faddb67_dc176aed","updated":"2019-07-04 09:53:32.000000000","message":"That original_ip_count + 1 was my mistake and now I removed it.\nBy reversing this logic and always get fixed IPs only we would make more API calls to nova. And also this test is expected to check GET /servers/\u003cserver_id\u003e/ips calls so I need to get list of IPs from there and compare with original_ips list which was at the beginning.","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"689700eb06514544ddc3478da6ef3f37380c2137","unresolved":false,"context_lines":[{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        def _wait_for_ip_decrease():"},{"line_number":411,"context_line":"            _addresses \u003d self.os_primary.servers_client.list_addresses("},{"line_number":412,"context_line":"                server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":413,"context_line":"            _ips \u003d [addr[\u0027addr\u0027] for addr in list(_addresses.values())[0]]"},{"line_number":414,"context_line":"            if len(_ips) \u003d\u003d original_ip_count:"},{"line_number":415,"context_line":"                return True"},{"line_number":416,"context_line":"            # If not, lets remove any floating IP from the list and check again"},{"line_number":417,"context_line":"            _fips \u003d _get_server_floating_ips()"},{"line_number":418,"context_line":"            _ips \u003d [_ip for _ip in _ips if _ip not in _fips]"},{"line_number":419,"context_line":"            return len(_ips) \u003d\u003d original_ip_count + 1"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        if not test_utils.call_until_true("},{"line_number":422,"context_line":"                _wait_for_ip_decrease, CONF.compute.build_timeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_0121194e","line":419,"range":{"start_line":412,"start_character":0,"end_line":419,"end_character":53},"in_reply_to":"9fb8cfa7_ae97cdeb","updated":"2019-07-04 08:23:39.000000000","message":"TBH I didn\u0027t found failure of test on decreasing (it failed always on increasing which happens first).\nBut lets imagine:\n1. Server has got fixed IP1 and associated to it floating IP but original_ip_count (L358) is 1 as floating IP wasn\u0027t included there,\n2. Additional IP is associated to the server,\n3. In wait_for_ip_increase() function we noticed that len(_ips) \u003d 3 (2 x Fixed IP + 1 x Floating IP), so we removed floating IP from the list and assertion passed because len(_ips) \u003d\u003d original_ips + 1 then :)\n4. Now we are removing one fixed IP from the server so _ips list in L413 will contain  1 x fixed IP and 1 x floating IP, but as original_ip_count \u003d 1 assertion from L414 will never pass.\n\nThat\u0027s why I added same check here as well.\nDoes it makes sense for You?","commit_id":"21e7b96064144d63ba42a35372fba1be62692073"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"e71a3946bf9e3fc99b3332db86372a27c402aca4","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        self.servers_client.add_fixed_ip(server[\u0027id\u0027], networkId\u003dnetwork_id)"},{"line_number":368,"context_line":"        # Wait for the ips count to increase by one."},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        def _get_server_floating_ips():"},{"line_number":371,"context_line":"            _floating_ips \u003d []"},{"line_number":372,"context_line":"            _server \u003d self.os_primary.servers_client.show_server("},{"line_number":373,"context_line":"                server[\u0027id\u0027])[\u0027server\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_1ccc2288","line":370,"range":{"start_line":370,"start_character":12,"end_line":370,"end_character":36},"updated":"2019-07-04 09:05:13.000000000","message":"how about replacing this function to return fixed ip and then we use that everywhere in test. at L360, L383 and L425.\n\nI think that will be easy way to compare the fixed ip count.","commit_id":"b1589d901d740f9b1bc399ebf46d8788c18e82cd"}]}
