| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-sdks - 2022-12-08 | |||
| 13:49:50 | eest | openstacksdk 0.101.0 | |
| 13:50:05 | eest | hmm, ok... | |
| 13:52:12 | frickler | do you set up your cloud from clouds.yaml or by explicit auth parameters? | |
| 13:52:55 | eest | clouds.yaml | |
| 13:53:53 | eest | is there a way to request a specifc microversion in that? tried looking earlier and came up emtpy | |
| 13:58:21 | frickler | eest: set "compute_api_version: 2.90" | |
| 13:58:28 | eest | i am just doing: conn = openstack.connect(cloud="openstack") | |
| 13:58:33 | eest | so it is very opaque | |
| 13:58:37 | frickler | same here | |
| 13:59:00 | eest | will try to add your thing to the file | |
| 13:59:03 | frickler | if I set "compute_api_version: 2.1" I get the same error as you | |
| 13:59:24 | frickler | but without anything specified the sdk should use the latest available version | |
| 14:03:45 | eest | with your addition i see -H "X-OpenStack-Nova-API-Version: 2.9" in the debug request, so seems like it is being picked up, still the same error | |
| 14:05:35 | eest | the resp does echo x-openstack-nova-api-version: 2.9, not sure that means it was accepted server side or just echoing what i sent to it | |
| 14:09:32 | eest | (of course, interesting that it strips the trailing zero, i have verifed it is not missing in the config) | |
| 14:14:37 | eest | this is interesting, i tried changing it to 2.79 just since this seemed to work with openstack CLI earlier, and now a call to conn.compute.find_image(image_name) earlier in the code fails with a "The resource could not be found." | |
| 14:16:41 | frickler | eest: 2.9 is too old, I wrote 2.90 | |
| 14:17:10 | frickler | ah, wait, you may need to quota that, so it becomes a string | |
| 14:18:27 | eest | right, yes, quoting it is one step better, now it fails: "Version 2.90 is not supported by the API. Minimum is 2.1 and maximum is 2.79" | |
| 14:18:31 | eest | one step closer! | |
| 14:19:51 | frickler | o.k., then 2.79 is the correct value for you, that's train. pretty old but still should work | |
| 14:22:04 | frickler | but you should not use conn.compute.find_image, use conn.image.find_image() | |
| 14:24:07 | eest | that code is based on teh create_server example at https://docs.openstack.org/openstacksdk/latest/user/guides/compute.html | |
| 14:24:23 | eest | so i get image and flavor via the compute call | |
| 14:24:48 | eest | is the example outdated? | |
| 14:28:56 | frickler | eest: it seems so, yes | |
| 14:30:48 | eest | roger, ill change it and see what happens | |
| 14:31:36 | eest | oh shit, i just might have worked | |
| 14:35:01 | eest | yeah, trying to create it with a nonexistant type name also fails as expected now: "Volume type fastt could not be found." | |
| 14:35:13 | eest | so it seems to do what it is supposed to | |
| 14:35:55 | eest | im curious if it is a separate issue that my openstacksdk did not automatically go for the later available compute api version | |
| 14:36:23 | eest | but thanks a lot for helping me with this, not sure how long it would have taken to figure this out myself | |
| 14:36:56 | eest | stephenfin: also, thanks for your review on https://review.opendev.org/c/openstack/openstacksdk/+/865667 | |
| 14:37:53 | stephenfin | nw | |
| 15:20:33 | eest | frickler: is the automatic api version detection described anywhere? it seems it is not happening for me at least | |
| 15:40:17 | frickler | eest: I'm not sure, I'll have to dig a bit tomorrow | |
| 15:43:50 | eest | the only version related setting i had in my file was identity_api_version, i tried commenting out that in case it somehow influenced something but the result was the same | |
| 16:04:34 | stephenfin | eest: an automatic microversion is taken from the _max_microversion variable in a given resource. For 'create_server' that would 'Server' in openstack.compute.v2.server | |
| 16:06:08 | stephenfin | eest: However, that can be overridden by user-level configuration, by either providing a 'microversion' parameter to various methods or setting '{service}_api_version' in clouds.yaml | |
| 16:06:49 | stephenfin | OSC also supports configuration via command line options of environment variables but you'd need to do some wiring up to support that in pure SDK | |
| 16:09:46 | stephenfin | gtema: can you look at https://review.opendev.org/c/openstack/openstacksdk/+/864029 to unblock some OSC work I've been workingo n? | |
| 16:09:49 | stephenfin | *working on | |
| 18:46:21 | opendevreview | Stephen Finucane proposed openstack/openstacksdk master: image: Add missing image import options https://review.opendev.org/c/openstack/openstacksdk/+/864029 | |
| 18:46:22 | opendevreview | Stephen Finucane proposed openstack/openstacksdk master: image: Remove _base_proxy module https://review.opendev.org/c/openstack/openstacksdk/+/867041 | |
| 18:46:22 | opendevreview | Stephen Finucane proposed openstack/openstacksdk master: image: Reformat proxy modules https://review.opendev.org/c/openstack/openstacksdk/+/867040 | |
| 18:46:23 | opendevreview | Stephen Finucane proposed openstack/openstacksdk master: image: Modify signatures of various image methods https://review.opendev.org/c/openstack/openstacksdk/+/867043 | |
| 18:46:23 | opendevreview | Stephen Finucane proposed openstack/openstacksdk master: image: Remove unnecessary abstractions https://review.opendev.org/c/openstack/openstacksdk/+/867042 | |
| 18:46:24 | opendevreview | Stephen Finucane proposed openstack/openstacksdk master: image: Prevent passing conflicts args to stage_image https://review.opendev.org/c/openstack/openstacksdk/+/867045 | |
| 18:46:24 | opendevreview | Stephen Finucane proposed openstack/openstacksdk master: image: Remove unsupported parameters from v1 proxy https://review.opendev.org/c/openstack/openstacksdk/+/867044 | |
| #openstack-sdks - 2022-12-09 | |||
| 08:03:08 | eest | stephenfin: my compute/v2/server.py states _max_microversion = '2.73', and if i set that version in clouds.yaml i see '-H "OpenStack-API-Version: compute 2.73"' in the debug out put, but if i comment it out there is no such header being sent and the request fails, not sure i am doing something wrong | |
| 08:06:49 | eest | i guess it is also interesting that even if that max version is present in the code i can also make it do -H "OpenStack-API-Version: compute 2.79" requests by setting that higher version in the config, so it does not seem to cap it either | |
| 08:15:04 | eest | i did note that calling conn.config.get_api_version("compute") returns None unless i set a value in clouds.yaml | |
| 08:19:05 | eest | frickler: would be intersting to hear what your code returns regarding the config when you are not setting the value | |
| 08:29:17 | frickler | the get_api_version returns None for me too when I don't have the override in clouds.yaml. and the debug log for the server create does also show the 2.73 being requested | |
| 08:30:32 | eest | interesting | |
| 08:30:52 | frickler | but I omitted some of the parameters you use, no user_data, key_name and scheduler_hints. maybe the issue is hiding somewhere in those | |
| 08:31:12 | eest | right, yes it is a lot of stuff im sending | |
| 08:31:40 | eest | ill try commenting them out | |
| 08:32:43 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Moved Octavia image upload and CirrOS image identification to Ansible https://review.opendev.org/c/openstack/ansible-collections-openstack/+/866795 | |
| 08:35:34 | eest | same error with https://paste.opendev.org/show/bGVtHfX0SdE3UECFa68R/ | |
| 08:39:40 | eest | other things i have in my config is auth_url, application_credential_id, application_credential_secret, region_name, interface, identity_api_version and auth_type | |
| 08:54:23 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: [DNM] Refactored coe_cluster{,_template} modules https://review.opendev.org/c/openstack/ansible-collections-openstack/+/866796 | |
| 10:44:50 | stephenfin | eest: That's very strange. It works as intended for me https://paste.opendev.org/show/b6wyrVyFUB4Xs4PL09La/ | |
| 10:45:11 | stephenfin | eest: Can you create a venv, install openstacksdk from master, and try again? | |
| 10:45:28 | stephenfin | Also, are you certain there's no compute_api_version defined in clouds.yaml? | |
| 10:46:08 | stephenfin | I also changed '_max_microversion' in openstack/compute/v2/server.py to 2.76 and SDK started using that version once I restarted the interpreter | |
| 11:48:54 | opendevreview | PB proposed openstack/ansible-collections-openstack master: Bulk creation of OpenStack SG rules https://review.opendev.org/c/openstack/ansible-collections-openstack/+/863208 | |
| 12:24:10 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Allow all external commands in tox https://review.opendev.org/c/openstack/ansible-collections-openstack/+/867096 | |
| 12:25:54 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Added tests for router interface creation in a shared network https://review.opendev.org/c/openstack/ansible-collections-openstack/+/840661 | |
| 12:26:17 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Dropped obsolete module templates https://review.opendev.org/c/openstack/ansible-collections-openstack/+/866683 | |
| 12:26:39 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Moved Octavia image upload and CirrOS image identification to Ansible https://review.opendev.org/c/openstack/ansible-collections-openstack/+/866795 | |
| 12:27:05 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: [DNM] Refactored coe_cluster{,_template} modules https://review.opendev.org/c/openstack/ansible-collections-openstack/+/866796 | |
| 13:09:35 | opendevreview | PB proposed openstack/ansible-collections-openstack master: Bulk creation of OpenStack SG rules https://review.opendev.org/c/openstack/ansible-collections-openstack/+/863208 | |
| 13:56:22 | eest | stephenfin: yes since i am able to get None out of conn.config.get_api_version("compute") when commenting out the line i added after the debugging here it feels certain that there are no overlapping stuff (the config is tiny, just for one site so it would be hard for stuff to hide) | |
| 13:56:29 | eest | ill see if i can throw together a venv | |
| 14:10:08 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Allow all external commands in tox https://review.opendev.org/c/openstack/ansible-collections-openstack/+/867096 | |
| 14:59:30 | eest | stephenfin: so i did this: python3 -m venv my-venv; . my-venv/bin/activate; pip3 install git+https://github.com/openstack/openstacksdk; pip3 list | grep openstack | |
| 14:59:33 | eest | openstacksdk 0.103.1.dev7 | |
| 14:59:54 | eest | still get "Additional properties are not allowed (u'volume_type' was unexpected)" | |
| 15:00:04 | eest | i am running this on macOS, not sure if that is relevant | |
| 15:05:34 | eest | i also see from the stack trace that i am inside my-venv/lib/python3.10/site-packages/openstack/exceptions.py so my script run should be picking up the venv-stuff as expected | |
| 15:19:57 | stephenfin | eest: just for sanity checking | |
| 15:19:58 | stephenfin | >>> import openstack | |
| 15:20:04 | stephenfin | >>> openstack.__path__ | |
| 15:20:09 | stephenfin | points to the venv? | |
| 15:20:30 | stephenfin | I ran the following against a local DevStack env using master of SDK. No issues | |
| 15:21:03 | stephenfin | https://paste.opendev.org/show/bfOAZEjUrUbXpTLwOCJ8/ | |
| 15:23:23 | stephenfin | https://paste.opendev.org/show/bA6QDIFI1ztr2IpLU2hW/ <-- output | |
| 15:24:54 | stephenfin | https://paste.opendev.org/show/bkrfwsJNzvo4tNsvGbVI/ <-- bog standard clouds.yaml generated by devstack | |
| 15:44:30 | opendevreview | Brian Haley proposed openstack/python-openstackclient master: Fix parameter handling in server add fixed ip cmd https://review.opendev.org/c/openstack/python-openstackclient/+/866811 | |
| 16:41:27 | opendevreview | Brian Haley proposed openstack/python-openstackclient master: Fix parameter handling in server add fixed ip cmd https://review.opendev.org/c/openstack/python-openstackclient/+/866811 | |
| 19:54:19 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Allow all external commands in tox https://review.opendev.org/c/openstack/ansible-collections-openstack/+/867096 | |
| 20:10:06 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Allow all external commands in tox https://review.opendev.org/c/openstack/ansible-collections-openstack/+/867096 | |
| 20:59:14 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Allow all external commands in tox https://review.opendev.org/c/openstack/ansible-collections-openstack/+/867096 | |
| 21:01:36 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Allow all external commands in tox https://review.opendev.org/c/openstack/ansible-collections-openstack/+/867096 | |
| #openstack-sdks - 2022-12-10 | |||
| 02:19:41 | opendevreview | Brian Haley proposed openstack/python-openstackclient master: Fix parameter handling in server add fixed ip cmd https://review.opendev.org/c/openstack/python-openstackclient/+/866811 | |
| 10:48:54 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Allow all external commands in tox https://review.opendev.org/c/openstack/ansible-collections-openstack/+/867096 | |
| 12:21:39 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Added tests for router interface creation in a shared network https://review.opendev.org/c/openstack/ansible-collections-openstack/+/840661 | |
| 13:24:39 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Dropped obsolete module templates https://review.opendev.org/c/openstack/ansible-collections-openstack/+/866683 | |
| 13:25:15 | opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Moved Octavia image upload and CirrOS image identification to Ansible https://review.opendev.org/c/openstack/ansible-collections-openstack/+/866795 | |