ansible-collections / ibm.storage_virtualize

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

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

Closed mainline-automation closed 1 year ago

mainline-automation commented 1 year ago

_**TASK [gather facts using ibm_svc_info] ***

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
COMPONENT NAME
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
"# /home/ansible/.ansible/collections/ansible_collections
Collection              Version
----------------------- -------
ibm.spectrum_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

STEPS TO REPRODUCE

Using a version of Storage Virtualize that doesn't support all commands performed by ibm_svc_info, use that module with gather_subset=all


"---
- name: Gather facts from FlashSystem and store in inventory
  hosts: localhost
  gather_facts: false
  become: false
  vars_files:
    - vars/authentication.yml
  tasks:
    - name: gather facts using ibm_svc_info
      ibm.spectrum_virtualize.ibm_svc_info:
        clustername: "{{ clustername }}"
        gather_subset: all
        token: "{{ api_token }}"
"
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.

'"TASK [gather facts using ibm_svc_info] ***** task path: /runner/project/flashsystem_gather_facts.yml:9 fatal: [localhost]: FAILED! => {"changed": false, "msg": {"code": 404, "data": null, "err": ["HTTPError %s", "HTTP Error 404: Not Found"], "out": "\"Command 'lssnapshotpolicy' does not exist\"", "url": [https://xx.xx.xx.xx:7443/rest/lssnapshotpolicy]"

ACTUAL RESULTS"
Shilpi-J commented 1 year ago

Closing this as this is same as https://github.com/ansible-collections/ibm.storage_virtualize/issues/10