dell / ansible-powerstore

Ansible Modules for Dell PowerStore
GNU General Public License v3.0
31 stars 24 forks source link

[BUG]: Unsupported parameters for (dellemc.powerstore.filesystem) module: config_type, file_events_publishing_mode, host_io_size, is_async_mtime_enabled #26

Closed bwdbethke closed 1 year ago

bwdbethke commented 1 year ago

I'm getting errors from dellemc.powerstore.filesystem when I try to specify

It doesn't seem to be recognizing those parameters. I expected they should be working since #18 was resolved.

The specific msg I'm getting is:

"msg": "Unsupported parameters for (dellemc.powerstore.filesystem) module: config_type, file_events_publishing_mode, host_io_size, is_async_mtime_enabled. Supported parameters include: verifycert, smb_properties, access_policy, state, cap_unit, folder_rename_policy, filesystem_name, protection_policy, locking_policy, nas_server, user, timeout, size, filesystem_id, password, port, description, quota_defaults, array_ip."}

I'm trying to create a filesystem with the following:

  tasks:
    - name: Get details of NAS Server by name
      register: result_nas
      dellemc.powerstore.nasserver:
        array_ip: "{{ powerstore_array_ip }}"
        verifycert: "{{ powerstore_verify_cert }}"
        user: "{{ powerstore_user }}"
        password: "{{ powerstore_password }}"
        nas_server_name: "mynas"
        state: "present"

    - name: Create NFS FileSystem
      loop: "{{ powerstore_nfs_filesystems | default([]) }}"
      register: result_nfs_fs
      dellemc.powerstore.filesystem:
        array_ip: "{{ powerstore_array_ip }}"
        verifycert: "{{ powerstore_verify_cert }}"
        user: "{{ powerstore_user }}"
        password: "{{ powerstore_password }}"
        filesystem_name: "{{ item.filesystem_name }}"
        nas_server: "{{ result_nas.nasserver_details.name }}"
        description: "{{item.description | default(omit) }}"
        size: "{{ item.size }}"
        cap_unit: "{{ item.cap_unit | default(omit) }}"
        access_policy: "{{ item.access_policy | default(omit) }}"
        locking_policy: "{{ item.locking_policy | default(omit) }}"
        folder_rename_policy: "{{ item.folder_rename_policy | default(omit) }}"
        protection_policy: "{{ item.protection_policy | default(omit) }}"
        config_type: "{{ item.config_type | default(omit) }}"
        is_async_mtime_enabled: "{{ item.is_async_MTime_enabled | default(omit) }}"
        file_events_publishing_mode: "{{ item.file_events_publishing_mode | default(omit) }}"
        host_io_size: "{{ item.host_io_size | default(omit) }}"
        state: "{{ item.state | default(omit) }}"

I'm feeding in these vars:

  - filesystem_name: test-ansible-vmware-fs
    description: "Filesystem for VMware NFS datastore created by ansible"
    config_type: VMWARE
    size: 1
    cap_unit: TB
    host_io_size: VMWARE_8K
    is_async_MTime_enabled: true
    access_policy: NATIVE
    locking_policy: ADVISORY
    folder_rename_policy: SMB_FORBIDDEN
    protection_policy: snap-every-1d-keep-1w
    file_events_publishing_mode: NFS_ONLY
    state: present

FWIW, Here's how have been creating the filesystems via CLI since I can't get the ansible module to work for config_type VMWARE (or VMware)

pstcli file_system create -name test-cli-vmware-fs \
  -size_total 1099511627776 \
  -nas_server_name mynas \
  -description "VMware NFS datastore created by CLI" \
  -config_type VMware \
  -access_policy Native \
  -locking_policy Advisory \
  -folder_rename_policy SMB_Forbidden \
  -is_async_MTime_enabled true \
  -host_io_size VMware_8K 
anupamaloke commented 1 year ago

@bwdbethke , thank you for submitting this issue. Could you also please let us know the PowerStore OS version?

bwdbethke commented 1 year ago

closing issue as silly user error. I saw there was an updated dellemc.powerstore (1.9.0), but I had forgotten to update my test system to it first before claiming the was a bug in it. 🤦(test system was still 1.7.0)

After updating dellemc.powerstore 1.9.0 (and PyPowerStore to 1.10.0.0) it all worked as expected.

trisha-dell commented 1 year ago

Hello @bwdbethke, Thank you for reaching out to us. I tried the playbook task as mentioned above against the PyPowerStore version 1.10.0 and Ansible modules for PowerStore collection version 1.9.0.

Following was the return value: changed: [localhost] => { "changed": true, "filesystem_details": { "access_policy": "Native", "access_policy_l10n": "Native", "access_type": null, "access_type_l10n": null, "config_type": "VMware", "config_type_l10n": "VMware", "creation_timestamp": null, "creator_type": null, "creator_type_l10n": null, "default_hard_limit": 0, "default_soft_limit": 0, "description": "FS Testing", "expiration_timestamp": null, "file_events_publishing_mode": "NFS_Only", "file_events_publishing_mode_l10n": "NFS Only Notifications", "filesystem_type": "Primary", "filesystem_type_l10n": "Primary File system", "flr_attributes": { "auto_delete": false, "auto_lock": false, "clock_time": null, "default_retention": "0D", "has_protected_files": false, "maximum_retention": "0D", "maximum_retention_date": null, "minimum_retention": "0D", "mode": "None", "policy_interval": 0 }, "folder_rename_policy": "SMB_Forbidden", "folder_rename_policy_l10n": "Renames via SMB Forbidden", "grace_period": 604800, "host_io_size": "VMware_8K", "host_io_size_l10n": "VMware 8K", "id": "646b9847-5e4c-2562-e4f0-1a9efb93188b", "is_async_MTime_enabled": true, "is_modified": null, "is_quota_enabled": false, "is_smb_no_notify_enabled": false, "is_smb_notify_on_access_enabled": false, "is_smb_notify_on_write_enabled": false, "is_smb_op_locks_enabled": true, "is_smb_sync_writes_enabled": false, "last_refresh_timestamp": null, "last_writable_timestamp": null, "locking_policy": "Advisory", "locking_policy_l10n": "Advisory", "name": "Sample_filesystem_1", "nas_server": { "id": "646277a7-57f8-598e-a6ab-1a9efb93188b", "name": "esa_nas" }, "parent_id": null, "protection_policy": { "id": "eb6f7e44-6b4c-4447-9731-f5ee1d6bd02d", "name": "tf_policy1" }, "size_total": 1099511627776, "size_used": 1621098496, "smb_notify_on_change_dir_depth": 512, "snapshots": {}, "total_size_with_unit": "1.0 TB", "used_size_with_unit": "1.51 GB" }, "invocation": { "module_args": { "access_policy": "NATIVE", "array_ip": "10...**", "cap_unit": "TB", "config_type": "VMWARE", "description": "FS Testing", "file_events_publishing_mode": "NFS_ONLY", "filesystem_id": null, "filesystem_name": "Sample_filesystem_1", "flr_attributes": null, "folder_rename_policy": "SMB_FORBIDDEN", "host_io_size": "VMWARE_8K", "is_async_mtime_enabled": true, "locking_policy": "ADVISORY", "nas_server": "esa_nas", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "port": null, "protection_policy": "tf_policy1", "quota_defaults": null, "size": 1, "smb_properties": null, "state": "present", "timeout": 120, "user": "admin", "verifycert": false } } } Please let us know if this still fails on the latest versions.

Thank you.

bwdbethke commented 1 year ago

does not fail now that I've updated to the latest versions. thanks