UNSOLVED

eb_rb

updated

6 years ago

E

eb_rb

11 Posts

0

1209

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,

 

 

  • FoolInTheRain

    2 Intern

    •

    123 Posts

    1027

    0

    Posted December 17th, 2020 11:00

    Hi EB_RB,

     

    Let me answer the easy question first, YES, this is the right place to ask questions for Ansible Modules (for VPLEX in your case).

     

    I do not have access to reproduce your issue, but I was looking at the product guide for more info on Create Device, Raid 0 and Extents.

    I initially thought it only allowed raid-1 devices, since it  had this info on Page 22:

    **********

    Create a raid-1 device
    To create a device, run the appropriate playbook.
    The syntax of the task is shown as follows:


    - name: Create raid-1 device
    dellemc_vplex_device:
    vplexhost: "{ { vplexhost}}"
    vplexuser: "{ { vplexuser }}"
    vplexpassword: "{ { vplexpassword }}"
    verifycert: "{ { verifycert }}"
    cluster_name: "cluster-1"
    geometry: "raid-1"
    device_name: "ansible-test"
    extents: ["extent_1","extent_2"]
    extent_state: "present-in-device"
    state: "present"

     

    The parameters must be set before the user runs the playbook. For more information about the parameters, see the Parameters
    table.

    ******************************************

    But when I looked at the Parameters table, I see you can change "geometry" to "raid-0" as well as

    "extent_state" to "present-in-device" or "absent-in-device"

     

    Since the error has to do with Extents, and since the add/remove extent section says this is ONLY support on raid-1 devices:

    *****

    NOTE: This task is supported only for raid-1 device. It is not supported for raid-0 and raid-c devices.

    *****

     

    Is it possible when you created the raid-0 device that you had the parameter extent_state set to  "present-indevice" instead of "absent-indevice"?  This is an optional parameter, so I don't know if it was used or not.


    Can you share your parameter list?

    Also, if others would like to comment (and reproduce the issue maybe?), that would be great!

     

  • eb_rb

    11 Posts

    1016

    0

    Posted December 18th, 2020 01:00

    Hi and thanks to help me.

    In the docstring section of the dellemc_vplex_device.py, there is an example for raid-0 creation. This example is missing into the pdf documentation.

    - name: Create a new raid-0 device
    dellemc_vplex_device:
    vplexhost: "{ { vplexhost }}"
    vplexuser: "{ { vplexuser }}"
    vplexpassword: "{ { vplexpassword }}"
    verifycert: "{ { verifycert }}"
    cluster_name: "cluster-1"
    geometry: "raid-0"
    stripe_depth: "1KB"
    device_name: "ansible_device"
    extents: ["extent_0", "extent_1"]
    extent_state: "present-in-device"
    state: "present"

    Here is my call to the module :

    To create a device you need to specify an extent.

    A device is always created on top of an extent, I think you cannot create an "empty" device. So the "extents" parameter is mandatory

    - name: "Managing device on vplex c1"
    dellemc.vplex.dellemc_vplex_device:
    vplexhost: "{ { block_system_matrix['i']['vplex'] }}" # the name of the cluster vplex mgmt
    vplexuser: "{ { emc_vplex_user }}"
    vplexpassword: "{ { emc_vplex_password }}"
    verifycert: no
    cluster_name: "{ { block_system_matrix['i']['cluster_vplex'] }}" # cluster-1 or cluster-2
    geometry: "raid-0"
    stripe_depth: "4KB"
    device_name: "d_{ { unity_vol_c1.volume_details.name }}_c1" # the name of the device to be created
    extents: ["e_{ { unity_vol_c1.volume_details.name }}_c1"] # the extend on which we are creating the device
    extent_state: "present-in-device"
    state: "present"

     

    When i restart the job without "extent-state", there is an error : as specified in the example this argument is missing :

    fatal: [localhost]: FAILED! => {"changed": false, "msg": "parameters are required together: extents, extent_state"}

    When i restart the job without "extents" end "extent-state", the module try to make a get of the device according the doc and it doesn't find the device that we want to create.

    fatal: [localhost]: FAILED! => {"changed": false, "msg": "Could not get device d_SAMAQ001_TESTEBO_DLG_BUILD_S_120_c2 in cluster-2"}

     

    When I restart the job with "extent" and "extent-state" and "absent-in-device", the module try to get the device to remove this extent, but the device don't exists :

    fatal: [localhost]: FAILED! => {"changed": false, "msg": "Could not get device d_SAMAQ001_TESTEBO_DLG_BUILD_S_120_c2 in cluster-2"}

     

  • bmcfeeters

    1 Rookie

    •

    72 Posts

    1005

    0

    Posted December 18th, 2020 06:00

    Hi eb_rb,

    I was able to confirm with the rest of the product team that this is in fact a bug when creating a RAID-0 device that contains multiple extents.  A fix is being investigated and will likely be targeted for the Q12021 release.

    On a side note, I'm curious what is driving the need to create a RAID-0 (striped) device.  Based on my experience most users tend to use 1:1 mapping of storage volumes all the way through to the virtual volume or use RAID-1 to have a mirrored local copy of the data.

    Thanks
    Bryan

  • eb_rb

    11 Posts

    997

    0

    Posted December 18th, 2020 09:00

    Hi Bryan,

    Ok for the fix.

    For the device raid geometry, in this case, I'm automating creation of block storage and I base myself on the existing raid-0 geometry on all local-device into vplex.

    So now, I'm looking for more informations about that : in the 6.2 documentation (admin guide, cli guide) it seems that nothing explain the different geometry options.

    I've find in 5.2 (!) documentation these explanations :

    VPLEX supports the following RAID types:
    ◆ RAID-0 - Stripes data across two or more storage volumes.
    RAID-0 devices provide better performance since data is retrieved from several
    storage volumes at the same time. RAID-0 devices do not include a mirror to
    provide data redundancy.
    Use RAID-0 for non-critical data that requires high speed and low cost of
    implementation.
    ◆ RAID-1 - Mirrors data using at least two devices to duplicate the data. RAID-1
    does not stripe.
    RAID-1 improves read performance because either extent can be read at the same
    time.
    Use RAID-1 for applications that require high fault tolerance, without heavy
    emphasis on performance.
    ◆ RAID-C - Appends (concatenates) extents or devices into one larger device.

     

    When you read this, there is no recommandations about 1:1 mapping.

    No option match with the fact that you want to do 1:1 mapping ( 1lun, 1svol, 1extent, 1device), so it seems that no option is better or worse.

    Can you develop what you mean by 1:1 mapping option related to device geometry please ? What could a geometry change bring and to wich geometry ?

     

  • bmcfeeters

    1 Rookie

    •

    72 Posts

    991

    0

    Posted December 18th, 2020 13:00

    The options to have multi-extent RAID-0 and RAID-C devices have been somewhat discouraged in recent years due to the complexity and overlap with functionality on the underlying backend arrays.

    For the 1:1 mapping you can just create a RAID-0 device with only one extent and use that device as the basis for a virtual volume.

    Hope that makes sense.  For troubleshooting and understanding/simplification of the I/O path it makes things easier.

    Thanks
    Bryan