ansible-collections / ibm.storage_virtualize

GNU General Public License v3.0
2 stars 9 forks source link

ibm_svc_info looking for only most recent SV code in gather_subset=all #10

Closed mainline-automation closed 6 months ago

mainline-automation commented 1 year ago
SUMMARY

Specifically, when using the gather_subset=all it seems to freak out when it doesn't see every single possible command available. The 8.3.x was looking for lsreplicationpolicy and 8.5.x is still looking for lssnapshotpolicy.

ISSUE TYPE

ISSUE TYPE
COMPONENT NAME

ibm_svc_info

ANSIBLE VERSION

"ansible [core 2.15.0]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /home/ansible/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.16 (main, May 29 2023, 00:00:00) [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True"

"<  Ansible Automation Platform Controller 4.4.0  >"
COLLECTION VERSION
ibm.storage_virtualize 2.0.0
CONFIGURATION
"CONFIG_FILE() = /etc/ansible/ansible.cfg
DEFAULT_REMOTE_USER(/etc/ansible/ansible.cfg) = ansible
GALAXY_SERVER_LIST(/etc/ansible/ansible.cfg) = ['validated', 'rh-certified', 'community', 'published']"
OS / ENVIRONMENT

RHEL 9.2 running on VMware

STEPS TO REPRODUCE

set up with a storwize v7000 724 using storage virtualize 8.5.0.9. Choose "gather_subset: all"

"tasks:
    - name: gather facts using ibm_svc_info
      ibm.storage_virtualize.ibm_svc_info:
        clustername: "{{ clustername }}"
        gather_subset: all
        token: "{{ api_token }}"
      register: results"
EXPECTED RESULTS

job failed with a statement that some command didn't exist. Given that gather_subset=all is the default and that most customers will not be using the absolute latest version of the code, it would make sense that such failures should be skipped over.

on Virtualize 8.5.0.9 (the highest level that our lab Storwize V7 G3 can handle), it is missing lssnapshotpolicy which only comes in 8.6.

ACTUAL RESULTS
""msg": {
    "url": "https://xx.xx.xx.xx:7443/rest/lssnapshotpolicy",
    "code": 404,
    "err": [
      "HTTPError %s",
      "HTTP Error 404: Not Found"
    ],
    "out": "\"Command 'lssnapshotpolicy' does not exist\"",
    "data": null
  },
  "invocation": {
    "module_args": {
      "clustername": "xx.xx.xx.xx",
      "gather_subset": [
        "all"
      ],
      "username": "ansible",
      "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
      "validate_certs": false,
      "domain": null,
      "log_path": null,
      "token": null,
      "objectname": null
    }
  },
  "_ansible_no_log": null,
  "changed": false
}"
Shilpi-J commented 1 year ago

Thanks @mainline-automation That makes sense .. will look into the issue.

sumitguptaibm commented 7 months ago

@mainline-automation , FYI, This will be addressed in ibm.storage_virtualize collection 2.3.0 release (targeted for March 2024).

sumitguptaibm commented 6 months ago

This is fixed and available in version 2.3.1