dell / dellemc-openmanage-ansible-modules

Dell OpenManage Ansible Modules
GNU General Public License v3.0
329 stars 162 forks source link

dellemc_idrac_storage_volume: status code doesn't match with the expected success code #154

Closed bvivi57 closed 3 months ago

bvivi57 commented 4 years ago

When I try to create a new virtual disk by deleting the existing configuration, I get this error message.

status code doesn't match with the expected success code

My playbook (I use a Operator Account for connexion to IDRAC)

- name: "Create Volume System"
      dellemc_idrac_storage_volume:
        idrac_ip: "{{ idrac_ip }}"
        idrac_password: "{{ idrac_password }}"
        idrac_user: "{{ idrac_user }}"
        controller_id: "RAID.Integrated.1-1"
        volume_type: "RAID 1"
        disk_cache_policy: "Enabled"
        write_cache_policy: "WriteBack"
        read_cache_policy: "ReadAhead"
        raid_init_operation: Fast
        raid_reset_config: "True"
        state: create
        volumes:
         - name: "vd_sys"
           drives:
               id: ["Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1","Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1"]

I use ansible 2.9.7 with python3.6 omsdk 1.2.442

Ouput from Ansible

TASK [Create Volume System] ****************************************************
task path: /tmp/awx_5710_lfcynzi5/project/Playbook_kch_Dell_configure_storage.yml:26
<lonitx-r2b3-09> ESTABLISH LOCAL CONNECTION FOR USER: root
<lonitx-r2b3-09> EXEC /bin/sh -c 'echo ~root && sleep 0'
<lonitx-r2b3-09> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir /root/.ansible/tmp/ansible-tmp-1599841360.4608932-6611-74143111518654 && echo ansible-tmp-1599841360.4608932-6611-74143111518654="` echo /root/.ansible/tmp/ansible-tmp-1599841360.4608932-6611-74143111518654 `" ) && sleep 0'
Using module file /usr/share/ansible/plugins/modules/remote_management/dellemc/dellemc_idrac_storage_volume.py
<lonitx-r2b3-09> PUT /var/lib/awx/.ansible/tmp/ansible-local-658128zuwkh0/tmp_54t2om1 TO /root/.ansible/tmp/ansible-tmp-1599841360.4608932-6611-74143111518654/AnsiballZ_dellemc_idrac_storage_volume.py
<lonitx-r2b3-09> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1599841360.4608932-6611-74143111518654/ /root/.ansible/tmp/ansible-tmp-1599841360.4608932-6611-74143111518654/AnsiballZ_dellemc_idrac_storage_volume.py && sleep 0'
<lonitx-r2b3-09> EXEC /bin/sh -c '/usr/libexec/platform-python /root/.ansible/tmp/ansible-tmp-1599841360.4608932-6611-74143111518654/AnsiballZ_dellemc_idrac_storage_volume.py && sleep 0'
<lonitx-r2b3-09> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1599841360.4608932-6611-74143111518654/ > /dev/null 2>&1 && sleep 0'
fatal: [lonitx-r2b3-09]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "capacity": null,
            "controller_id": "RAID.Integrated.1-1",
            "disk_cache_policy": "Enabled",
            "idrac_ip": "172.18.94.164",
            "idrac_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "idrac_port": 443,
            "idrac_user": "kepler",
            "media_type": null,
            "number_dedicated_hot_spare": 0,
            "protocol": null,
            "raid_init_operation": "Fast",
            "raid_reset_config": "True",
            "read_cache_policy": "ReadAhead",
            "span_depth": 1,
            "span_length": 1,
            "state": "create",
            "stripe_size": 65536,
            "volume_id": null,
            "volume_type": "RAID 1",
            "volumes": [
                {
                    "drives": {
                        "id": [
                            "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1",
                            "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1"
                        ]
                    },
                    "name": "vd_sys"
                }
            ],
            "write_cache_policy": "WriteBack"
        }
    },
    "msg": "returned status code doesn't match with the expected success code"
}
ljmc-github commented 3 years ago

:+1:

vzovko commented 2 years ago

I'm having the same issue. In my case even when I try to create a new RAID 1 on a BOSS controller without any preexisting virtual disk.

My current workaround is using dellemc.openmanage.redfish_storage_volume to either create or initialize a virtual disk RAID 1 on a BOSS controller.

PowerEdge R640
BIOS: 2.12.2
iDRAC: 5.00.10.00
Collection: 4.2.0
omsdk: 1.2.478
Ansible: 2.11.6
sachin-apa commented 3 months ago

We have a new module idrac_storage_volume which should have fixedthis, please try and feel free to open a new issue if any.