Wednesday, 2024-04-17

opendevreviewMerged openstack/openstacksdk master: volume: Allow setting volume statuses individually  https://review.opendev.org/c/openstack/openstacksdk/+/91572210:37
opendevreviewMerged openstack/openstacksdk master: volume: Add ability to set, unset image metadata  https://review.opendev.org/c/openstack/openstacksdk/+/91572310:37
opendevreviewMerged openstack/openstacksdk master: volume: Allow passing a volume type object to retype_volume  https://review.opendev.org/c/openstack/openstacksdk/+/91572410:37
opendevreviewMerged openstack/openstacksdk master: Add Tap Mirrors to SDK  https://review.opendev.org/c/openstack/openstacksdk/+/88608410:37
opendevreviewArtem Goncharov proposed openstack/codegenerator master: add volume.limit schema  https://review.opendev.org/c/openstack/codegenerator/+/91610312:49
opendevreviewArtem Goncharov proposed openstack/codegenerator master: add volume.resource_filters schema  https://review.opendev.org/c/openstack/codegenerator/+/91610412:49
ozzzo_workWe're rebuilding our clusters from Train to Wallaby, and we're having some trouble with the compute SDK now. We're calling cloud.compute.hypervisors(details=True) and in Train that returns a bunch of stuff14:06
ozzzo_workfree_disk_gb': 2744, 'local_gb': 3574, 'memory_mb_used': 169504,...14:06
ozzzo_workIn Wallaby, these values come back "None"14:06
ozzzo_workWe get some basic stuff like the hypervisor name and IP, but many of the values are "None"14:07
ozzzo_workDo we need to use a different syntax for Wallaby?14:07
opendevreviewMerged openstack/codegenerator master: add volume.limit schema  https://review.opendev.org/c/openstack/codegenerator/+/91610314:17
opendevreviewMerged openstack/codegenerator master: add volume.resource_filters schema  https://review.opendev.org/c/openstack/codegenerator/+/91610414:31
ozzzo_workIn the code I see "# Lot of attributes are dropped in 2.88"15:26
ozzzo_workhttps://github.com/openstack/openstacksdk/blob/master/openstack/compute/v2/hypervisor.py#L3415:26
ozzzo_workIs it possible to use <2.88 with Wallaby?15:26
opendevreviewArtem Goncharov proposed openstack/codegenerator master: add volume.snapshot schemas  https://review.opendev.org/c/openstack/codegenerator/+/91612215:57
ozzzo_workWhen I use CLi it seems to be using 2.116:00
ozzzo_workREQ: curl -g -i -X GET https://api-ext.region.ourdomain.com:8774/v2.1/os-hypervisors/detail16:05
opendevreviewMerged openstack/codegenerator master: add volume.snapshot schemas  https://review.opendev.org/c/openstack/codegenerator/+/91612216:30
stephenfinozzzo_work: yeah, you'll need to request an older microversion to get that stuff back. Or better, query placement which has far more accurate and useful info available17:21
stephenfinYou can also pass an 'X-OpenStack-Nova-API-Version' header with curl to get microversioned responses back17:22
ozzzo_workstephenfin: What's the best way to request an older version in my SDK call? This is what I'm doing now:17:31
ozzzo_work  for hypervisor in cloud.compute.hypervisors(details=True):17:31
stephenfinjust pass `microversion='2.xx'`17:38
ozzzo_workI tried this: for hypervisor in cloud.compute.hypervisors(details=True,microversion='2.1'):17:41
ozzzo_workbut I get error "openstack.exceptions.InvalidResourceQuery: Invalid query params: microversion"17:42
stephenfin>>> from openstack import connection17:44
stephenfin>>> conn = connection.Connection('devstack-admin')17:44
stephenfin>>> list(conn.compute.hypervisors(detail=True, microversion='2.50'))17:44
stephenfin[...]17:44
stephenfinworking fine on my end?17:44
stephenfinusing 3.0.117:44
stephenfinAlso fine on 2.1.0 fwiw17:46
ozzzo_workI must be missing something. I see that you're using "detail=True" but I have "details=True" and if I remove the "s" I get an error: 17:48
ozzzo_workopenstack.exceptions.InvalidResourceQuery: Invalid query params: microversion,detail17:48
ozzzo_workMaybe I need to import connection separately? I'm just importing openstack17:49
ozzzo_workThen I create the connection with " cloud = openstack.connect(cloud='envvars')"17:50
ozzzo_workTried that; it didn't make a difference. I see that I'm running the SDK from /app/venv/ent-ansible-2.9.27/lib64/python3.6/site-packages/openstack/resource.py - do I need to use a newer version of the SDK?17:58
stephenfinozzzo_work: Yeah, no idea what's going on unfortunately. detail (without the 's', i.e. a typo) was just being ignored for me. If I correct it to 'details' I get the actual detailed response. No issues using connect directly from openstack either18:16
stephenfin>>> import openstack18:16
stephenfin>>> cloud = openstack.connect(cloud='devstack-admin')18:16
stephenfin>>> list(cloud.compute.hypervisors(details=True,microversion='2.1'))18:16
stephenfin[...]18:16
stephenfin(also works if I use envvars, fwiw)18:17
stephenfinI'd say you have an old version of openstacksdk tbh18:18
stephenfinYeah, it fails if I run with openstacksdk 0.59.0. Works on 1.1.0 though. You need a newer SDK version18:19
ozzzo_worklooks like that was it; ty stephenfin 18:21

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