Sunday, 2022-05-22

eanderssonStarting with openstacksdk==0.99 flavod id is now represented by the flavor name and not the flavor id. This breaks Senlin. Is that intended?06:48
eandersson*flavor06:49
eanderssonActually looks like the openstacksdk returns more data now and one of the fields is flavor id (but represenated by the flavor name instead)06:54
eanderssonSo basically compute.get_server now returns flavor id with 0.99 while in 0.61 it did not return a flavor id. 06:58
eandersson*include06:59
eanderssonIt seems odd that flavor_find would return an id, but the flavor field in server_get returns a "name" instead of "id" in the if field.07:18
eanderssonhttps://review.opendev.org/c/openstack/senlin/+/84285107:21
fricklereandersson: yes that is intended, let me find the fix we did in nodepool07:35
fricklerhttps://review.opendev.org/c/zuul/nodepool/+/834152 has some extended discussion on this very issue07:36
fricklerthe issue is that original_name can point to a flavor that has since been deleted. so you cannot rely on finding a match in the current list of flavors07:38
opendevreviewTakashi Kajinami proposed openstack/keystoneauth master: Bump tox minversion to 3.18.0  https://review.opendev.org/c/openstack/keystoneauth/+/84287013:27
opendevreviewTakashi Kajinami proposed openstack/keystoneauth master: Fix outdated python job template  https://review.opendev.org/c/openstack/keystoneauth/+/84288514:18
opendevreviewTakashi Kajinami proposed openstack/keystoneauth stable/yoga: stably-only: Fix wrong python job template  https://review.opendev.org/c/openstack/keystoneauth/+/84288614:18
opendevreviewTakashi Kajinami proposed openstack/keystoneauth master: Bump tox minversion to 3.18.0  https://review.opendev.org/c/openstack/keystoneauth/+/84287014:21
eanderssonfrickler: Looks like the same fix that I went with as well. We already had it in place, but kept an alternative for older versions. I still don’t get why the api returns an name as an id though 18:37
fricklerthe nova API does not return an id. the old sdk returned the API response 1:1 as a dict, the new sdk converts it to a Flavor object, which has an id field even if that is null18:49
fricklerto be clear, this is for the flavor field in the nova server API, not the flavor API18:50
eanderssonYea - but if the id field was null that would be fine20:33
fricklerah, right, now I remember, gtema made a weird (IMHO) patch that fills original_name into the id. I would agree to revert that.20:41
eanderssonYea - that is what breaks it for us.20:43
fricklerhttps://review.opendev.org/c/openstack/openstacksdk/+/826924/4/openstack/compute/v2/flavor.py#6920:43
eanderssonOur code checks if id is there, if not it gets it using the flavor call20:43
eanderssonbut because id is not none it assumes that it does not need to get any additional data20:44
fricklerhow do you handle deleted flavors?20:44
eanderssonI doubt this code is smart enough to handle that20:44
fricklerwhat do you need the flavor for?20:45
eanderssonIt's used to handle scale in so creating vms20:46
eanderssonthe problem is that I don't want to change the current behavior without digging in a lot further into how this works 20:46
eanderssonBut I don't really have the time and this is blocking the CI20:46
eanderssonThis is all stored in the database, so it would probably break something to switch away from id20:48
eanderssonhttps://paste.openstack.org/show/bcAcLpv3GNnvdZWxvWtY/20:48
eanderssonI guess I could change it to use name, throw in a release note and hope for the best :p20:52
eanderssonPretty sure I am the last maintainer of this project20:53
fricklerhmm, I guess then I can only suggest to use a different attribute like "vcpus" as a proxy to decide whether the id is a real id or a name that needs converting, cf. https://review.opendev.org/c/zuul/nodepool/+/834152/2/nodepool/driver/openstack/provider.py#14220:53
eanderssonGonna try to go the simplest route. I remember going through this last time as well and I feel like it's just a ticking timebomb.20:58
eanderssonI just wish I understood these code paths better.20:58
eanderssonAny other project just testing against trunk openstacksdk?21:01
eanderssonFeel like Senlin should just have a job that does that to give an earlier headsup21:01
fricklerwell osc obviously has one, and I think ansible-collection-openstack21:04
fricklerusually also we try not to break as much, but in this case it was necessary21:04
* frickler is out now, maybe gtema has some other idea tomorrow21:04
eanderssonSounds good. Thanks for the help.21:20

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!