Start a Conversation

Unsolved

S

6 Posts

921

February 14th, 2023 01:00

Ansible Collection for Unity v1.5.0 -- get error while get /set pool values

I 'm following documentation as described here to get/set Pool threshold information.
https://github.com/dell/ansible-unity/blob/1.5.0/docs/Product%20Guide.md#storage-pool-module

I get the following error when I run the ansible collection for Unity version 1.5.0 when I try to get pool
--snip--
failed: [hst01] (item={'StorageName': 'hst01', 'PoolID': 'pool_1', 'PoolName': 'Pool0'}) = {"ansible_loop_var": "item", "changed": false, "item": {"PoolID": "pool_1", "PoolName": "Pool0", "StorageName": "hst01"}, "msg": "The parameter pool_name length is 0. It is too short. The min length is 1"}
--snip--
What can I do to fix this ?,

1 Rookie

 • 

79 Posts

February 16th, 2023 19:00

Hi @sfasby,

The storagepool module will enter the create workflow if the specified pool id does not exist. To create the pool, pool_name is mandatory and hence the above error is displayed. Could you please try to re-execute the playbook by using a valid pool id?

Please let me know of any issues.

Thanks,

Jennifer 

6 Posts

February 21st, 2023 00:00

FWIW, the pool id does exist. I'm just trying to read values and for some reason it is creating a pool.

 

I'm using following example

 

- name: Get Storage pool details using pool_id
  dellemc.unity.storagepool:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    pool_id: "{{pool_id}}"
    state: "present"

1 Rookie

 • 

79 Posts

February 22nd, 2023 05:00

Hi @sfasby 

Have you tried to retrieve any other pool information? Are you facing the same error?

Could you also please try to execute the info module playbook to retrieve the list of pool_id's available and verify if the id is part of the result subset from the info module execution?

Sharing the info module task below

- name : Get detailed list of Unity entities.
    info :
      unispherehost : "{ {unispherehost}}"
      username : "{ {username}}"
      password : "{ {password}}"
      validate_certs : "{ {validate_certs}}"
      gather_subset :
       - storage_pool

Thanks,

Jennifer

6 Posts

March 2nd, 2023 01:00

Hi Jeniffer,

 

The above code does work.

I get the Pool id which is the same as the one I'm passing.

 

               "Consistency_Groups": [],
                "Disk_Groups": [],
                "FC_initiators": [],
                "File_Systems": [],
                "Hosts": [],
                "ISCSI_initiators": [],
                "NAS_Servers": [],
                "NFS_Exports": [],
                "SMB_Shares": [],
                "Snapshot_Schedules": [],
                "Snapshots": [],
                "Storage_Pools": [
                    {
                        "id": "pool_1",
                        "name": "Pool0"
                    }
                ],

 

 

 

1 Rookie

 • 

79 Posts

March 2nd, 2023 07:00

Hi @sfasby 

I tried to reproduce the issue in my environment but the get call is working as expected. I am suspecting if this could be a playbook issue(with the parameters sent in playbook)? Can you please execute the playbook using -vvv option (ansible-playbook storage_pool.yml -vvv) and verify the parameters sent in the module input from the items declared in the playbook?

Could you also please share the playbook syntax and o/p on execution using the -vvv option.

Thanks,

Jennifer

6 Posts

March 5th, 2023 20:00

Hi @jennifer_john ,

Please find playbook and role which I'm invoking.

Playbook:

---

- hosts: unity
  connection: local
  collections:
    - dellemc.unity
  gather_facts: yes
  roles:
    - unity_pool_threshold

storage pool / role:

---

- name: Get Storage pool details using pool_id
  dellemc.unity.storagepool:
    unispherehost: 'hst01'
    username: '{{ unity_admin_username }}'
    password: '{{ unity_admin_password }}'
    verifycert: '{{ verifycert }}'
    pool_id: 'pool_1'
    state: 'present'
  register: result

- name: Debug
  ansible.builtin.debug:
    var: result

 

Will attach the output in the followup update.

 

1 Rookie

 • 

79 Posts

March 5th, 2023 20:00

Hi @sfasby ,

Could you please share the output attachment to ansible.team@dell.com. This would also be helpful to setup further webex session if needed as well.

Thanks,

Jennifer

6 Posts

March 5th, 2023 20:00

Hi @jennifer_john ,

 

sorry the output is too long to upload. Is there an attachment option available ?

6 Posts

March 7th, 2023 04:00

Hi @jennifer_john ,

 

I have emailed the output as attachment.

 

hth

No Events found!

Top