Actions
Bug #62641
openmgr/(object_format && nfs/export): enhance nfs export update failure response
Status:
Pending Backport
Priority:
Normal
Assignee:
Category:
python interface
Target version:
% Done:
0%
Source:
Development
Tags:
backport_processed
Backport:
quincy,reef
Regression:
No
Severity:
3 - minor
Reviewed:
Description
Currently when an export update fails, the response is like this:
[
{
"msg": "Failed to apply export: export FSAL user_id must be 'nfs.my-nfs.1'",
"state": "error"
},
{
"pseudo": "/ceph1",
"state": "added"
},
{
"msg": "Failed to apply export: export FSAL user_id must be 'nfs.my-nfs.2'",
"state": "error"
}
]
Error EIO:
this needs to be corrected to proper errno, I'd say EINVAL is a better fit since it indicates the export block contains invalid entries and needs correction. Apart from errno, the last line looks incomplete; there needs to be a err msg after 'Error EIO:', this aided by a prefix indicating how many export block contain invalid entries would also be useful, and the index of those problematic export block(s) can also be shown. So the final output could be like
[
{
"msg": "Failed to apply export: export FSAL user_id must be 'nfs.my-nfs.1'",
"state": "error"
},
{
"pseudo": "/ceph1",
"state": "added"
}
{
"msg": "Failed to apply export: export FSAL user_id must be 'nfs.my-nfs.2'",
"state": "error"
}
]
Error EINVAL: 2 export blocks(at index 0, 1) contain invalid entries.
I had a conversation with John about this on one of my PR and it seems we might need to make some modifications/additions to the object_format.py code. Would be happy to assist for any help needed.
Actions