opendevreview | Merged openstack/openstacksdk master: volume: Allow setting volume statuses individually https://review.opendev.org/c/openstack/openstacksdk/+/915722 | 10:37 |
---|---|---|
opendevreview | Merged openstack/openstacksdk master: volume: Add ability to set, unset image metadata https://review.opendev.org/c/openstack/openstacksdk/+/915723 | 10:37 |
opendevreview | Merged openstack/openstacksdk master: volume: Allow passing a volume type object to retype_volume https://review.opendev.org/c/openstack/openstacksdk/+/915724 | 10:37 |
opendevreview | Merged openstack/openstacksdk master: Add Tap Mirrors to SDK https://review.opendev.org/c/openstack/openstacksdk/+/886084 | 10:37 |
opendevreview | Artem Goncharov proposed openstack/codegenerator master: add volume.limit schema https://review.opendev.org/c/openstack/codegenerator/+/916103 | 12:49 |
opendevreview | Artem Goncharov proposed openstack/codegenerator master: add volume.resource_filters schema https://review.opendev.org/c/openstack/codegenerator/+/916104 | 12:49 |
ozzzo_work | We'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 stuff | 14:06 |
ozzzo_work | free_disk_gb': 2744, 'local_gb': 3574, 'memory_mb_used': 169504,... | 14:06 |
ozzzo_work | In Wallaby, these values come back "None" | 14:06 |
ozzzo_work | We get some basic stuff like the hypervisor name and IP, but many of the values are "None" | 14:07 |
ozzzo_work | Do we need to use a different syntax for Wallaby? | 14:07 |
opendevreview | Merged openstack/codegenerator master: add volume.limit schema https://review.opendev.org/c/openstack/codegenerator/+/916103 | 14:17 |
opendevreview | Merged openstack/codegenerator master: add volume.resource_filters schema https://review.opendev.org/c/openstack/codegenerator/+/916104 | 14:31 |
ozzzo_work | In the code I see "# Lot of attributes are dropped in 2.88" | 15:26 |
ozzzo_work | https://github.com/openstack/openstacksdk/blob/master/openstack/compute/v2/hypervisor.py#L34 | 15:26 |
ozzzo_work | Is it possible to use <2.88 with Wallaby? | 15:26 |
opendevreview | Artem Goncharov proposed openstack/codegenerator master: add volume.snapshot schemas https://review.opendev.org/c/openstack/codegenerator/+/916122 | 15:57 |
ozzzo_work | When I use CLi it seems to be using 2.1 | 16:00 |
ozzzo_work | REQ: curl -g -i -X GET https://api-ext.region.ourdomain.com:8774/v2.1/os-hypervisors/detail | 16:05 |
opendevreview | Merged openstack/codegenerator master: add volume.snapshot schemas https://review.opendev.org/c/openstack/codegenerator/+/916122 | 16:30 |
stephenfin | ozzzo_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 available | 17:21 |
stephenfin | You can also pass an 'X-OpenStack-Nova-API-Version' header with curl to get microversioned responses back | 17:22 |
ozzzo_work | stephenfin: 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 |
stephenfin | just pass `microversion='2.xx'` | 17:38 |
ozzzo_work | I tried this: for hypervisor in cloud.compute.hypervisors(details=True,microversion='2.1'): | 17:41 |
ozzzo_work | but I get error "openstack.exceptions.InvalidResourceQuery: Invalid query params: microversion" | 17:42 |
stephenfin | >>> from openstack import connection | 17:44 |
stephenfin | >>> conn = connection.Connection('devstack-admin') | 17:44 |
stephenfin | >>> list(conn.compute.hypervisors(detail=True, microversion='2.50')) | 17:44 |
stephenfin | [...] | 17:44 |
stephenfin | working fine on my end? | 17:44 |
stephenfin | using 3.0.1 | 17:44 |
stephenfin | Also fine on 2.1.0 fwiw | 17:46 |
ozzzo_work | I 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_work | openstack.exceptions.InvalidResourceQuery: Invalid query params: microversion,detail | 17:48 |
ozzzo_work | Maybe I need to import connection separately? I'm just importing openstack | 17:49 |
ozzzo_work | Then I create the connection with " cloud = openstack.connect(cloud='envvars')" | 17:50 |
ozzzo_work | Tried 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 |
stephenfin | ozzzo_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 either | 18:16 |
stephenfin | >>> import openstack | 18: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 |
stephenfin | I'd say you have an old version of openstacksdk tbh | 18:18 |
stephenfin | Yeah, it fails if I run with openstacksdk 0.59.0. Works on 1.1.0 though. You need a newer SDK version | 18:19 |
ozzzo_work | looks 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/!