Project

General

Profile

Bug #51870

pybind/mgr/volumes: first subvolume permissions set perms on /volumes and /volumes/group

Added by Patrick Donnelly over 2 years ago. Updated 11 months ago.

Status:
Resolved
Priority:
Urgent
Category:
-
Target version:
% Done:

100%

Source:
Development
Tags:
backport_processed
Backport:
pacific,octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
mgr/volumes
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Because we use the "mkdirs" method for making parents to a subvolume, the perms for the subvolume specified by --mode are used for all parents too. This is wrong because you can get:

pdonnell@vossi04 ~/ceph/build$ bin/ceph fs subvolume create a d --mode=777 --size=$((2**30))
pdonnell@vossi04 ~/mnt/tmp.0cSPBAJM59$ ls -lha volumes/
total 1.5K
drwxrwxrwx. 3 root     root      120 Jul 27 19:17 .
drwxr-xr-x. 4 pdonnell pdonnell 473M Jul 27 19:17 ..
-rwxr-xr-x. 1 root     root        0 Jul 27 19:17 _:d.meta
drwxrwxrwx. 3 root     root      120 Jul 27 19:17 _nogroup

volumes should be 0755 and _nogroup should be 0755.


Related issues

Copied to CephFS - Backport #52628: pacific: pybind/mgr/volumes: first subvolume permissions set perms on /volumes and /volumes/group Resolved
Copied to CephFS - Backport #52629: octopus: pybind/mgr/volumes: first subvolume permissions set perms on /volumes and /volumes/group Resolved

History

#1 Updated by Ramana Raja over 2 years ago

Nice catch! The current test, test_subvolume_create_with_desired_mode_in_group doesn't check whether the mode of subvolume group remains unchanged. How did you run into this bug?

We'll need this in Octopus too? Upstream manila CI uses octopus for testing.

#2 Updated by Patrick Donnelly over 2 years ago

  • Backport changed from pacific to pacific,octopus

Ramana Raja wrote:

Nice catch! The current test, test_subvolume_create_with_desired_mode_in_group doesn't check whether the mode of subvolume group remains unchanged. How did you run into this bug?

Manual testing for an unrelated BZ.

We'll need this in Octopus too? Upstream manila CI uses octopus for testing.

Sure.

#3 Updated by Kotresh Hiremath Ravishankar over 2 years ago

  • Pull request ID set to 42719

#4 Updated by Kotresh Hiremath Ravishankar over 2 years ago

  • Status changed from New to Fix Under Review

#5 Updated by Patrick Donnelly over 2 years ago

  • Status changed from Fix Under Review to Pending Backport

#6 Updated by Backport Bot over 2 years ago

  • Copied to Backport #52628: pacific: pybind/mgr/volumes: first subvolume permissions set perms on /volumes and /volumes/group added

#7 Updated by Backport Bot over 2 years ago

  • Copied to Backport #52629: octopus: pybind/mgr/volumes: first subvolume permissions set perms on /volumes and /volumes/group added

#8 Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed

#9 Updated by Konstantin Shalygin 11 months ago

  • Status changed from Pending Backport to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF