Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'inspect' has no attribute 'getargspec' after upgrading to Fedora 37 #636

Open
tinsjourney opened this issue Nov 24, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@tinsjourney
Copy link

tinsjourney commented Nov 24, 2022

SUMMARY

After upgrading to Fedora37, module ovirt_network et ovirt_host_network failed with error :
module 'inspect' has no attribute 'getargspec'

COMPONENT NAME

ovirt_host_network
ovirt_network

but maybe other one

STEPS TO REPRODUCE
      - name: Create Openstack network
        ovirt_network:
          auth: "{{ ovirt_auth }}"
          data_center: "Default"
          clusters:
            - name: Default
              assigned: true
          name: "{{ item.name }}"
          vlan_tag: "{{ item.vlan }}"
          vm_network: true
        loop:
          - { name: "osp-provisionning-s0", vlan: 1 }

      - name: Add Openstack Network to Host
        ovirt_host_network:
          auth: "{{ ovirt_auth }}"
          name: rhvh.redhat.lab
          interface: enp1s0
          networks:
            - name: osp-provisionning-s0
EXPECTED RESULTS

logical network create and network host configured

ACTUAL RESULTS

TASK [Create Openstack network] ********************************************************************************************************************************************************************************************************************************************************************************************************************************************
Thursday 24 November 2022 17:16:59 +0100 (0:00:00.620) 0:00:03.714 *****
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: module 'inspect' has no attribute 'getargspec'
failed: [localhost] (item={'name': 'osp-provisionning-s0', 'vlan': 1}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "osp-provisionning-s0", "vlan": 1}, "msg": "module 'inspect' has no attribute 'getargspec'"}

@tinsjourney tinsjourney added the bug Something isn't working label Nov 24, 2022
@Gounick
Copy link

Gounick commented Nov 24, 2022

Hi, what are your versions?

  • Python
  • ansible / ansible-core
  • Ovirt collection
  • Ovirt sdk python
  • Ovirt engine

Also I think vlan: 1 is interpreted as a boolean. Try quoting it or forcing its type to an integer.

@tinsjourney
Copy link
Author

Hi,

Python 3.11.0
ansible-core: 2.13.5
ansible: 6.5.0
Ovirt Collection: 2.4.0
Ovirt sdk python : 4.5.2
Ovirt engine: 4.4.9.5

Ovirt-engine is the Red Hat version not the upstream one.
I tried quoting the vlan number, but stiil same issue

@mwperina
Copy link
Member

Try to downgrade to Python 3.9, that's the supported python version for ansible-core-2.13

@tinsjourney
Copy link
Author

I confirm it's working with python 3.9 and python 3.10, but not with the default python version shipped with fedora 37.
I also updated ansible-core to 2.14, ansible to 7.0.0 and same behavior regarding the version.

where can I find the matching between ansible-core and python, so I can open a BZ to Fedora ?

I also noticed getargspecs function is supposed to be deprecated in python, so I think the issue is still legit and will happen when python3.11 will be supported with ansible-core

@Gounick
Copy link

Gounick commented Nov 28, 2022

Personally i will see:

I recommend you to use a Python version manager like Pyenv for example, associated with Pipenv to become independent of your distribution's packages and avoid this inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants