)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"e183c7d6d18eaa396ef37370fea83429c03bb600","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"120d6a12_fb8d8a0c","updated":"2022-11-16 21:30:34.000000000","message":"ohk, you were doing the right thing and I repeated it in comment :) I think i missed my coffee that day when commenting.\n\nlgtm, thanks  for explaining.  ","commit_id":"2c6da1db396c018ec6d52961edfadd9fe20cb5ad"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"bbb42a3308d5983eb781de8ebc188e6c8e0e2906","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2a292348_b8ff4752","updated":"2022-11-14 22:57:03.000000000","message":"we should not require the extra call to nova to fetch the latest server response. After this https://review.opendev.org/c/openstack/tempest/+/855047 we are returning the complete response of server. two tests reported failing in the bug report:\n\n1. test_rescued_vm_detach_volume can be fixed by fetching the server detail return by waiters.wait_for_server_status and then use that for further operations\n\n     server \u003d waiters.wait_for_server_status(self.servers_client,\n                                       server[\u0027id\u0027], \u0027RESCUE\u0027)\n\nhttps://github.com/openstack/tempest/blob/6fa213cc0fcab744b46109e5f07cb58b0df4a314/tempest/api/compute/servers/test_server_rescue_negative.py#L160\n\n2. test_create_server_with_fqdn_name is passing fine in upstream CI, can you add more log in bug to debug it further?","commit_id":"2c6da1db396c018ec6d52961edfadd9fe20cb5ad"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"bb4255611e79a24bf8a3bdb90662403a1144407f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"d582a8f0_0fbbe41a","in_reply_to":"2a292348_b8ff4752","updated":"2022-11-15 10:05:56.000000000","message":"Hello, Ghanshyam Mann !\n\nThank you for review and comments !\n\n- I added requested log to bug description.\n\n- Also config diff with parameters important for fixed (private) network vs public is added\n\n- According to both tests - looks like some issue exists with tuple, returned by create_test_server. Your proposed solution for (1) is working, but it should work without this fix, as we execute https://github.com/openstack/tempest/blob/6fa213cc0fcab744b46109e5f07cb58b0df4a314/tempest/api/compute/servers/test_server_rescue_negative.py#L149\n\nand already should have updated server status. So for now I think there is common issue with both tests (1), (2) that create_test_server doesn\u0027t return correct updated server (Possible hypothesis - it returns not tuple, but only body. And body is the old one without IP)\n\nif we change execution to:\n\n        server, servers \u003d self.create_test_server(\n            adminPass\u003dself.password,\n            wait_until\u003d\"SSHABLE\",\n            validatable\u003dTrue,\n            validation_resources\u003dvalidation_resources)\n\nWe will get error\n\n      File \"/root/venvs/tempest/lib/python3.8/site-packages/tempest/api/compute/servers/test_server_rescue_negative.py\", line 150, in test_rescued_vm_detach_volume\n    server, servers \u003d self.create_test_server(\n\n    ValueError: too many values to unpack (expected 2)","commit_id":"2c6da1db396c018ec6d52961edfadd9fe20cb5ad"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"2d273605424fd30d8075b1c79463d20eaae05441","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c391ba3b_6b396f2c","in_reply_to":"38aee151_7977f531","updated":"2022-11-16 11:15:58.000000000","message":"So to avoid problem 1 (index error when using servers[0] on empty list) I added check than servers isnt empty - \"if servers\"\nAnd also I keep response headers and just replace server part to updated one using body \u003d rest_client.ResponseBody(body.response, servers[0]) - it keeps response fields and update server body. It is used same way a bit above:\n\nhttps://github.com/openstack/tempest/blob/edd5a4cba37e94579ac5583b5bce38109c14bf75/tempest/common/compute.py#L297","commit_id":"2c6da1db396c018ec6d52961edfadd9fe20cb5ad"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"7241eaeba4f9da613c8cebeb6491f9c0bb89f5e1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"067644dd_cacba582","in_reply_to":"c391ba3b_6b396f2c","updated":"2022-11-16 11:17:46.000000000","message":"Finally - it isn\u0027t extra request to nova - just wrap new body from existing parts","commit_id":"2c6da1db396c018ec6d52961edfadd9fe20cb5ad"},{"author":{"_account_id":16198,"name":"Ilya Popov","email":"hebulrih@gmail.com","username":"IPO"},"change_message_id":"cfa0b028d8cbc0ac992df6655274abc73796a9ee","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"38aee151_7977f531","in_reply_to":"cc36f8c0_fe93ad2f","updated":"2022-11-16 11:08:12.000000000","message":"I belive the best way to use proposed solution in patchset 2:\n\n        if servers and not multiple_create_request:\n            body \u003d rest_client.ResponseBody(body.response, servers[0])\n            \n1. We won\u0027t get index error with empty list (I think it is possible in seldom cases)\n2. Some tests are extracting response headers from body. For examle tempest.api.compute.servers.test_instance_actions.InstanceActionsTestJSON\nsetup class will get error:\n\n{0} setUpClass (tempest.api.compute.servers.test_instance_actions.InstanceActionsTestJSON) [0.000000s] ... FAILED\n\nCaptured traceback:\n~~~~~~~~~~~~~~~~~~~\n    Traceback (most recent call last):\n\n      File \"/root/venvs/tempest/lib/python3.8/site-packages/tempest/test.py\", line 168, in setUpClass\n    raise value.with_traceback(trace)\n\n      File \"/root/venvs/tempest/lib/python3.8/site-packages/tempest/test.py\", line 161, in setUpClass\n    cls.resource_setup()\n\n      File \"/root/venvs/tempest/lib/python3.8/site-packages/tempest/api/compute/servers/test_instance_actions.py\", line 35, in resource_setup\n    cls.request_id \u003d cls.server.response[\u0027x-compute-request-id\u0027]\n\n    AttributeError: \u0027dict\u0027 object has no attribute \u0027response\u0027\n\n\nIt creates server and try to extracts headers in the following way:\n\n    def resource_setup(cls):\n        super(InstanceActionsTestJSON, cls).resource_setup()\n        cls.server \u003d cls.create_test_server(wait_until\u003d\u0027ACTIVE\u0027)\n        cls.request_id \u003d cls.server.response[\u0027x-compute-request-id\u0027]","commit_id":"2c6da1db396c018ec6d52961edfadd9fe20cb5ad"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"a92d095b2fef1b1da3c9b9983664dea14cf91eab","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"cc36f8c0_fe93ad2f","in_reply_to":"d582a8f0_0fbbe41a","updated":"2022-11-16 06:32:23.000000000","message":"Ok, Thanks for explaining it, I think I got the issue here.\n\nLet\u0027s update the \u0027body\u0027 also as updated server response before return in \nhttps://github.com/openstack/tempest/blob/edd5a4cba37e94579ac5583b5bce38109c14bf75/tempest/common/compute.py#L355\n\n if not multiple_create_request:\n    body \u003d servers[0]\n    \n return body, servers\n \n \n Check if that solution fixes the failure you are facing.","commit_id":"2c6da1db396c018ec6d52961edfadd9fe20cb5ad"}]}
