Isilon PAPI, SDK, RAN Samples

I’ve attached some python sample codes (notebook) in this post to help better understanding how to leverage our Isilon PAPI or SDK for day to day jobs on PowerScale or even some customization. To use these sample, you may want to install the Jupyter notebook first (https://jupyter.org/install ) and then you can do the live debug to see the real time output.

The samples including:

  1. 01 Getting Started with Python Requests Module
  2. Cluster Config
  3. Getting Started with Isilon Python SDK
  4. NFS Exports
  5. SMB Shares SDK
  6. SMB Shares
  7. User Accounts
  8. Quotas
  9. Snapshots
  10. File System Access API RAN

…will continue to add more

(Great thanks to Jim Sims for the contribution.)

Snapdiff with Changelist

Snapdiff with changelist has been introduced in OneFS 8.2.2.0. It can return what regions of a file have been changed. However this functionality is hidden from WebUI and CLI and I see many customers are very interested in this new feature. This article will walk you through an example.

To create a snapdiff changelist, you have to add the option “–create-diffs” which is disabled by default.

# isi job start changelistcreate --newer-snapid=24 --older-snapid=22 --create-diffs

Note, you will not see this option in the help or description page of the CLI command.

After that you can either use isi_changelist_mod command to view the outcome. To include snapdiff deltas in the output, you have to add the option “–x”

# isi_changelist_mod -a 22_24 --x
st_ino=4306829722 st_mode=0100700 st_size=2837 st_atime=1614240223 st_mtime=1614240223 st_ctime=1614240223 st_flags=285212896 cl_flags=ENTRY_MODIFIED path=/ifs/test/test.txt
offset:0 size:2837 type: data

You can also leverage PAPI for the same purpose. The corresponding PAPI endpoint is:

platform/10/snapshot/changelists/<CHANGELIST>/diff-regions/<LIN>

Note, it’s only available starting from platform/10. To get a very detailed description of the PAPI you can use the following URL:

platform/10/snapshot/changelists/<CHANGELIST>/diff-regions/<LIN>/?describe
Resource URL: /platform/10/snapshot/changelists/<CHANGELIST>/diff-regions/<LIN>

    Overview: This resource represents the collection of snap diff regions.

     Methods: GET

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

Method GET: Get snap diff regions of a file.

URL: GET /platform/10/snapshot/changelists/<CHANGELIST>/diff-regions/<LIN>

Query arguments:
 resume=<string> Continue returning results from previous call using this token
                 (token should come from the previous call, resume cannot be
                 used with other options).
 limit=<integer> Return no more than this many results at once (see resume).
offset=<integer> 

GET response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "minItems": 1, 
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "minLength": 1, 
                "type": "string", 
                "description": "The field with the error if applicable.", 
                "maxLength": 8192
              }, 
              "message": {
                "minLength": 1, 
                "type": "string", 
                "description": "The error message.", 
                "maxLength": 8192
              }, 
              "code": {
                "minLength": 1, 
                "type": "string", 
                "description": "The error code.", 
                "maxLength": 8192
              }
            }
          }, 
          "type": "array", 
          "maxItems": 65535
        }
      }
    }, 
    {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "diff_regions": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "properties": {
              "byte_count": {
                "required": true, 
                "minimum": 0, 
                "type": "integer", 
                "description": "Byte count of change region.", 
                "maximum": 18446744073709551615
              }, 
              "region_type": {
                "required": true, 
                "description": "Type of change region.", 
                "minLength": 4, 
                "enum": [
                  "sparse", 
                  "data", 
                  "unchanged"
                ], 
                "maxLength": 9, 
                "type": "string"
              }, 
              "start_offset": {
                "required": true, 
                "minimum": 0, 
                "type": "integer", 
                "description": "Starting byte offset of change region.", 
                "maximum": 18446744073709551615
              }
            }
          }, 
          "type": "array", 
          "maxItems": 18446744073709551615
        }, 
        "resume": {
          "minLength": 0, 
          "type": [
            "string", 
            "null"
          ], 
          "description": "Provide this token as the 'resume' query argument to continue listing results.", 
          "maxLength": 8192
        }
      }
    }
  ]
}

Here is the output for the same example:

URL:

