#Hi

1 messages · Page 1 of 1 (latest)

candid nexus
#

this issue got fixed in 21.18.0

is collection version latest one?.

earnest crypt
#

I'm using v22.1.0.

candid nexus
#

Thanks let me check

earnest crypt
#

Thank you!

candid nexus
#

@earnest crypt ONTAP version?

earnest crypt
#

Right.

#

ONTAP version is 9.

#

Do you need the minor?

candid nexus
#

yes

earnest crypt
#

I can ask the storage folks.

#

Will do.

#

Am chasing ....

#

BTW, thx for digging into this case so swiftly.

#

Appreciated!

candid nexus
#

I have tested this module in 9.10.1

  • name: delete SnapShot
    na_ontap_snapshot:
    state: absent
    snapshot: "{{ snapshot_name }}"
    volume: "{{ volume }}"
    vserver: "{{ vserver }}"

  • name: create SnapShot
    na_ontap_snapshot:
    state: present
    snapshot: "{{ snapshot_name }}"
    volume: "{{ volume }}"
    vserver: "{{ vserver }}"

  • name: delete SnapShot
    na_ontap_snapshot:
    state: present
    snapshot: "{{ snapshot_name }}"
    volume: "{{ volume }}"
    vserver: "{{ vserver }}"

for me it worked good, but will double check with yours version

#

we can get the version from cli
version -node <node_name>
or
https://hostname_ontap/sysmgr/v4/ -> version will be in Dashboard screen

earnest crypt
#

Here we go.

#

9.10.1P4

#

Hmm... So then I guess it has to be something missing inside the container anyway. Sigh.

#

cat requirements.yml


collections:

Install collections from Galaxy

- name: ansible.posix

- name: netapp.aws

# name: - netapp.azure

- name: netapp.cloudmanager

version: 21.19.0

- name: netapp.elementsw

  • name: netapp.ontap
    version: 21.24.1

- name: netapp.storagegrid

- name: netapp.um_info

cat requirements.txt

botocore>=1.19.0
boto3>=1.16.0
boto>=2.49.0
ipaddress
isodate
jmespath
netapp-lib
requests
six
solidfire-sdk-python
xmltodict

#

This is how I go about things.

ansible-galaxy collection install netapp.ontap --force

Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading https://galaxy.ansible.com/download/netapp-ontap-22.1.0.tar.gz to /root/.ansible/tmp/ansible-local-93735t0xz8xc2/tmprou9p8aa/netapp-ontap-22.1.0-m_4pugd8
Installing 'netapp.ontap:22.1.0' to '/root/.ansible/collections/ansible_collections/netapp/ontap'
netapp.ontap:22.1.0 was installed successfully

Then I go to /root/.ansible/collections/ansible_collections/netapp/ontap/execution_environments/from_galaxy/

From there I modify the yml/txt-s and build the container. Pretty simple.

#

Then as I mentioned previously. I've doublechecked by looking inside the container and verified stuff like python version, communication etc ..

#

Ex)

podman run -it --rm localhost/v17_netapp_ontapp_ee:latest /bin/bash

bash-4.4# pip3 freeze | grep net
netapp-lib==2021.6.25
bash-4.4# pip3 freeze | grep pyth
python-daemon==2.3.0
python-dateutil==2.8.2
solidfire-sdk-python==12.3.0.203
bash-4.4# /usr/bin/python3
python3 python3.9
bash-4.4# /usr/bin/python --version
Python 3.9.13
bash-4.4#

#

Could it be this has not been tested with exec envs + RedHat AAP?

candid nexus
#

I did not used k8s, will try this
just want to check there is one version listed for this command
ansible-galaxy collection list netapp.ontap

earnest crypt
#

ansible-galaxy collection list netapp.ontap

/usr/lib/python3.9/site-packages/ansible_collections

Collection Version


netapp.ontap 21.22.0

/root/.ansible/collections/ansible_collections

Collection Version


