]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/ceph-volume/ceph_volume/devices/lvm/migrate.py
import ceph 16.2.7
[ceph.git] / ceph / src / ceph-volume / ceph_volume / devices / lvm / migrate.py
index 886b9f7b4fd6b1a6e54a6b71be50358d33482f15..dc982f153b4ed25a02626bfed8bd3d1c630edd82 100644 (file)
@@ -8,6 +8,7 @@ from ceph_volume.util.device import Device
 from ceph_volume import decorators, terminal, process
 from ceph_volume.api import lvm as api
 from ceph_volume.systemd import systemctl
+from ceph_volume.devices.lvm.common import valid_osd_id
 
 
 logger = logging.getLogger(__name__)
@@ -275,7 +276,7 @@ class Migrate(object):
     # (in the order of precedence, stop on the first match)
     # if source list has DB volume - target device replaces it.
     # if source list has WAL volume - target device replace it.
-    # if source list has slow volume only - operation isn\92t permitted,
+    # if source list has slow volume only - operation isn't permitted,
     #  requires explicit allocation via new-db/new-wal command.detects which
     def get_target_type_by_source(self, devices):
         ret = None
@@ -413,7 +414,7 @@ class Migrate(object):
         target_lv = api.get_lv_by_fullname(self.args.target)
         if not target_lv:
             mlogger.error(
-                'Target path "{}" is not a Logical Volume'.formaat(
+                'Target path "{}" is not a Logical Volume'.format(
                     self.args.target))
             raise SystemExit(
                 'Unable to migrate to : {}'.format(self.args.target))
@@ -447,6 +448,7 @@ class Migrate(object):
             '--osd-id',
             required=True,
             help='Specify an OSD ID to detect associated devices for zapping',
+            type=valid_osd_id
         )
 
         parser.add_argument(
@@ -545,6 +547,7 @@ class NewVolume(object):
             '--osd-id',
             required=True,
             help='Specify an OSD ID to attach new volume to',
+            type=valid_osd_id,
         )
 
         parser.add_argument(