Designate - after PTR record is successfully unset from FIP, its status reaches: ACTIVE
Scenario:
Unset PTR record form FIP
Use “SHOW” API to check the status of unset PTR record
Actual Result:
Once PTR is successfully unset, its status reaches ACTIVE
Expected Result:
It’s possible to see that while PTR is getting unset, API response includes:
"action": "DELETE", "status": "PENDING",
so, the expected status value would be DELETED, to keep the same logic, we do use DELETE for action field so?!
For more details:
2021-06-15 16:41:57,686 2759957 INFO [designate_tempest_plugin.tests.api.v2.test_ptrs] Unset PTR from FIP
1. 2021-06-15 16:41:57,755 2759957 INFO [tempest.lib.common.rest_client] Request (DesignatePtrRecord:test_unset_floatingip_ptr): 202 PATCH http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7 0.068s
2. 2021-06-15 16:41:57,755 2759957 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
3. Body: {"ptrdname": null}
4. Response - Headers: {'date': 'Tue, 15 Jun 2021 13:41:57 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'content-length': '4', 'x-openstack-request-id': 'req-cf57a705-f5f8-4260-a5dc-c0ead292fdf6', 'connection': 'close', 'content-type': 'application/json', 'status': '202', 'content-location': 'http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7'}
5. Body: b'null'
6. 2021-06-15 16:41:57,755 2759957 INFO [designate_tempest_plugin.tests.api.v2.test_ptrs] Once PTR is unset, expected result status for SHOW is: DELETED
7. 2021-06-15 16:41:57,841 2759957 INFO [tempest.lib.common.rest_client] Request (DesignatePtrRecord:test_unset_floatingip_ptr): 202 PATCH http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7 0.085s
8. 2021-06-15 16:41:57,841 2759957 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
9. Body: {"ptrdname": null}
10. Response - Headers: {'date': 'Tue, 15 Jun 2021 13:41:57 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'content-length': '4', 'x-openstack-request-id': 'req-9dffe266-a301-440b-9830-90860f16f134', 'connection': 'close', 'content-type': 'application/json', 'status': '202', 'content-location': 'http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7'}
11. Body: b'null'
12. 2021-06-15 16:41:57,842 2759957 INFO [designate_tempest_plugin.common.waiters] Waiting for PTR 11a02651-97a1-457a-99e4-c20919be71e7 to reach DELETED
13. 2021-06-15 16:41:57,922 2759957 INFO [tempest.lib.common.rest_client] Request (DesignatePtrRecord:test_unset_floatingip_ptr): 200 GET http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7 0.080s
14. 2021-06-15 16:41:57,922 2759957 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
15. Body: None
16. Response - Headers: {'date': 'Tue, 15 Jun 2021 13:41:57 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'content-length': '327', 'x-openstack-request-id': 'req-a99d6e85-1a27-4786-b3b4-f8fbaf46fc53', 'connection': 'close', 'content-type': 'application/json', 'status': '200', 'content-location': 'http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7'}
17. Body: b'{"id": "RegionOne:11a02651-97a1-457a-99e4-c20919be71e7", "description": "tempest-test-ptr-72807320", "address": "172.24.4.63", "ptrdname": "ejtv.rxiwuv.net.", "ttl": 86317, "action": "DELETE", "status": "PENDING", "links": {"self": "http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7"}}'
18. 2021-06-15 16:41:59,008 2759957 INFO [tempest.lib.common.rest_client] Request (DesignatePtrRecord:test_unset_floatingip_ptr): 200 GET http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7 0.084s
19. 2021-06-15 16:41:59,009 2759957 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
20. Body: None
21. Response - Headers: {'date': 'Tue, 15 Jun 2021 13:41:58 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'content-length': '327', 'x-openstack-request-id': 'req-94b772c7-2e2a-499c-a32a-8122afc28d79', 'connection': 'close', 'content-type': 'application/json', 'status': '200', 'content-location': 'http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7'}
22. Body: b'{"id": "RegionOne:11a02651-97a1-457a-99e4-c20919be71e7", "description": "tempest-test-ptr-72807320", "address": "172.24.4.63", "ptrdname": "ejtv.rxiwuv.net.", "ttl": 86317, "action": "DELETE", "status": "PENDING", "links": {"self": "http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7"}}'
23. 2021-06-15 16:42:00,097 2759957 INFO [tempest.lib.common.rest_client] Request (DesignatePtrRecord:test_unset_floatingip_ptr): 200 GET http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7 0.086s
24. 2021-06-15 16:42:00,097 2759957 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
25. Body: None
26. Response - Headers: {'date': 'Tue, 15 Jun 2021 13:42:00 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'content-length': '327', 'x-openstack-request-id': 'req-3fc51090-ae88-4e49-8f20-23bb17852a7e', 'connection': 'close', 'content-type': 'application/json', 'status': '200', 'content-location': 'http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7'}
27. Body: b'{"id": "RegionOne:11a02651-97a1-457a-99e4-c20919be71e7", "description": "tempest-test-ptr-72807320", "address": "172.24.4.63", "ptrdname": "ejtv.rxiwuv.net.", "ttl": 86317, "action": "DELETE", "status": "PENDING", "links": {"self": "http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7"}}'
28. 2021-06-15 16:42:01,182 2759957 INFO [tempest.lib.common.rest_client] Request (DesignatePtrRecord:test_unset_floatingip_ptr): 200 GET http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7 0.083s
29. 2021-06-15 16:42:01,182 2759957 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
30. Body: None
31. Response - Headers: {'date': 'Tue, 15 Jun 2021 13:42:01 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'content-length': '327', 'x-openstack-request-id': 'req-4aed2f77-038d-47b6-b2a1-1af62a9e7d3e', 'connection': 'close', 'content-type': 'application/json', 'status': '200', 'content-location': 'http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7'}
32. Body: b'{"id": "RegionOne:11a02651-97a1-457a-99e4-c20919be71e7", "description": "tempest-test-ptr-72807320", "address": "172.24.4.63", "ptrdname": "ejtv.rxiwuv.net.", "ttl": 86317, "action": "DELETE", "status": "PENDING", "links": {"self": "http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7"}}'
33. 2021-06-15 16:42:02,301 2759957 INFO [tempest.lib.common.rest_client] Request (DesignatePtrRecord:test_unset_floatingip_ptr): 200 GET http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7 0.117s
34. 2021-06-15 16:42:02,301 2759957 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
35. Body: None
36. Response - Headers: {'date': 'Tue, 15 Jun 2021 13:42:02 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'content-length': '327', 'x-openstack-request-id': 'req-72eebfdb-d425-4d21-a93b-c2f64291887c', 'connection': 'close', 'content-type': 'application/json', 'status': '200', 'content-location': 'http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7'}
37. Body: b'{"id": "RegionOne:11a02651-97a1-457a-99e4-c20919be71e7", "description": "tempest-test-ptr-72807320", "address": "172.24.4.63", "ptrdname": "ejtv.rxiwuv.net.", "ttl": 86317, "action": "DELETE", "status": "PENDING", "links": {"self": "http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7"}}'
38. 2021-06-15 16:42:03,385 2759957 INFO [tempest.lib.common.rest_client] Request (DesignatePtrRecord:test_unset_floatingip_ptr): 200 GET http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7 0.082s
39. 2021-06-15 16:42:03,386 2759957 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
40. Body: None
41. Response - Headers: {'date': 'Tue, 15 Jun 2021 13:42:03 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'content-length': '284', 'x-openstack-request-id': 'req-1ace908a-b69b-4549-a542-db689b843025', 'connection': 'close', 'content-type': 'application/json', 'status': '200', 'content-location': 'http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7'}
42. Body: b'{"id": "RegionOne:11a02651-97a1-457a-99e4-c20919be71e7", "description": null, "address": "172.24.4.63", "ptrdname": null, "ttl": null, "action": null, "status": "ACTIVE", "links": {"self": "http://10.35.64.8/dns/v2/reverse/floatingips/RegionOne:11a02651-97a1-457a-99e4-c20919be71e7"}}'
The same output is available here: http://pastebin.test.redhat.com/971811
There are currently only three valid states ACTIVE, PENDING and ERROR. DELETE is not a valid state. As an alternative fix to this I created a PR that introduces a forth state called INACTIVE. /review. opendev. org/c/openstack /designate/ +/830549
https:/