openstack.cloud

84 views
Skip to first unread message

István Tóth

unread,
Dec 17, 2022, 10:55:07 AM12/17/22
to AWX Project
Hi all,

Could you help me, hogy to use openstack.cloud module in  AWX?
I'm just start using AWX, looks great and very promising. I have experiences in ansible, maybe not so much but I can use and complete my tasks.

This openstack.cloud modul would be nice for me to my new project but I faced always with an error that openstacksdk module is required. I checked the available collections and pip list where I can see the openstacksdk is there and the openstack.cloud collection also available.

So, what should I set / use to have connection with my openstack and operate there,
I also create an openstack credential in the AWX but still nothing.
I checked the openstacksdk site and the examples are worked for me, like listing images and so on. I created my clouds.yaml file, however I don't know this clouds.yaml file is needed here in AWX or the openstack credention is enough?

Thanks for your help.
Br,
Istvan

Tóth István

unread,
Dec 18, 2022, 6:33:01 AM12/18/22
to awx-p...@googlegroups.com
Hi,

I checked the issue more deeply and set the verbosity to 5 and I found the following results:
at the beginning it show that the awx container has python 3.8
// I'm using the awx-operator with 1.1.2 helm version
"
ansible-playbook [core 2.12.5.post0]
  config file = None
  configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
  ansible collection location = /runner/requirements_collections:/home/runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.8.13 (default, Jun 24 2022, 15:27:57) [GCC 8.5.0 20210514 (Red Hat 8.5.0-13)]
  jinja version = 2.11.3
  libyaml = True
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /runner/inventory/hosts as it did not pass its verify_file() method
Parsed /runner/inventory/hosts inventory source with script plugin
Loading collection openstack.cloud from /usr/share/ansible/collections/ansible_collections/openstack/cloud
Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python3.8/site-packages/ansible/plugins/callback/default.py
Loading callback plugin awx_display of type stdout, v2.0 from /usr/local/lib/python3.8/site-packages/ansible_runner/display_callback/callback/awx_display.py
Attempting to use 'awx_display' callback.
Skipping callback 'awx_display', as we already have a stdout callback.
Attempting to use 'default' callback.
Skipping callback 'default', as we already have a stdout callback.
Attempting to use 'junit' callback.
Attempting to use 'minimal' callback.
Skipping callback 'minimal', as we already have a stdout callback.
Attempting to use 'oneline' callback.
Skipping callback 'oneline', as we already have a stdout callback.
Attempting to use 'tree' callback.
...
"
then later where I would like to check the openstack.cloud task I've got this error:
"
Including module_utils file ansible/module_utils/errors.py
Including module_utils file ansible/module_utils/parsing/convert_bool.py
Including module_utils file ansible/module_utils/parsing/__init__.py
Including module_utils file ansible/module_utils/pycompat24.py
Including module_utils file ansible/module_utils/six/__init__.py
Including module_utils file ansible_collections/openstack/cloud/plugins/module_utils/openstack.py
Including module_utils file ansible/module_utils/compat/version.py
Including module_utils file ansible_collections/__init__.py
Including module_utils file ansible_collections/openstack/__init__.py
Including module_utils file ansible_collections/openstack/cloud/__init__.py
Including module_utils file ansible_collections/openstack/cloud/plugins/__init__.py
Including module_utils file ansible_collections/openstack/cloud/plugins/module_utils/__init__.py
Using module file /usr/share/ansible/collections/ansible_collections/openstack/cloud/plugins/modules/network.py
<local> PUT /home/runner/.ansible/tmp/ansible-local-19rjw3w42a/tmpbrslzyy5 TO /home/runner/.ansible/tmp/ansible-tmp-1671359442.33985-83-174751387099332/AnsiballZ_network.py
<local> EXEC /bin/sh -c 'chmod u+x /home/runner/.ansible/tmp/ansible-tmp-1671359442.33985-83-174751387099332/ /home/runner/.ansible/tmp/ansible-tmp-1671359442.33985-83-174751387099332/AnsiballZ_network.py && sleep 0'
<local> EXEC /bin/sh -c '/usr/libexec/platform-python /home/runner/.ansible/tmp/ansible-tmp-1671359442.33985-83-174751387099332/AnsiballZ_network.py && sleep 0'
<local> EXEC /bin/sh -c 'rm -f -r /home/runner/.ansible/tmp/ansible-tmp-1671359442.33985-83-174751387099332/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
  File "/tmp/ansible_openstack.cloud.network_payload_vnvg675s/ansible_openstack.cloud.network_payload.zip/ansible_collections/openstack/cloud/plugins/module_utils/openstack.py", line 356, in openstack_cloud_from_module
    sdk = importlib.import_module('openstack')
  File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
fatal: [local]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "admin_state_up": true,
            "api_timeout": null,
            "auth": null,
  …
"

I'm not so familiar in python programing, but it seems this component looking for a different openstacksdk which is definitely not there.
Does it a bug or I did something wrong?

Could you help me  in this topic? 

Thanks,
Istvan


--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/fa36aacc-2b19-4fb9-a76c-e0025c81a450n%40googlegroups.com.

AWX Project

unread,
Dec 21, 2022, 3:05:14 PM12/21/22
to AWX Project
Hi!

Are you using the default awx version with operator 1.1.2, which should be v21.10.1?

AWX Team
Reply all
Reply to author
Forward
0 new messages