dell / ansible-powerstore

Ansible Modules for Dell PowerStore
GNU General Public License v3.0
31 stars 24 forks source link

[BUG]: Unable to create new volume #44

Closed dewongway closed 7 months ago

dewongway commented 7 months ago

Describe the bug Calling the volume module to create a new volume but failed with the following message.

TASK [Create volume] **********************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "error_code": 1, "msg": "Got error HTTP code: 400, Bad Request [{'messages': [{'code': '0xE04040020008', 'severity': 'Error', 'message_l10n': 'Unable to parse passed url.'}]}] while getting details of volume", "status_code": "400"}

To Reproduce Steps to reproduce the behavior:

  1. create a playbook with these tasks
--
- name: Creation of Volume Group and  Volume
  hosts: localhost
  connection: local
  vars:
    array_ip: 'xxx.xxx.xxx.xxx'
    user: 'admin'
    password: 'xxxxx!'
    validate_certs: False
    vol_name: 'Volume_Module'
    vg_name: 'VG1'
    cap_unit: 'GB'
  collections:
  - dellemc.powerstore
  tasks:
    - name: Get list of volumes
      dellemc.powerstore.info:
        array_ip: "{{array_ip}}"
        validate_certs: "{{validate_certs}}"
        user: "{{user}}"
        password: "{{password}}"
        gather_subset:
          - vol

    - name: Create volume group without protection policy
      dellemc.powerstore.volumegroup:
        array_ip: "{{array_ip}}"
        validate_certs: "{{validate_certs}}"
        user: "{{user}}"
        password: "{{password}}"
        vg_name: "{{vg_name}}"
        state: "present"

    - name: Create volume
      dellemc.powerstore.volume:
        array_ip: "{{array_ip}}"
        validate_certs: "{{validate_certs}}"
        user: "{{user}}"
        password: "{{password}}"
        vg_name: "{{vg_name}}"
        vol_name: "{{vol_name}}"
        size: 5
        cap_unit: "{{cap_unit}}"
        state: "present"
  1. Run the playbook
# ansible-playbook create-volume.yml 
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not
match 'all'

PLAY [Creation of Volume Group and Volume] ************************************************************************

TASK [Gathering Facts] ********************************************************************************************
ok: [localhost]

TASK [Get list of volumes] ****************************************************************************************
ok: [localhost]

TASK [Create volume group without protection policy] **************************************************************
changed: [localhost]

TASK [Create volume] **********************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "error_code": 1, "msg": "Got error HTTP code: 400, Bad Request [{'messages': [{'code': '0xE04040020008', 'severity': 'Error', 'message_l10n': 'Unable to parse passed url.'}]}] while getting details of volume", "status_code": "400"}

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

Expected behavior The volume should be created successfully.

System Information (please complete the following information):

dewongway commented 7 months ago

This issue has been resolved. The cause of the problem was on the array side.