Git Product home page Git Product logo

ansible-unity's People

Contributors

andersson007 avatar anil-degwekar avatar astripei70 avatar dattaarindam avatar jennifer-john avatar kuttattz avatar previnkumar-g avatar rajendraindukuri avatar rajendravarma077 avatar tharun-vr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-unity's Issues

Community package requirements: sanity tests

(Note: This issue was filed in a semi-automated fashion. Let me know if you see errors in this issue.)

As per the Ansible community package inclusion requirements, collections must pass ansible-test sanity tests. Version 1.7.1 of dellemc.unity, corresponding to the 1.7.1 tag in this repo, fails one or more of the required sanity tests.

Please see the errors below and address them. If these issues aren't addressed within a reasonable time period, the collection may be subject to removal from Ansible.

Thank you for your efforts and for being part of the Ansible package! We appreciate it.


Sanity tests

The following tests were run using ansible-test version 2.16.1:

  • ansible-doc
  • compile
  • validate-modules
  • yamllint

Note that this is only a subset of the required sanity tests. Please make sure you run them in all in your CI.

Results

๐Ÿ’ก NOTE:

Check the [explain] links below for more information about each test and how to fix failures.
See Sanity Tests: Ignores in the dev guide if, after reading the test-specific documentation, you still believe an error is a false positive.

The test ansible-test sanity --test compile --python 2.7 [explain] failed with 3 errors:

plugins/modules/filesystem.py:1419:60: SyntaxError: errormsg = f"Invalid rpo value - {rpo} for " \
plugins/modules/nfs.py:1074:54: SyntaxError: msg = f'Host : {host} does not exists'
plugins/modules/replication_session.py:331:94: SyntaxError: errormsg = f"Retrieving details of replication session {id_or_name} failed with error"

The test ansible-test sanity --test validate-modules [explain] failed with 18 errors:

plugins/modules/cifsserver.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/consistencygroup.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/filesystem.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/filesystem_snapshot.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/host.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/info.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/interface.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/nasserver.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/nfs.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/nfsserver.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/replication_session.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/smbshare.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/snapshot.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/snapshotschedule.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/storagepool.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/tree_quota.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/user_quota.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
plugins/modules/volume.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module

Documentation on how setup a playbook to run the various modules

Hi there

I would like to use the Dell EMC Unity Ansible modules but have a rather hard time figuring out what the exact requirements are and what needs to be defined in the playbook in order to run the various modules.

Where I checked so far:

Is there a documentation about that somewhere or some examples apart from the module ones?

Thanks in advance.

[BUG]: In volume details, io_limit_policy dictionary in key 'name' is holding 'id' value.

Describe the bug
If volume has io_limit_policy applied, on volume details we have:

"io_limit_policy": {
  "id": "qp_2",
  "name": "qp_2"
},

So for both 'id' and 'name' key, dictionary has 'id' value.

To Reproduce
Steps to reproduce the behavior:

  1. Set IO policy on volume
  2. Query volume details
  3. io_limit_policy dictionary has io_policy id in both 'id' and 'name' keys.

Expected behavior
io_limit_policy dictionary has io_policy name value under 'name' key.

Additional context
I suspect bug in:
volume.py line 971:

            if obj_vol.io_limit_policy:
                volume_details.update(
                    {'io_limit_policy': {'name': obj_vol.io_limit_policy.id,
                                         'id': obj_vol.io_limit_policy.id}})

[BUG]: Ansible collection 1.7.0 fails with reference import issues

Describe the bug
Ansible collection 1.7.0 fails with reference import issues

To Reproduce
Steps to reproduce the behavior:

  1. Install latest 1.7.0 collection
  2. Playbook execution fails with reference import issues

Expected behavior
Successful execution of playbook

Screenshots
get_cg

Logs
If applicable, submit logs or stack traces from the affected services

System Information (please complete the following information):

  • OS/Version: RHEL 8
  • Ansible Version 2.12
  • Python Version 3.9
  • Additional Information...

Additional context
Add any other context about the problem here.