netapp.ontap 22.1.0

/usr/share/ansible/collections/ansible_collections

Collection Version


netapp.ontap 22.1.0

earnest crypt
#

I've tried upgrading the version above saying 21.22 to the latest. Built a handful of new exec envs/containers.

#

Same issue.

#

ansible-galaxy collection list netapp.ontap

/usr/share/ansible/collections/ansible_collections

Collection Version


netapp.ontap 22.1.0

/root/.ansible/collections/ansible_collections

Collection Version


netapp.ontap 22.1.0

/usr/lib/python3.9/site-packages/ansible_collections

Collection Version


netapp.ontap 22.1.0

candid nexus
#

@earnest crypt
we have made few changes, Jan release(22.2.0) will not have the KeyError

earnest crypt
#

Many thanks, will test it ASAP!

earnest crypt
#

I'm sorry for troubling you with all these noob questions...

#

I'm not able to install the updated collection from github, there's an issue with dependencies. Please view the error below.

#

pwd

/usr/share/ansible/collections

ansible-galaxy collection install netapp.ontap git+https://github.com/ansible-collections/netapp.ontap.git -p . -f

Cloning into '/root/.ansible/tmp/ansible-local-786819sqwh4mht/tmp_d9bri5y/netapp.ontap28rbg3m2'...
remote: Enumerating objects: 919, done.
remote: Counting objects: 100% (919/919), done.
remote: Compressing objects: 100% (859/859), done.
remote: Total 919 (delta 108), reused 578 (delta 18), pack-reused 0
Receiving objects: 100% (919/919), 1.15 MiB | 10.09 MiB/s, done.
Resolving deltas: 100% (108/108), done.
Your branch is up to date with 'origin/main'.
Starting galaxy collection install process
Process install dependency map
ERROR! Failed to resolve the requested dependencies map. Could not satisfy the following requirements:

  • netapp.ontap:* (direct request)
  • netapp.ontap:22.2.0 (dependency of "virtual collection Git repo")
GitHub

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

#

I get the same problem after having downloaded the data and installing from local files.

candid nexus
#

@earnest crypt changes are not yet online, will update.

earnest crypt
#

NP, I'll do the standard install when it's available.

#

Once again. I really appreciate your support.

earnest crypt
#

It's Christmas tomorrow here in Sweden so I'll be off for some days. Don't worry about finishing the update. It can wait until late January.
Thank You and Happy Christmas!

spice mauve
#

Happy New Year. 22.2.0 was released today (Wednesday).

spice mauve
earnest crypt
#

Hi!
Thanks for releasing the update!
I've tested (22.2.0) and the problem with 'KeyError' persists..

Status so far:
This code works fine and did so with the previous version (netapp.ontap 22.1.0)

  • name: Check import netapp-lib
    na_ontap_debug:
    https: true
    validate_certs: false
    username: '{{ lookup("env", "ANSIBLE_NET_USERNAME") }}'
    password: '{{ lookup("env", "ANSIBLE_NET_PASSWORD") }}'
    hostname: storage70.domain.se

Here're the lines that won't work and causes the KeyError.

  • name: delete SnapShot
    na_ontap_snapshot:
    https: true
    validate_certs: false
    state: absent
    snapshot: "mysnap.*"
    volume: "myvol"
    vserver: "my-svm"
    username: '{{ lookup("env", "ANSIBLE_NET_USERNAME") }}'
    password: '{{ lookup("env", "ANSIBLE_NET_PASSWORD") }}'
    hostname: storagedevice

In order to create the debug file /tmp/ontap_apis.log
I've tried adding:

feature_flags:
trace_apis: true

However, since I'm running this on RedHat Automation Platform 2.2, everything happens inside a container and the data isn't available.

This is the debug output I have so far.

#

Please let me know if this is good enough for you or if the debug file is required.

candid nexus
#

@earnest crypt try with 22.3.0(Feb release) and see you get KeyError?