-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export policy on qtree broken with ontap 9.8 #30
Comments
Thank you for reporting an issue! If you haven't already joined our Slack community, |
I did some testing and was able to verify the same. I checked both 9.8 and 9.9.1 and the issue was as you described. I filed a bug In the meantime, as a workaround, you can change your code like this:
This change requires an extra API call to the /api/protocols/nfs/export-policies endpoint, but should serve as a temporary workaround. |
Robert, any ETA on when a patch with this is planned? We have this on multiple places, and have to make the decision to manually update all our code, or wait for the patch. This would be dependent on when you think it would be fixed by. |
No, I don't have that information. There's not yet an ETA or decided patch release. I will ask the developers to update this thread when they make that decision. |
It might take a couple of months for the fix to be available in a patch, so please use the above mentioned workaround. |
I tried using the work around: I'm using netapp-ontap==9.9.1
|
You appear to be running into bug 1378458: http://support.netapp.com/NOW/cgi-bin/bol?Type=Detail&Display=1378458 To work around that, on line 56 of your mount_nfs_v2_workaround.py script, you can change |
I tried that... no luck: [root@i-0d03741cd10a2d9ce ~]# cat /root/mount.log Here is my script:
|
Sorry, I think my answer just had a typo. Your script has |
Hey no worries... here's the next error: Traceback (most recent call last): And code:
|
Same issue. You need to change line 60 from |
Any update on if this has been fixed in any version yet? |
Yes, the mentioned bug was fixed. You'll want to grab version 9.10.1.0 of the library which was released in January: https://pypi.org/project/netapp-ontap/9.10.1.0/ |
Great, any idea if this would work n-2. Our system is still on 9.8 |
Yes, the library is backwards compatible with prior versions of ONTAP. This is because the REST API is itself backwards compatible. My recommendation would to always use the latest version of the library. |
Cleaning up stale issues |
We have code that adds IP's to existing NFS export policies.
This has been running on ontap 9.7 with the 9.7 python library
We upgraded ontap to 9.8, and the API broke. We tried running it with the 9.7, 9.8.1 and 9.9 python libraries. Please take a look into why this API broke with the upgrade to OnTap 9.8
Code:
def getQtreeExportID(qtreeName):
print("Getting QTree Export Policy ID")
print("QTree Name: ", qtreeName)
qTreeList = list(Qtree.get_collection(fields="export_policy"))
for qTree in qTreeList:
if(qTree.name == qtreeName):
return qTree.export_policy.id
Output:
Getting QTree Export Policy ID
QTree Name: dev-qtree
Traceback (most recent call last):
File "./mount_nfs_v2.py", line 136, in
main(sys.argv[1:])
File "./mount_nfs_v2.py", line 129, in main
exportPolicyQtreeID = getQtreeExportID(qtreeName)
File "./mount_nfs_v2.py", line 32, in getQtreeExportID
return qTree.export_policy.id
File "/usr/local/lib/python3.6/site-packages/netapp_ontap/resource.py", line 195, in getattribute
) from None
AttributeError: The 'id' field has not been set on the ExportPolicy. Try refreshing the object by calling get().
The text was updated successfully, but these errors were encountered: