In Train, when you perform an 'openstack security group delete <name>', the initial lookup by name fails and the client falls back to using the 'name' parameter/filter (/security-groups?name=<name>). This lookup is quick and the security group is found and deleted. However, on Rocky/Stein (e.g. client 3.18.1), instead of searching by parameter, the client appears to perform a full list of security-groups without limiting the fields and takes a long time.
Continuing from the mailing list...
In Train, when you perform an 'openstack security group delete <name>', the initial lookup by name fails and the client falls back to using the 'name' parameter/filter (/security- groups? name=<name> ). This lookup is quick and the security group is found and deleted. However, on Rocky/Stein (e.g. client 3.18.1), instead of searching by parameter, the client appears to perform a full list of security-groups without limiting the fields and takes a long time.
'openstack security group list' with patch: 10.0.236. 150:9696/ v2.0/security- groups? fields= set%28% 5B%27descriptio n%27%2C+ %27project_ id%27%2C+ %27id%27% 2C+%27tags% 27%2C+% 27name% 27%5D%29" -H "Accept: application/json" -H "User-Agent: openstacksdk/0.27.0 keystoneauth1/ 3.13.1 python- requests/ 2.21.0 CPython/2.7.17" -H "X-Auth-Token: {SHA256} 3e747da939e8c4b efe72d5ca710597 1508bd56cdf3620 8ba6b960d1aee6d 19b6"
REQ: curl -g -i -X GET "http://
'openstack security group delete <name>':
Train (notice the name param): 10.20.0. 11:9696/ v2.0/security- groups/ train-test- 1755 -H "User-Agent: openstacksdk/0.36.0 keystoneauth1/ 3.17.1 python- requests/ 2.22.0 CPython/3.6.7" -H "X-Auth-Token: {SHA256} bf291d5f1290387 6fc69151db37d29 5da961ba684a575 e77fb6f4829b55d f1bf" 10.20.0. 11:9696 "GET /v2.0/security- groups/ train-test- 1755 HTTP/1.1" 404 125 10.20.0. 11:9696/ v2.0/security- groups? name=train- test-1755" -H "Accept: application/json" -H "User-Agent: openstacksdk/0.36.0 keystoneauth1/ 3.17.1 python- requests/ 2.22.0 CPython/3.6.7" -H "X-Auth-Token: {SHA256} bf291d5f1290387 6fc69151db37d29 5da961ba684a575 e77fb6f4829b55d f1bf" 10.20.0. 11:9696 "GET /v2.0/security- groups? name=train- test-1755 HTTP/1.1" 200 1365
REQ: curl -g -i -X GET http://
http://
REQ: curl -g -i -X GET "http://
http://
Stein & below (notice lack of fields): 10.0.236. 150:9696/ v2.0/security- groups/ stein-test- 5189 -H "User-Agent: openstacksdk/0.27.0 keystoneauth1/ 3.13.1 python- requests/ 2.21.0 CPython/2.7.17" -H "X-Auth-Token: {SHA256} e9f87afe851ff53 80d8402ee81199c 466be9c84fe67ed 0302e8b178f33aa 1fc2" 10.0.236. 150:9696 "GET /v2.0/security- groups/ stein-test- 5189 HTTP/1.1" 404 125 10.0.236. 150:9696/ v2.0/security- groups -H "Accept: application/json" -H "User-Agent: openstacksdk/0.27.0 keystoneauth1/ 3.13.1 python- requests/ 2.21.0 CPython/2.7.17" -H "X-Auth-Token: {SHA256} e9f87afe851ff53 80d8402ee81199c 466be9c84fe67ed 0302e8b178f33aa 1fc2"
REQ: curl -g -i -X GET http://
http://
REQ: curl -g -i -X GET http://
<wait awhile while it compiles and returns the full list, then the single SG object is deleted>
Probably a fix that can piggyback the existing patch, but if not, happy to open another bug.
Thanks!