ansible-collections / ibm.storage_virtualize

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

ibm_svc_mdisk quorum error when disks configured as "unused" #24

Closed kunamashina closed 4 months ago

kunamashina commented 1 year ago
SUMMARY

If disks are set to "unused" the ibm_svc_mdisk module fails with error "The array cannot be created because no quorum disks are currently configured." The playbook stops.

ISSUE TYPE
COMPONENT NAME

ibm_svc_mdisk

ANSIBLE VERSION
ansible [core 2.14.1]
python version = 3.10.8
jinja version = 3.1.2
COLLECTION VERSION
ibm.spectrum_virtualize 1.10.0
CONFIGURATION
[defaults]
inventory = inventory
OS / ENVIRONMENT

IBM Flashsystem 5000 version 8.4.0.8 (build 152.24.2207280736000)

STEPS TO REPRODUCE
- name: Create disk array and set raid level
      ibm_svc_mdisk:
          clustername: "{{ clustername }}"
          token: "{{ result.token }}"
          log_path: "{{ logpath }}"
          name: "{{ array_name }}"
          state: present
          level: raid5
          drive: 0:1:2:3:4
          encrypt: false
          mdiskgrp: "{{ pool_name }}"
EXPECTED RESULTS

I expected to be able to create a disk array with selected disks

ACTUAL RESULTS

The task failed because "unused" disks couldn't be added to the disk array

fatal: [192.168.1.160]: FAILED! => {"changed": false, "msg": {"code": 500, "data": {"drive": "0:1:2:3:4", "encrypt": "no", "level": "raid6", "name": "Array0"}, "err": ["HTTPError %s", "HTTP Error 500: "], "out": "\"Command error occurred; error code: 1, error text: CMMVC7011E The array cannot be created because no quorum disks are currently configured. \"", "url": "https://192.168.1.160:7443/rest/mkarray/Pool0"}}

quorum_disks

Shilpi-J commented 1 year ago

We are looking into the issue. In the meantime, Can you please share the CLI or GUI output for the same action?

Shilpi-J commented 1 year ago

@kunamashina The operation is not permitted as per SV. "Creating an array while no quorum disks are configured is not permitted. Quorum disks can be assigned to drives in the control enclosure automatically, or manually by using the chquorum command." User should manage the control enclosure, and ensure that all drives within the enclosure are online before resubmitting the command.

kunamashina commented 1 year ago

How would I ensure drivers are online and in "candidate" state by using ansible ? Is there a module to do this? Because I couldn't find it in the documentation.

Shilpi-J commented 1 year ago

@kunamashina yes, right now this is not implemented in any of the module. We plan to include this information in ibm_svc_info module (A PR is already raised for the same by one more user). For the time being, you can also use ibm_svcinfo_command to run any svcinfo CLI command (if user is aware of the SV CLI), check the output and take desired action.

kunamashina commented 1 year ago

@Shilpi-J Thank you for replying

Yes, I am leveraging on the svcinfo and svctask modules. But it would be nice to be able to change the state of a disk from "unused" to "candidate" and etc (whatever options are possible) through a module in an idempotent way. I hope a module to manage the disks is possible.

Shilpi-J commented 1 year ago

@kunamashina Thanks for your feedback and input. We will discuss this within our team and check if we can support such functionality through Ansible.

sumitguptaibm commented 6 months ago

Hi @kunamashina , this will be fixed in upcoming release.

sumitguptaibm commented 4 months ago

@kunamashina , A new module _ibm_sv_managedrive has been added in latest release (2.4.1) to support changing drive states as well as to perform drive tasks, thus closing the defect. Please install the latest collection to get it.