[QUESTION]: Is there a way to add a new NAS Server

How can the Team help you today?

Details: ?
Looking to try and use this to create a new NAS server in unity, then configure it to SMB Share and possibly NFS share is there a way of achieving this?

In the source code I can see you are able to modify, but I cant see a way to 'Create', I would appreciate some guidance on this thanks.

Thanks
Jason

[QUESTION]:How can I add a host from the Host List to NFS Export in the same way as in Unisphere UI?

How can I add a host from the Host List to NFS Export in the same way as in Unisphere UI?

In Unisphere UI, when I add a host to NFS Export, I can either enter the IP, Subnet, Host Name or select from the Host List.
When I use the CLI, I can choose either by specifying the [-advHostMgmtEnabled {yes | no}] option.
The Unity Ansible Module has an [adv_host_mgmt_enabled] parameter similar to the CLI, but if I set it to True and register a Host with "host_id", the Host Name is only registered as Network Adress, and the Host is not registered as Host Name.
Please let me know How I can add host to NFS Export as Host Name from Host list.

Consider using true/false for all booleans in docs

Based on the community decision to use true/false for boolean values in documentation and examples, we ask that you evaluate booleans in this collection and consider changing any that do not use true/false (lowercase).

See documentation block format for more info (specifically, option defaults).

If you have already implemented this or decide not to, feel free to close this issue.


P.S. This is auto-generated issue, please raise any concerns here

[BUG]:Issue while using Ansible loop for mapping of Unity LUNs to multiple Host

I am facing issue while using Ansible loop for mapping of Unity LUNs to multiple Host.

Attached the file having 3 scenarios.

In scenario 3 : I am using a Static value for Host_name and HLU inside Hosts: in playbook and everything is working fine.
But issue is if we have more hosts in place we have to modify the playbook every time.
image

In Scenario 1 : Using Loop and Host_name & HLU inside Hosts: In this case my play failed with error msg: "Invalid input parameter for host_name"
image
In Scenario 2: Task Run Successfully but LUN allocated to One Host , not respecting Idempotent feature. Task Run twice and when it run 2nd time it removes the host added during Task 1
image

System Information (please complete the following information):

  • OS/Version: [e.g. RHEL 7.6]
  • Ansible Version [e.g. 2.12]
  • Python Version [e.g. 3.9]
  • Additional Information...

Additional context
Ansible_loop.xlsx

Add any other context about the problem here.
Ansible_loop.xlsx

[FEATURE]: Add refresh support for snapshot, filesystem_snapshot, volume, consistencygroup

