Pure-Storage-Ansible / FlashArray-Collection

Ansible Collection for Pure Storage FlashArray
GNU General Public License v3.0
19 stars 21 forks source link

help with this error ValueError: version 2.26 not supported by client. #574

Closed amlucent closed 1 month ago

amlucent commented 1 month ago

I am at a dark site and I think I am just having dependency issues. This code works on some arrays with Purity v6.3.12 but fails with the below error on Purity v6.5.3

  - name: Collect all Snapshot info  
      delegate_to: localhost 
      purestorage.flasharray.purefa_info: 
        gather_subset: 
          - snapshots 
        fa_url: "{{ fa_url }}" 
        api_token: "{{ fa_api }}" 
      register: snap_info 

TASK [Collect all Snapshot info] *** fatal: [CK-SPFA05 -> localhost]: FAILED! => changed=false module_stderr: |- /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1063: InsecureRequestWarning: Unverified HTTPS request is being made to host 'ck-spfa05-cb21ul'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1063: InsecureRequestWarning: Unverified HTTPS request is being made to host 'ck-spfa05-cb21ul'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1063: InsecureRequestWarning: Unverified HTTPS request is being made to host 'ck-spfa05-cb21ul'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1063: InsecureRequestWarning: Unverified HTTPS request is being made to host 'ck-spfa05-cb21ul'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1063: InsecureRequestWarning: Unverified HTTPS request is being made to host 'ck-spfa05-cb21ul'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1063: InsecureRequestWarning: Unverified HTTPS request is being made to host 'ck-spfa05-cb21ul'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1063: InsecureRequestWarning: Unverified HTTPS request is being made to host 'ck-spfa05-cb21ul'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings InsecureRequestWarning, Traceback (most recent call last): File "/root/tmp/.ansible/tmp/ansible-tmp-1717089350.164376-437202-64298671050956/AnsiballZ_purefa_info.py", line 100, in _ansiballz_main() File "/root/tmp/.ansible/tmp/ansible-tmp-1717089350.164376-437202-64298671050956/AnsiballZ_purefa_info.py", line 92, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/root/tmp/.ansible/tmp/ansible-tmp-1717089350.164376-437202-64298671050956/AnsiballZ_purefa_info.py", line 41, in invoke_module run_name='main', alter_sys=True) File "/usr/lib64/python3.6/runpy.py", line 205, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_9j6d_01d/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 1795, in File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_9j6d_01d/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 1747, in main File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_9j6d_01d/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 892, in generate_snap_dict File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_9j6d_01d/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/module_utils/purefa.py", line 117, in get_array File "/usr/local/lib/python3.6/site-packages/py_pure_client-1.29.0-py3.6.egg/pypureclient/flasharray/client.py", line 99, in Client File "/usr/local/lib/python3.6/site-packages/py_pure_client-1.29.0-py3.6.egg/pypureclient/flasharray/client.py", line 124, in validate_version ValueError: version 2.26 not supported by client. module_stdout: '' msg: |- MODULE FAILURE See stdout/stderr for the exact error rc: 1

sdodsley commented 1 month ago

@amlucent Your py-pure-client seems to be at 1.29.0. That SDK is now at 1.50.0. Please see if you can upgrade and see if that resolves the issue.

amlucent commented 1 month ago

