]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
python-common: ban paths from non-data-devices
authorJoshua Schmid <jschmid@suse.de>
Mon, 10 Aug 2020 11:09:25 +0000 (13:09 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Fri, 21 Aug 2020 11:04:01 +0000 (13:04 +0200)
Signed-off-by: Joshua Schmid <jschmid@suse.de>
(cherry picked from commit ac5839b9f5d4ff2c4269b9da0314837cdafa5360)

src/python-common/ceph/deployment/drive_group.py

index 9a5769432fedd5df4316d6a3a4bafcb3a6662490..b5cafdb463e62a812c2a51293e106c127fd260a6 100644 (file)
@@ -295,6 +295,8 @@ class DriveGroupSpec(ServiceSpec):
         for s in filter(None, specs):
             s.validate()
         for s in filter(None, [self.db_devices, self.wal_devices, self.journal_devices]):
+            if s.paths:
+                raise DriveGroupValidationError("`paths` is only allowed for data_devices")
             if s.all:
                 raise DriveGroupValidationError("`all` is only allowed for data_devices")