#license install error

1 messages · Page 1 of 1 (latest)

tepid drum
#

I am installing licenses with legacy 28-char license codes. With play like:

    - name: Add licenses
      na_ontap_license:
        state: present
        license_codes: "{{ licenses }}"
        <<: *login
      tags:
        - license

After run the play, got these errors:

TASK [Add licenses] *********************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error: mismatch in license package names: 'fabricpool'.  Expected: dict_keys(['installed_licenses', 'base', 'nfs', 'cifs', 'iscsi', 'fcp', 'snaprestore', 'snapmirror', 'flexclone', 'snapvault', 'snaplock', 'snapmanagersuite', 'snapprotectapps', 'v_storageattach', 'insight_balance', 'ocshift', 'tpm', 've', 'dp_optimized', 'fabricpool', 'snapmirror_sync']), found: dict_keys(['installed_licenses', 'base', 'nfs', 'cifs', 'iscsi', 'fcp', 'snaprestore', 'snapmirror', 'flexclone', 'snapvault', 'snaplock', 'snapmanagersuite', 'snapprotectapps', 'v_storageattach', 'insight_balance', 'ocshift', 'tpm', 've', 'dp_optimized'])."}

Howevever, looking at filer side with system license show -owner {node}, it seems all licenses were installed successfully.

What's causing the complaint? My filer os is 9.10.1P12. netapp ansible collection 22.5.0.

#

Could it be a bug in this version of netapp.ontap collection? it's passing dictionary not expected by the filer.

versed ledge
#

I’ll need to check this when tomorrow when I’m in. The issue appear to be it expecting after the install for that list of license to be there. But after the e install it gets the second list which is missing fabricpool.
I’ll need to check where in the code we do this check

tepid drum
#

I think maybe it's a static list of keys. 'fabricpool' does not require license, and is not in the "{{ licenses }}" list.

versed ledge
#

There might be a bug, but may need some addtional logs here to see what going on.

We don't have a static list for this
At the start of the module we create a list of licenses on your machine
https://github.com/ansible-collections/netapp.ontap/blob/main/plugins/modules/na_ontap_license.py#L654

Later on after adds and removed are complete we do a comapre
https://github.com/ansible-collections/netapp.ontap/blob/main/plugins/modules/na_ontap_license.py#L426

Expecting the original list and the new list to be the same.

Would it be possible to rerun this with out api debuging enabled
https://github.com/ansible-collections/netapp.ontap/wiki/Debugging

It would produce a file called /tmp/ontap_apis.log that you can email to ng-ansibleteam@netapp.com so we can see which REST api where called and what path it took through the code.

GitHub

Ansible collection to support NetApp ONTAP configuration. - ansible-collections/netapp.ontap

GitHub

Ansible collection to support NetApp ONTAP configuration. - ansible-collections/netapp.ontap

tepid drum
#

ok, it's not always producible. tried another time and not seeing same error.

PLAY [update license for filer] *****************************************************************

TASK [Add licenses] *****************************************************************************
changed: [localhost] => {"changed": true, "updated_licenses": ["nfs", "cifs", "iscsi", "fcp", "snaprestore", "snapmirror", "flexclone"]}

PLAY RECAP **************************************************************************************
localhost                  : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

licenses seem to be installed fine.

#

in this case, it gives me updated_licenses with 7 features, but there is 13 features installed. Not sure that means anything to you?

tepid drum
#

@versed ledge How do I change the trace_api log filename and/or location? Right now it's saved to /tmp/ontap_api.log, when multiple users are running different playbooks with debug, it can have permissions issues & mixing up logs.

versed ledge
#

currently you can't, it a hardcode value (https://github.com/ansible-collections/netapp.ontap/blob/main/plugins/module_utils/netapp.py#L110). We expected user only to run it once for debuging and not have it on for more than that.

I can go back to the team and see make it a setable variable if it something you would expect to be on for more than debuging.

GitHub

Ansible collection to support NetApp ONTAP configuration. - ansible-collections/netapp.ontap

tepid drum
#

It'd be nice, since this issue my users encounter is only intermittent, had to turn on trace for a while. So different users can tramp on each other.

tepid drum
#

hi @versed ledge I've encountered this issue again, and have sent the trace log to ng-ansibleteam.

versed ledge
#

Thanks (Netapp has a global 4 day holiday this week). So we may not be able to get back to you until Tuesday. But we did get the trace are are looking in to it

tepid drum
#

@versed ledge Any findings? Thanks.