Project

General

Profile

Actions

Bug #62641

open

mgr/(object_format && nfs/export): enhance nfs export update failure response

Added by Dhairya Parmar 9 months ago. Updated 6 months ago.

Status:
Pending Backport
Priority:
Normal
Category:
python interface
Target version:
% Done:

0%

Source:
Development
Tags:
backport_processed
Backport:
quincy,reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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.


Related issues 3 (1 open2 closed)

Related to mgr - Bug #62659: mgr/nfs: report actual errno instead of EIO for single export update failureClosedDhairya Parmar

Actions
Copied to mgr - Backport #63690: quincy: mgr/(object_format && nfs/export): enhance nfs export update failure responseRejectedDhairya ParmarActions
Copied to mgr - Backport #63691: reef: mgr/(object_format && nfs/export): enhance nfs export update failure responseIn ProgressDhairya ParmarActions
Actions

Also available in: Atom PDF