https://192.168.116.188:8080/platform/10/snapshot/changelists/22_24/diff-regions/4306829722

Outcome:

{
"diff_regions" : 
[

{
"byte_count" : 2837,
"region_type" : "data",
"start_offset" : 0
}
],
"resume" : null
}

 

PowerScale OneFS SNMP Trap List

Hundreds of requests have been raised regarding the demand of OneFS SNMP Trap list for various releases and how it’s mapping to the CELOG events. Here are the links for the SNMP trap list (csv format) for each releases:

SNMP_Trap_List_8.0.0.0

SNMP_Trap_List_8.0.0.1

SNMP_Trap_List_8.0.0.2

SNMP_Trap_List_8.0.0.3

SNMP_Trap_List_8.0.0.4

SNMP_Trap_List_8.0.0.5

SNMP_Trap_List_8.0.0.6

SNMP_Trap_List_8.0.0.7

SNMP_Trap_List_8.0.1.0

SNMP_Trap_List_8.0.1.1

SNMP_Trap_List_8.0.1.2

SNMP_Trap_List_8.1.0.0

SNMP_Trap_List_8.1.0.1

SNMP_Trap_List_8.1.0.2

SNMP_Trap_List_8.1.0.3

SNMP_Trap_List_8.1.0.4

SNMP_Trap_List_8.1.1.0

SNMP_Trap_List_8.1.1.1

SNMP_Trap_List_8.1.2.0

SNMP_Trap_List_8.1.3.0

SNMP_Trap_List_8.2.0

SNMP_Trap_List_8.2.1

SNMP_Trap_List_8.2.2

SNMP_Trap_List_9.0.0.0

SNMP_Trap_List_9.1.0.0

 

 

FAQ: Ansible Module for Dell EMC Isilon

To which Ansible module for Dell EMC Isilon version does this FAQ apply?

This FAQ applies to version 1.1 of the module

 

Where can I get this Ansible module for Dell EMC Isilon?

We have a community in GitHub: https://github.com/dell/ansible-isilon

 

What is the software prerequisites?

  • Isilon OneFS 8 or higher
  • Ansible 2.7 or higher
  • Python 2.7.12 or higher
  • Red Hat Enterprise Linux 7.6

 

What are the supported features for this Ansible module for Dell EMC Isilon?

The Ansible Modules for Dell EMC Isilon includes:

  • File System Module
  • Access Zone Module
  • Users Module
  • Groups Module
  • Snapshot Module
  • Snapshot Schedule Module
  • NFS Module
  • SMB Module
  • Gather Facts Module

Each module includes View, Create, Delete and Modify operations. For the details, refer to the table below:

user

group

filesystem

Access zone

NFS export

SMB share

snapshot

Snapshot schedule

Create

y

y

y

n

y

y

y

y

Modify

y

y

y

y

y

y

y

y

Delete

y

y

y

n

y

y

y

y

View

y

y

y

y

y

y

y

y

What is the filesystem as we don’t see this concept in Isilon?

Filesystem in this Ansible module represents a directory in a given access zone with owner, ACL and even quotas specified.

 

How to install it?

I’ve listed high-level steps below. For the details, refer to the product guide at

https://github.com/dell/ansible-isilon/blob/dellemc_ansible/docs/Ansible%20for%20Dell%20EMC%20Isilon%20v1.1%20Product%20Guide.pdf

The following example is using CenoOS 8 + python 3.6 + Ansible 2.9.5 + Isilon sdk 8.1.1 + OneFS 8.2.2. The overall steps are as the followings:

  1. Install Ansible 2.9.5

# dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

# dnf install ansible

  1. Check the python version for ansible by using the following command

# ansible –version

In my case it’s python 3.6.8

[root@c8 ~]# ansible –version

ansible 2.9.5

  config file = /etc/ansible/ansible.cfg

  configured module search path = [‘/root/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]

  ansible python module location = /usr/lib/python3.6/site-packages/ansible

  executable location = /usr/bin/ansible

  python version = 3.6.8 (default, Nov 21 2019, 19:31:34) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)]

  1. Install Isilon sdk 8.1.1

# pip3 install isi_sdk_8_1_1

  1. Install Isilon Ansible module: (make sure the path is aligned with the python version)

