#Modify DR CIFS name to source CIFS name

1 messages · Page 1 of 1 (latest)

night roost
#

I am writing snapmirror DR playbook, and one of the steps is to modify DR cifs name to source name
Here are my playbook:

  • name: Modify dr cifs_server name to src cifs_server
    netapp.ontap.na_ontap_cifs_server:
    state: present
    from_name: "{{ dst_cifs_server_name }}"
    name: "{{ src_cifs_server_name }}"
    vserver: "{{ dst_vserver_name }}"
    domain: "{{ id_domain }}"
    admin_user_name: "{{ domain_login }}"
    admin_password: "{{ domain_pwd }}"
    hostname: "{{ dst_cluster_hostname }}"
    username: "{{ dst_cluster_username }}"
    password: "{{ dst_cluster_password }}"
    force: true
    force_ontap_version: 9.11

I get an error response:
{"changed": false, "msg": "Error on fetching cifs: calling: protocols/cifs/services: got HTTPSConnectionPool(host='192.168.0.102', port=443): Max retries exceeded with url: /api/protocols/cifs/services?svm.name=dr&fields=svm.uuid%2Cenabled%2Csecurity.smb_encryption%2Csecurity.kdc_encryption%2Csecurity.smb_signing%2Csecurity.restrict_anonymous%2Csecurity.encrypt_dc_connection%2Csecurity.use_ldaps%2Csecurity.use_start_tls%2Csecurity.try_ldap_channel_binding%2Csecurity.session_security%2Csecurity.ldap_referral_enabled%2Csecurity.aes_netlogon_enabled%2C&name=ORG (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:877)'),))."}

The lab is uising ONTAP 9.9.1
the "from_name" attribute supported only in REST and ONTAP version 9.11.0, and set force to True.
I have stopped the service before running this playbook
What could be the problem

untold cedar
#

Could you try adding

validate_certs: false

And see i that fixes the CERTIFICATE_VERIFY_FAILED issue

night roost
#

@untold cedar
I get the following error after adding validate_certs: false
"changed": false, "msg": "Error on fetching cifs: calling: protocols/cifs/services: got {'message': 'The value "security.use_ldaps" is invalid for field "fields" (<field,...>)', 'code': '262197', 'target': 'fields'}.

untold cedar
#

Ahhhh i see what your trying to do

force_ontap_version

What ment for down stepping an API version. If you were on 9.10.1 and need the 9.9 API the module would format the API rest call as a 9.9 call and send it to the rest api

You can't up set the api version past your system version. In this case we are formating the API call as if your system was a 9.11.1 system, but your REST API max version is 9.9.1 so any it going to fail when it see a field that dosn't exist in 9.9.1 (In case this it was security.use_ldaps which was added with ontap 9.10.1

night roost
#

@untold cedar So the only way to use this module with from_name is to upgrade ONTAP version to 9.10.1?
My ONTAP version is 9.9.1 and I think the only way is to delete and create rather than rename?