Hello,
I've added refreshed state for snapshot, filesystem_snapshot, volume, and consistency_group to provide refresh capability for snapshots and thin clones.
A pending pull request for storops (emc-openstack/storops#375) needs merging and releasing before the related PR accepted.
Please review the modifications and feel free to ask if you have any questions.

Rationale

With the refresh capabilities added, one can easily update a test environment without a lengthy copy / backup-restore process.

Getting Pool details from AFA Unity fails (dellemc_unity_storagepool.py)

There is bug in dellemc_unity_storagepool.py, line 234:

            is_fast_vp_enabled = api_response._get_property_from_raw(
                'pool_fast_vp').is_schedule_enabled

For AFA Unities (ones that I can test on) 'pool_fast_vp' is set to None, so this is failing internally with:
ERROR: 'NoneType' object has no attribute 'is_schedule_enabled'

and Ansible playbook is reporting error (due to way error is being catch):
Storage pool not found - Creation of storage pool is not allowed through Ansible module

FIX: It seems like module is trying to pull just True/False so api_response._get_property_from_raw('pool_fast_vp') (no attribute is_schedule_enabled) should be used, and translated to true/false, if 'null/none' is not expected in Ansible module output.

Filesystem module with FLR support

Hi there

We've been testing the Filesystem module today and it seems that the FLR functionality is not implemented at this point in time. I checked the parameters, the code and couldn't find any references.

Is that correct or did we just miss something? And if it is missing: Is this feature going to be available soon?

Thanks in advance.

dellemc_unity_host Adding new host with new initiators fails

I'm trying to create a new host with initiators that have not been logged into the array yet. I keep getting error - Invalid initiator passed. I am able to create the host manually through the GUI using the same initiators.

It looks like line 629 of dellemc_unity_host.py gets a list of initiators from the array and if the initiator supplied to the module is not in the list it errors out. I know for a fact the the initiators haven't been logged into the array yet because the hosts are boot from san. i'm trying to add the hosts to the array first so i can get the boot luns ready to go at first boot of the host. I tried changing log.error on that lookup to log.warn and comment out the failure. after that the module continued.

I then got an error that the "Initiator 'id' mapped to another host". This looks to be coming from the get_list_unmapped_initiators() function. i did verify on the array that the initiators i'm using do not exists anywhere on the array.

Any help would be greatly appreciated.

Thanks,
Patrick

[FEATURE]:Need support in filesystem sync replication

We need support in creating synchronous replication for a filesystem, Current we can create only asynchronous and manual replication that can be configured in the current version of ansible-unity.
From the customer's perspective, we need all three types of replication can be configured and the current version of ansible-unity is not supported.
If we go with VSA and it only supports asynchronous and manual. In the real environment, the user can configure all three types of replication modes.

  1. Synchronous
  2. Asynchronous
  3. Manual

We need a fix the filesystem.py code to manage all three types of replication modes.

[BUG]: port number gets filtered from dellemc.unity.info output

Describe the bug
Having no_log on port parameter in ./plugins/module_utils/storage/dell/utils.py:118 causes module.exit_json to scramble volume names and thus make dellemc.unity.info registered variable unusable for some volumes.

Quick fix is to remove no_log from port attribute, since leaking port number does not leak any sensitive information. Obfuscating server port is not a security control.

To Reproduce
Steps to reproduce the behavior:

  1. create volume with string "443" in it's name
  2. run dellemc.unity.info task and register outputs into test_var
  3. variable is scrambled when subsequently used in "with_items: "{{ test_var.Volumes | map(attribute='name') | list }}"

Expected behavior
test_var.Volumes should contain list of volums with real names

Logs
If applicable, submit logs or stack traces from the affected services

System Information (please complete the following information):

  • OS/Version: MacOS 14.x.x
  • Ansible Version 9.1.0
  • Python Version 3.11

Additional context
I'm running a playbook that first lists existing volumes and then creates ones that are missing, as a method to speed up execution.
However for some volumes, where name contains default port number (443), subsequent tasks are executed, since listing of volumes scrambled name with stars *****.

Example playbook

  - name: list existing volumes
    dellemc.unity.info:
      unispherehost: "{{ inventory_hostname }}"
      username: "{{ ansible_user }}"
      password: "{{ ansible_password }}"
      gather_subset:
      - vol
    register: storage_facts

  - set_fact:
      storage_defined_volumes: "{{ storage_volumes | map(attribute='name') | list }}"
      storage_existing_volumes: "{{ storage_facts.Volumes | map(attribute='name') | list }}"
  - set_fact:
      storage_missing_volumes: "{{ storage_defined_volumes | difference(storage_existing_volumes) | list }}"
      storage_orphanted_volumes: "{{ storage_existing_volumes | difference(storage_defined_volumes) | list }}"

  - debug:
      msg: "{{ storage_missing_volumes }}"

[FEATURE]: Failover and Failback

Describe the solution you'd like
What about Failover and Failback module for replicated NFS Servers ? It is a feture urgent needed.

Describe alternatives you've considered
From Web Client this scenario is possible.

Additional context
We have worked on a huge ansible project to automate switch from one principal site to a secondary site. We have all we need to manage networks , vm's, databases but at storage level we can not because this option is missing.

Add new module to start sync of configured manual replication

Please add new module specific to replication task. As of now there is only "Consistency Group" module which can create or delete the replication however there is no module for below purpose.

  1. Pause
  2. Resume
  3. Failover
  4. Failover with Sync
  5. Sync
  6. Failback

Consistency Group --> View/Edit --> Replication

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.