From a4ece9cae60c437b7e01db21c9c42363865c295c Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 18 Sep 2018 11:22:14 +0800 Subject: [PATCH] ceph-volume: fix typos Signed-off-by: Kefu Chai --- src/ceph-volume/ceph_volume/api/lvm.py | 4 ++-- src/ceph-volume/ceph_volume/decorators.py | 2 +- src/ceph-volume/ceph_volume/devices/lvm/activate.py | 2 +- src/ceph-volume/ceph_volume/devices/simple/scan.py | 2 +- src/ceph-volume/ceph_volume/util/disk.py | 2 +- src/ceph-volume/ceph_volume/util/encryption.py | 2 +- src/ceph-volume/ceph_volume/util/prepare.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ceph-volume/ceph_volume/api/lvm.py b/src/ceph-volume/ceph_volume/api/lvm.py index 8c09f09ee1764..4e7ab446f12b7 100644 --- a/src/ceph-volume/ceph_volume/api/lvm.py +++ b/src/ceph-volume/ceph_volume/api/lvm.py @@ -40,7 +40,7 @@ def _output_parser(output, fields): if not line: continue - # spliting on ';' because that is what the lvm call uses as + # splitting on ';' because that is what the lvm call uses as # '--separator' output_items = [i.strip() for i in line.split(';')] # map the output to the fiels @@ -902,7 +902,7 @@ class PVolumes(list): if matches: tag_filtered.append(pvolume) # return the tag_filtered pvolumes here, the `filtered` list is no - # longer useable + # longer usable return tag_filtered return filtered diff --git a/src/ceph-volume/ceph_volume/decorators.py b/src/ceph-volume/ceph_volume/decorators.py index d0be938172f99..f6777281795b2 100644 --- a/src/ceph-volume/ceph_volume/decorators.py +++ b/src/ceph-volume/ceph_volume/decorators.py @@ -41,7 +41,7 @@ def catches(catch=None, handler=None, exit=True): some_call() print "Success!" - If multiple exceptions need to be catched they need to be provided as a + If multiple exceptions need to be caught they need to be provided as a tuple:: @catches((TypeError, AttributeError)) diff --git a/src/ceph-volume/ceph_volume/devices/lvm/activate.py b/src/ceph-volume/ceph_volume/devices/lvm/activate.py index 782a6d16933af..6faebaec38f6e 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/activate.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/activate.py @@ -31,7 +31,7 @@ def activate_filestore(lvs, no_systemd=False): # blow up with a KeyError if this doesn't exist osd_fsid = osd_lv.tags['ceph.osd_fsid'] if not osd_journal_lv: - # must be a disk partition, by quering blkid by the uuid we are ensuring that the + # must be a disk partition, by querying blkid by the uuid we are ensuring that the # device path is always correct journal_uuid = osd_lv.tags['ceph.journal_uuid'] osd_journal = disk.get_device_from_partuuid(journal_uuid) diff --git a/src/ceph-volume/ceph_volume/devices/simple/scan.py b/src/ceph-volume/ceph_volume/devices/simple/scan.py index 1ef257c190fab..9dabbe9ba77d7 100644 --- a/src/ceph-volume/ceph_volume/devices/simple/scan.py +++ b/src/ceph-volume/ceph_volume/devices/simple/scan.py @@ -269,7 +269,7 @@ class Scan(object): ) ) terminal.success( - 'To take over managment of this scanned OSD, and disable ceph-disk and udev, run:' + 'To take over management of this scanned OSD, and disable ceph-disk and udev, run:' ) terminal.success(' ceph-volume simple activate %s %s' % (osd_id, osd_fsid)) diff --git a/src/ceph-volume/ceph_volume/util/disk.py b/src/ceph-volume/ceph_volume/util/disk.py index 2cb6f7bc656ef..88f1045a25b6a 100644 --- a/src/ceph-volume/ceph_volume/util/disk.py +++ b/src/ceph-volume/ceph_volume/util/disk.py @@ -438,7 +438,7 @@ class Size(object): for k, v in kw.items(): self._convert(v, k) - # only pursue the first occurence + # only pursue the first occurrence break def _convert(self, size, unit): diff --git a/src/ceph-volume/ceph_volume/util/encryption.py b/src/ceph-volume/ceph_volume/util/encryption.py index cc594a07e8304..28036aee98ae4 100644 --- a/src/ceph-volume/ceph_volume/util/encryption.py +++ b/src/ceph-volume/ceph_volume/util/encryption.py @@ -148,7 +148,7 @@ def write_lockbox_keyring(osd_id, osd_fsid, secret): For filestore: The path for the OSD would exist at this point even if no OSD data device is mounted, so the keyring is written to fetch the key, and then the data device is mounted on that directory, making the keyring - "dissapear". + "disappear". """ if os.path.exists('/var/lib/ceph/osd/%s-%s/lockbox.keyring' % (conf.cluster, osd_id)): return diff --git a/src/ceph-volume/ceph_volume/util/prepare.py b/src/ceph-volume/ceph_volume/util/prepare.py index 1c1d45318627e..62fb642cf7af9 100644 --- a/src/ceph-volume/ceph_volume/util/prepare.py +++ b/src/ceph-volume/ceph_volume/util/prepare.py @@ -346,7 +346,7 @@ def osd_mkfs_bluestore(osd_id, fsid, keyring=None, wal=False, db=False): --setuser ceph --setgroup ceph In some cases it is required to use the keyring, when it is passed in as - a keywork argument it is used as part of the ceph-osd command + a keyword argument it is used as part of the ceph-osd command """ path = '/var/lib/ceph/osd/%s-%s/' % (conf.cluster, osd_id) monmap = os.path.join(path, 'activate.monmap') -- 2.39.5