NetAppDocs / bluexp-automation

https://docs.netapp.com/us-en/bluexp-automation/
2 stars 2 forks source link

failing to set rules cause the volume modifications to fail #114

Closed halradaideh closed 4 months ago

halradaideh commented 6 months ago

Page URL

https://docs.netapp.com/us-en/bluexp-automation/cm/wf_gcp_ontap_create_vol_nfs.html

Page title

Create a volume using NFS

Summary

not setting "rules" causes the API to throw this error failed to set field "rorule" to "-'

Public issues must not contain sensitive information

netapp-ranuk commented 6 months ago

Thanks for reporting the issue. We'll investigate internally and will respond as soon as we can.

netapp-ranuk commented 5 months ago

Hi @halradaideh

We investigated the issue internally and we anticipate that the issue is presumably due to a change in the netapp terraform provider which has mandated providing values for the two attributes : “export_policy_rule_super_user” and “export_policy_rule_access_control”. We recommend providing a value for these attributes as opposed to keeping it as “-”.

Please let us know if you have any other concerns.

halradaideh commented 5 months ago

i am not using a terraform provider i am talking directly with the API

netapp-ranuk commented 5 months ago

Can you please elaborate a bit more about the exact issue you're encountering? Are you able to set rules? Were you able to provide values?

halradaideh commented 5 months ago

the issue was this API payload was working before

    url = "http://{}/occm/api/gcp/vsa/volumes/{}/{}/{}".format(hostname, we['publicId'], vol['svmName'], vol['name'])
    data = {
        'exportPolicyInfo': {
            'name': 'rule',
            'policyType': 'custom',
            'ips': ["1.2.3.4"],
        }
    }

and now it's not, complaining that rorule is not set properly, which is not defined at all and the documentation doesn't require it as part of the payload

I had to do this to the API payload in order to work

    url = "http://{}/occm/api/gcp/vsa/volumes/{}/{}/{}".format(hostname, we['publicId'], vol['svmName'], vol['name'])
    data = {
        'exportPolicyInfo': {
            'name': 'rule',
            'policyType': 'custom',
            'ips': ["1.2.3.4"],
            "nfsVersion": [
                "nfs3",
                "nfs4"
            ],
            "rules": [
                {
                    "index": 1,
                    "ruleAccessControl": "readwrite",
                    "ips":  ["1.2.3.4"],
                    "nfsVersion": [
                        "nfs3",
                        "nfs4"
                    ],
                    "superUser": True
                }
            ]
        }
    }
netapp-ranuk commented 5 months ago

Thanks for sharing. We'll plan to update the documentation as soon as possible.

netapp-ranuk commented 4 months ago

Thanks @halradaideh. We have now updated "Create a volume using NFS" for all the cloud providers including the GCP workflow where the issue was originally found. Please refer to https://docs.netapp.com/us-en/bluexp-automation/cm/wf_gcp_ontap_create_vol_nfs.html.

halradaideh commented 4 months ago

thanks