Azure / Azure/azure-cli

CLI for Netapp volume version convention from nfsv3 to nfsv4 issue

Open
#33,037 2 comments 0 reactions 0 assignees View on GitHub
act-observability-squad Auto-Assign customer-reported Language NetAppFiles Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

From our official document https://learn.microsoft.com/en-us/azure/azure-netapp-files/convert-nfsv3-nfsv41

If we convert from portal, there is no other additional steps to do.

However if we try with CLI, we need to manually add the Export Policy value. The following is how I reproduce the issue:

without debug option

tong [ ~ ]$ az netappfiles volume update -g netapp --account-name anf --pool-name test --name nfs3to4 --protocol-types NFSv4.1
(InvalidExportPolicyRule) Protocol type NFSv4.1 must have at least one export policy rule that does not contain NFSv3 as true
Code: InvalidExportPolicyRule
Message: Protocol type NFSv4.1 must have at least one export policy rule that does not contain NFSv3 as true

with debug:
az netappfiles volume update -g netapp --account-name anf --pool-name test --name nfs3to4 --protocol-types NFSv4.1 --debug

Error:

Message: Protocol type NFSv4.1 must have at least one export policy rule that does not contain NFSv3 as true

cli.azure.cli.core.azclierror: (InvalidExportPolicyRule) Protocol type NFSv4.1 must have at least one export policy rule that does not contain NFSv3 as true
Code: InvalidExportPolicyRule
Message: Protocol type NFSv4.1 must have at least one export policy rule that does not contain NFSv3 as true
az_command_data_logger: (InvalidExportPolicyRule) Protocol type NFSv4.1 must have at least one export policy rule that does not contain NFSv3 as true
Code: InvalidExportPolicyRule
Message: Protocol type NFSv4.1 must have at least one export policy rule that does not contain NFSv3 as true

How I mitigate this issue:

I manually add the export policy rule

az netappfiles volume update \
--resource-group netapp \
--account-name anf \
--pool-name test \
--name nfs3to4 \
--protocol-types NFSv4.1 \
--export-policy-rules '[
{
"ruleIndex": 1,
"allowedClients": "0.0.0.0/0",
"nfsv3": false,
"nfsv41": true,
"unixReadWrite": true,
"unixReadOnly": false,
"kerberos5ReadOnly": false,
"kerberos5ReadWrite": false,
"kerberos5iReadOnly": false,
"kerberos5iReadWrite": false,
"kerberos5pReadOnly": false,
"kerberos5pReadWrite": false,
"cifs": false,
"hasRootAccess": true
}
]'

My ask: Can we make this command be easier just like the portal and explain it from code level

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.