Hello Ludes
Thank you for taking the time to ask the Pure Storage team to investigate this issue.
I see that simon released a new version of the ansible flashblade collection and I move forward with my problem.
I have a more understandable error 😁
"msg": "Failed to get NFS export policy rules for test_nfs_export. Error: Unexpected error."
In the collection the function : get_nfs_export_policies_rules is used and it located in the python pypure-client
I have isolate the code and reproduce the behavior
import pypureclient
from pypureclient import flashblade
import platform
VERSION = "1.5"
USER_AGENT_BASE = "Ansible"
API_AGENT_VERSION = "1.5"
user_agent = "%(base)s %(class)s/%(version)s (%(platform)s)" % {
"base": USER_AGENT_BASE,
"class": __name__,
"version": VERSION,
"platform": platform.platform(),
}
try:
blade = flashblade.Client('myFB.domain.com', api_token="TOKEN", user_agent=user_agent)
except pypureclient.exceptions.PureError as e:
print("Exception when logging in to the array: %s\n" % e)
versions = list(blade.get_versions().items)
print(versions)
res = blade.get_nfs_export_policies_rules(
policy_names=["test_nfs_export"],
filter="client='" + '10.0.1.0/24' + "'")
print(res)
if type(res) == pypureclient.responses.ValidResponse:
print(list(res.items))
This return :
{'errors': [{'context': None, 'message': 'Unexpected error.'}],
'headers': None,
'status_code': 500}
The good news is that we have consistent behavior, and the problem is isolated to the filter when adding a new NFS policy member.
Finally, I tried to use the FlashBlade API directly:
➜ curl -X GET "https://myFB.domain.com/api/2.24/nfs-export-policies/rules?policy_names=test_nfs_export&filter=client%3D%2710.0.1.0%2F24%2 7" -H "x-auth-token: TOKEN"
{"errors":[{"code":0,"message":"Unexpected error.","location_context":null}]}
However, it works correctly with an already-defined subnet (also with an FQDN).
Something has probably changed in the API in Purity//FB 4.6.9, and it needs to be fixed to ensure the API returns a status code different from 200.
Could you please confirm whether this works in older versions of Purity//FB? I don't have access to an older FlashBlade to test.
I appreciate your help and insights.
Best regards.