FlashArray-Collection icon indicating copy to clipboard operation
FlashArray-Collection copied to clipboard

purefa_pod results in failure when attemping active-dr pod promote

Open mboeckelmann opened this issue 8 months ago • 0 comments

Describe the bug When executing purefa_pod task to promote active-dr pod, FATAL error occurs:

fatal: [localhost]: FAILED! => {
    "changed": false,
    "module_stderr": "/home/svc-ansible/.local/lib/python3.10/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.10.6.119'. Adding certificate verification is strongly advised. See: [https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings\n](https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings%5Cn)  warnings.warn(\nTraceback (most recent call last):\n  File \"/home/svc-ansible/.ansible/tmp/ansible-tmp-1746810426.4983091-2234822-277984656110337/AnsiballZ_purefa_pod.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/home/svc-ansible/.ansible/tmp/ansible-tmp-1746810426.4983091-2234822-277984656110337/AnsiballZ_purefa_pod.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/svc-ansible/.ansible/tmp/ansible-tmp-1746810426.4983091-2234822-277984656110337/AnsiballZ_purefa_pod.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.purestorage.flasharray.plugins.modules.purefa_pod', init_globals=dict(_module_fqn='ansible_collections.purestorage.flasharray.plugins.modules.purefa_pod', _modlib_path=modlib_path),\n  File \"/usr/lib/python3.10/runpy.py\", line 224, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.10/runpy.py\", line 96, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_purestorage.flasharray.purefa_pod_payload_dl6gq0tx/ansible_purestorage.flasharray.purefa_pod_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_pod.py\", line 1019, in <module>\n  File \"/tmp/ansible_purestorage.flasharray.purefa_pod_payload_dl6gq0tx/ansible_purestorage.flasharray.purefa_pod_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_pod.py\", line 1007, in main\n  File \"/tmp/ansible_purestorage.flasharray.purefa_pod_payload_dl6gq0tx/ansible_purestorage.flasharray.purefa_pod_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_pod.py\", line 631, in update_pod\nTypeError: object of type 'bool' has no len()\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1

Error excerpt:

File \"/tmp/ansible_purestorage.flasharray.purefa_pod_payload_dl6gq0tx/ansible_purestorage.flasharray.purefa_pod_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_pod.py\", line 631, in update_pod\nTypeError: object of type 'bool' has no len()\n"

To Reproduce Steps to reproduce the behavior:

  1. Execute ansible-playbook task purefa_pod to promote active-dr pod. specify param undo: true
  2. Response above.

Expected behavior Expect pod to be promoted as indicated.

Screenshots N/A

Additional context in purefa_pod.py, method get_undo_pod is called. the return values in get_undo_pod are cast as boolean. the returned value causes type error with len() as it expects what seems to be a list based on the logic present in update_pod method.

mboeckelmann avatar May 09 '25 18:05 mboeckelmann