I have updated all kinds of python packages here. I hate working on a dark site for python dependencies. This is from a RHEL 9 machine (trying a newer version of python and all these published prereqs.

TASK [Collect all Snapshot info] *******************************************************************************************
fatal: [SPFA05 -> localhost]: FAILED! => changed=false 
  module_stderr: |-
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'spfa05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'spfa05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'spfa05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'spfa05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'spfa05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'spfa05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'spfa05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    Traceback (most recent call last):
      File "/root/.ansible/tmp/ansible-tmp-1717103406.9261289-2390244-224095389882885/AnsiballZ_purefa_info.py", line 107, in <module>
        _ansiballz_main()
      File "/root/.ansible/tmp/ansible-tmp-1717103406.9261289-2390244-224095389882885/AnsiballZ_purefa_info.py", line 99, in _ansiballz_main
        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
      File "/root/.ansible/tmp/ansible-tmp-1717103406.9261289-2390244-224095389882885/AnsiballZ_purefa_info.py", line 47, in invoke_module
        runpy.run_module(mod_name='ansible_collections.purestorage.flasharray.plugins.modules.purefa_info', init_globals=dict(_module_fqn='ansible_collections.purestorage.flasharray.plugins.modules.purefa_info', _modlib_path=modlib_path),
      File "/usr/lib64/python3.9/runpy.py", line 225, in run_module
        return _run_module_code(code, init_globals, run_name, mod_spec)
      File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code
        _run_code(code, mod_globals, init_globals,
      File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_99dqh3sf/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 1795, in <module>
      File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_99dqh3sf/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 1747, in main
      File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_99dqh3sf/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 914, in generate_snap_dict
      File "/usr/local/lib/python3.9/site-packages/pypureclient/flasharray/FA_2_26/models/snapshot_space.py", line 169, in __getattribute__
        raise AttributeError
    AttributeError
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1

PLAY RECAP *****************************************************************************************************************
SPFA05           : ok=3    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

$ python3 --version
Python 3.9.18
$ ansible --version
ansible [core 2.14.9]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/ipausers/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /home/ipausers/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.18 (main, Jan  4 2024, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
sdodsley commented 1 month ago

Can you also check you are running the latest FlashArray Collection... 1.28.0

If not then can you post the play causing the failure

amlucent commented 1 month ago

the play:

  - name: Collect all Snapshot info  
      delegate_to: localhost 
      purestorage.flasharray.purefa_info: 
        gather_subset: 
          - snapshots 
        fa_url: "{{ fa_url }}" 
        api_token: "{{ fa_api }}" 
      register: snap_info 

packages on the RHEL 9 server

.ansible/collections/ansible_collections
Collection             Version
---------------------- -------
ansible.netcommon      5.1.1  
ansible.posix          1.5.4  
ansible.utils          2.10.3 
cisco.nxos             4.3.0  
cohesity.dataprotect   1.1.1  
community.general      7.0.0  
dellemc.powerstore     2.0.0  
lvrfrc87.git_acp       2.2.0  
purestorage.flasharray 1.28.0 
purestorage.flashblade 1.11.0 

# /usr/share/ansible/collections/ansible_collections
Collection             Version
---------------------- -------
purestorage.flasharray 1.28.0

python3 -m pip install pycountry netaddr requests py-pure-client purestorage
Looking in indexes: https://artifactory.fbinet.fbi/artifactory/api/pypi/pypi-authorized/simple
Requirement already satisfied: pycountry in /usr/local/lib/python3.9/site-packages (23.12.11)
Requirement already satisfied: netaddr in /usr/lib/python3.9/site-packages (0.8.0)
Requirement already satisfied: requests in /usr/lib/python3.9/site-packages (2.25.1)
Requirement already satisfied: py-pure-client in /usr/local/lib/python3.9/site-packages (1.50.0)
Requirement already satisfied: purestorage in /usr/local/lib/python3.9/site-packages (1.19.0)
Requirement already satisfied: chardet<5,>=3.0.2 in /usr/lib/python3.9/site-packages (from requests) (4.0.0)
Requirement already satisfied: idna<3,>=2.5 in /usr/lib/python3.9/site-packages (from requests) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.9/site-packages (from requests) (1.26.18)
Requirement already satisfied: certifi>=2022.9.24 in /usr/local/lib/python3.9/site-packages (from py-pure-client) (2024.2.2)
Requirement already satisfied: six>=1.10 in /usr/local/lib/python3.9/site-packages (from py-pure-client) (1.16.0)
Requirement already satisfied: python-dateutil>=2.5.3 in /usr/lib/python3.9/site-packages (from py-pure-client) (2.8.1)
Requirement already satisfied: setuptools>=21.0.0 in /usr/lib/python3.9/site-packages (from py-pure-client) (53.0.0)
Requirement already satisfied: paramiko>=2.11.0 in /usr/local/lib/python3.9/site-packages (from py-pure-client) (3.4.0)
Requirement already satisfied: pyjwt>=2.0.0 in /usr/local/lib/python3.9/site-packages (from py-pure-client) (2.8.0)
Requirement already satisfied: bcrypt>=3.2 in /usr/local/lib64/python3.9/site-packages (from paramiko>=2.11.0->py-pure-client) (4.1.2)
Requirement already satisfied: cryptography>=3.3 in /usr/lib64/python3.9/site-packages (from paramiko>=2.11.0->py-pure-client) (36.0.1)
Requirement already satisfied: pynacl>=1.5 in /usr/local/lib64/python3.9/site-packages (from paramiko>=2.11.0->py-pure-client) (1.5.0)
Requirement already satisfied: cffi>=1.12 in /usr/lib64/python3.9/site-packages (from cryptography>=3.3->paramiko>=2.11.0->py-pure-client) (1.14.5)
Requirement already satisfied: pycparser in /usr/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=3.3->paramiko>=2.11.0->py-pure-client) (2.20)
Requirement already satisfied: ply==3.11 in /usr/lib/python3.9/site-packages (from pycparser->cffi>=1.12->cryptography>=3.3->paramiko>=2.11.0->py-pure-client) (3.11)
TASK [Collect all Snapshot info] *******************************************************************************************
fatal: [SPFA05 -> localhost]: FAILED! => changed=false 
  module_stderr: |-
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      warnings.warn(
    Traceback (most recent call last):
      File "/root/.ansible/tmp/ansible-tmp-1717117786.2572916-2398416-233879371461765/AnsiballZ_purefa_info.py", line 107, in <module>
        _ansiballz_main()
      File "/root/.ansible/tmp/ansible-tmp-1717117786.2572916-2398416-233879371461765/AnsiballZ_purefa_info.py", line 99, in _ansiballz_main
        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
      File "/root/.ansible/tmp/ansible-tmp-1717117786.2572916-2398416-233879371461765/AnsiballZ_purefa_info.py", line 47, in invoke_module
        runpy.run_module(mod_name='ansible_collections.purestorage.flasharray.plugins.modules.purefa_info', init_globals=dict(_module_fqn='ansible_collections.purestorage.flasharray.plugins.modules.purefa_info', _modlib_path=modlib_path),
      File "/usr/lib64/python3.9/runpy.py", line 225, in run_module
        return _run_module_code(code, init_globals, run_name, mod_spec)
      File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code
        _run_code(code, mod_globals, init_globals,
      File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_z6s_8d96/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 1795, in <module>
      File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_z6s_8d96/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 1747, in main
      File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_z6s_8d96/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 914, in generate_snap_dict
      File "/usr/local/lib/python3.9/site-packages/pypureclient/flasharray/FA_2_26/models/snapshot_space.py", line 169, in __getattribute__
        raise AttributeError
    AttributeError
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1

PLAY RECAP *****************************************************************************************************************
SPFA05           : ok=3    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

SIMILAR RESULT FROM A RHEL 8 VM:

TASK [Collect all Snapshot info] *******************************************************************************************
fatal: [SPFA05 -> localhost]: FAILED! => changed=false 
  module_stderr: |-
    /usr/local/lib/python3.6/site-packages/PyJWT-2.0.0-py3.6.egg/jwt/utils.py:6: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography (40.0) will be the last to support Python 3.6.
      from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve
    /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1068: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      InsecureRequestWarning,
    /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1068: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      InsecureRequestWarning,
    /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1068: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      InsecureRequestWarning,
    /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1068: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      InsecureRequestWarning,
    /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1068: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      InsecureRequestWarning,
    /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1068: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      InsecureRequestWarning,
    /usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1068: InsecureRequestWarning: Unverified HTTPS request is being made to host 'SPFA05'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
      InsecureRequestWarning,
    Traceback (most recent call last):
      File "/root/tmp/.ansible/tmp/ansible-tmp-1717120989.0146046-3169-92703556795782/AnsiballZ_purefa_info.py", line 100, in <module>
        _ansiballz_main()
      File "/root/tmp/.ansible/tmp/ansible-tmp-1717120989.0146046-3169-92703556795782/AnsiballZ_purefa_info.py", line 92, in _ansiballz_main
        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
      File "/root/tmp/.ansible/tmp/ansible-tmp-1717120989.0146046-3169-92703556795782/AnsiballZ_purefa_info.py", line 41, in invoke_module
        run_name='__main__', alter_sys=True)
      File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
        return _run_module_code(code, init_globals, run_name, mod_spec)
      File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
        mod_name, mod_spec, pkg_name, script_name)
      File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_sjt2d4zn/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 1795, in <module>
      File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_sjt2d4zn/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 1747, in main
      File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_sjt2d4zn/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 915, in generate_snap_dict
      File "/usr/local/lib/python3.6/site-packages/pypureclient/flasharray/FA_2_26/models/snapshot_space.py", line 169, in __getattribute__
        raise AttributeError
    AttributeError
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1

PLAY RECAP *****************************************************************************************************************
SPFA05           : ok=3    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
sdodsley commented 1 month ago

@amlucent there is something strange here. The error states is being created in the generate_snap_dict function at line 915, however in the latest release of the code line 915 is not even in that function. I suspect you have some old code hanging around somewhere that is being picked up by the shell running the playbook. It might be worth deleting the flasharray collection (multiple time until it says there atrn't any more versions to delete) and then reinstall the collection again. If this is still causing an issue then we can look at setting up a call to debug this.

amlucent commented 1 month ago

@sdodsley I am still encountering this issue. I have rm'ed all traces of the old collections then rebooted for good measure before reinstalling. I am seeing the same error occurring on 914.

File "/tmp/ansible_purestorage.flasharray.purefa_info_payload_kui4pw40/ansible_purestorage.flasharray.purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py", line 914, in generate_snap_dict

This purefa_info seems to be the only module I cant run and it only errors on Purity OS v6.5.3.

sdodsley commented 1 month ago

Looking at the old code bases it appears you are, for some reason, using the module from Collection v1.21.0

amlucent commented 1 month ago

ok, ansible galaxy collections list did not show this at all but there was a ./collections folder in the root folder where my playbook lives. I deleted it and its working now. I apologize immensely for the goose chase.

amlucent commented 1 month ago

Thank you for all your help Simon and for making such a great module that makes my fleet management a breeze