Unsolved
11 Posts
0
1170
December 17th, 2020 09:00
ansible-vplex library dellemc_vplex_device.py error on raid-0 creation
Hi,
On dellemc_vplex_device library, when you want to create a new raid-0 local device, the action is in success on the vplex cluster but the ansible module exit on error with this message :
fatal: [localhost]: FAILED! => {"attempts": 1, "changed": false, "msg": "Add/Remove extent is supported only on raid-1 device"}
In this library there is several conditional blocks :
on line 553, this is what I want : create a device for which there are no "device_details"
if (state == 'present' and not device_details):
at the end of this block (l.571-572), there is these instructions : creation and then getting the newly create object informations
create_obj = self.create_device(cluster_name, device_payload)
device_details = utils.serialize_content(create_obj)
The problem is that, at line 608, there is a conditional block to add/remove extent from an existing device.
Device exists if "device_details" is defined. And as shown above, after creation we have set it so the module follow the else condition of line 610 and exit with an error
if (state == 'present' and extents and extent_state and
device_details):
if device_details["geometry"] == "raid-1":
[...]
else:
msg = "Add/Remove extent is supported only on raid-1 device"
LOG.error(msg)
self.module.fail_json(msg=msg)
I think the block to add/remove extent might be above the creation one.
Can anyone can reproduce this issue ?
Is it the right place to declare issue for emc vplex ansible modules as explained in the vplex ansible faq ?
regards,
events found

