Project

General

Profile

Actions

Bug #62077

open

mgr/nfs: validate path when modifying cephfs export

Added by Dhairya Parmar 10 months ago. Updated 2 months ago.

Status:
Fix Under Review
Priority:
Normal
Category:
Administration/Usability
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
reef,quincy,squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
mgr/nfs
Labels (FS):
NFS-cluster
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

sh-4.4$ ceph nfs export ls nfs-cephfs --detailed
[
  {
    "export_id": 1,
    "path": "/",
    "cluster_id": "nfs-cephfs",
    "pseudo": "/ceph",
    "access_type": "RW",
    "squash": "none",
    "security_label": true,
    "protocols": [
      4
    ],
    "transports": [
      "TCP" 
    ],
    "fsal": {
      "name": "CEPH",
      "user_id": "nfs.nfs-cephfs.1",
      "fs_name": "myfs" 
    },
    "clients": []
  }
]
sh-4.4$ cat export.conf 
{ 
 "export_id": 1,
  "path": "/non_existent_path",
  "cluster_id": "cephfsnfs",
  "pseudo": "/ceph",
  "access_type": "RW",
  "squash": "none",
  "security_label": true,
  "protocols": [
    4
  ],
  "transports": [
    "TCP" 
  ],
  "fsal": {
    "name": "CEPH",
    "user_id": "nfs.nfs-cephfs.1",
    "fs_name": "myfs" 
  },
  "clients": []
}
sh-4.4$ ceph nfs export apply nfs-cephfs -i export.conf
sh-4.4$ ceph nfs export ls nfs-cephfs --detailed
[
  {
    "export_id": 1,
    "path": "/non_existent_path",
    "cluster_id": "nfs-cephfs",
    "pseudo": "/ceph",
    "access_type": "RW",
    "squash": "none",
    "security_label": true,
    "protocols": [
      4
    ],
    "transports": [
      "TCP" 
    ],
    "fsal": {
      "name": "CEPH",
      "user_id": "nfs.nfs-cephfs.1",
      "fs_name": "myfs" 
    },
    "clients": []
  }
]

Mounting this export would most probably fail. Therefore check if the path is valid.

Actions #1

Updated by Venky Shankar 10 months ago

  • Category set to Administration/Usability
  • Assignee set to Dhairya Parmar
  • Target version set to v19.0.0
  • Backport set to reef,quincy,pacific

Dhairya, this should be straightforward with the path validation helper you introduced, right?

Actions #2

Updated by Dhairya Parmar 9 months ago

Venky Shankar wrote:

Dhairya, this should be straightforward with the path validation helper you introduced, right?

yes

Actions #3

Updated by Dhairya Parmar 9 months ago

  • Status changed from New to In Progress
  • Pull request ID set to 52859
Actions #4

Updated by Venky Shankar 2 months ago

  • Status changed from In Progress to Fix Under Review
  • Backport changed from reef,quincy,pacific to reef,quincy,squid
Actions

Also available in: Atom PDF