Copy utils/dellemc_ansible_utils.py to  /usr/lib/python3.6/site-packages/ansible/module_utils/

Copy all module Python files from ‘isilon/library’ folder to  /usr/lib/python3.6/site-packages/ansible/modules/storage/emc

  1. Install the playbook

Coyp dellemc_ansible/isilon/playbooks to any place you want

  1. Test the installation

Update the playbooks/ flo_test.yml. mine is as below:

– name: Collect set of facts in Isilon

  hosts: localhost

  connection: local

  vars:

    onefs_host: ‘192.168.116.88’

    verify_ssl: False

    api_user: ‘root’

    api_password: ‘a’

    access_zone: ‘System’

  tasks:

  – name: Get nodes of the Isilon cluster

    dellemc_isilon_gatherfacts:

      onefs_host: “{{onefs_host}}”

      verify_ssl: “{{verify_ssl}}”

      api_user: “{{api_user}}”

      api_password: “{{api_password}}”

      gather_subset:

        – nodes

    register: subset_result

  – debug:

      var: subset_result

run the playbook:

ansible-playbook  <path to playbooks/flo_test.yml>

If everything is good, you should see the Info for your Isilon is returned:

…………

                        “release”: “v9.0.0.BETA.0”,

                        “uptime”: 24533,

                        “version”: “Isilon OneFS v8.2.2(RELEASE): 0x900003000000001:Tue Feb 25 09:19:10 PST 2020    root@se********-build11-114:/b/mnt/obj/b/mnt/src/********md64.********md64/sys/IQ.********md64.rele********se   FreeBSD cl********ng version 5.0.0 (t********gs/RELEASE_500/fin********l 312559) (b********sed on LLVM 5.0.0svn)”

                    }

                }

            ],

            “total”: 1

        },

        “Providers”: [],

        “Users”: [],

        “changed”: false,

        “failed”: false

    }

}

 

PLAY RECAP *********************************************************************

localhost                  : ok=3    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0  

 

Does this module support quota?

The current version only support directory(file system) quotas, but not user or group quotas.

 

Where can I find the examples?

Check examples from each module’s file in /ansible-isilon/dellemc_ansible/isilon/library/

I’ve also create a short video on how to use this module to create and mount NFS export from Isilon.

 

What is the limitation of this module?

Gatherfacts

Getting the list of users and groups with very long names may fail.

Users and Groups

Only local users and groups can be created.

Operations on users and groups with very long names may fail.

Access Zone

Creation and deletion of access zones is not supported.

Filesystems

ACLs can only be modified from POSIX to POSIX mode.

Only directory quotas are supported but not user or group quotas.

Modification of include_snap_data flag is not supported.

NFS Export

If there multiple exports present with the same path in an access zone, operations on such exports fail.

Advanced Isilon features

No support for advanced Isilon features like SyncIQ, tiering, WORM and so on.

How to uninstall the module?

  1. pip3 uninstall isi_sdk_8_1_1
  2. Remove dellemc_ansible_utils.py from  /usr/lib/python3.6/site-packages/ansible/module_utils/
  3. Remove the following files from  /usr/lib/python3.6/site-packages/ansible/modules/storage/emc

dellemc_isilon_accesszone.py

dellemc_isilon_filesystem.py

dellemc_isilon_gatherfacts.py

dellemc_isilon_group.py

dellemc_isilon_nfs.py

dellemc_isilon_smb.py

dellemc_isilon_snapshot.py

dellemc_isilon_snapshotschedule.py

dellemc_isilon_user.py

  1. Remove all the play book

 

Where do submit an issue against the driver?

The Ansible module for Dell EMC Isilon is officially by Dell EMC. Therefore you can open a ticket directly to the support website : https://www.dell.com/support/ or open a discussion in the forum : https://www.dell.com/community/Containers/bd-p/Containers

 

Can I run this module in a production environment?

Yes, the module is production-grade. Please make sure your environment follows the pre-requisites and Ansible best practices.

Quick overview of Ansible module for Dell EMC Isilon

Ansible module for Dell EMC Isilon has been released 2 months before and I’ve seen many people are interested in it. Here is a quick demo of how to use it to  create and mount an NFS export. For further details, please go to our github community: https://github.com/dell/ansible-isilon