cleanup: fix typos in rbd_util.go

Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
This commit is contained in:
Guangming Wang 2019-08-15 22:39:15 +08:00 committed by GitHub
parent 32dc42ed34
commit c718ba6871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -295,7 +295,7 @@ func rbdErrors(runErr, resultErr error) error {
// 'rbd' utility builds a comma-separated list of monitor addresses from '-m' / // 'rbd' utility builds a comma-separated list of monitor addresses from '-m' /
// '--mon_host` parameter (comma, semi-colon, or white-space delimited monitor // '--mon_host` parameter (comma, semi-colon, or white-space delimited monitor
// addresses) and send it to kernel rbd/libceph modules, which can accept // addresses) and send it to kernel rbd/libceph modules, which can accept
// comma-seprated list of monitor addresses (e.g. ip1[:port1][,ip2[:port2]...]) // comma-separated list of monitor addresses (e.g. ip1[:port1][,ip2[:port2]...])
// in their first version in linux (see // in their first version in linux (see
// https://github.com/torvalds/linux/blob/602adf400201636e95c3fed9f31fba54a3d7e844/net/ceph/ceph_common.c#L239). // https://github.com/torvalds/linux/blob/602adf400201636e95c3fed9f31fba54a3d7e844/net/ceph/ceph_common.c#L239).
// Also, libceph module chooses monitor randomly, so we can simply pass all // Also, libceph module chooses monitor randomly, so we can simply pass all
@ -378,7 +378,7 @@ func (util *RBDUtil) AttachDisk(b rbdMounter) (string, error) {
} }
} }
// Evalute whether this device was mapped with rbd. // Evaluate whether this device was mapped with rbd.
devicePath, mapped := waitForPath(b.Pool, b.Image, 1 /*maxRetries*/, false /*useNbdDriver*/) devicePath, mapped := waitForPath(b.Pool, b.Image, 1 /*maxRetries*/, false /*useNbdDriver*/)
// If rbd-nbd tools are found, we will fallback to it should the default krbd driver fail. // If rbd-nbd tools are found, we will fallback to it should the default krbd driver fail.
@ -491,7 +491,7 @@ func (util *RBDUtil) DetachDisk(plugin *rbdPlugin, deviceMountPath string, devic
klog.V(3).Infof("rbd: successfully unmap device %s", device) klog.V(3).Infof("rbd: successfully unmap device %s", device)
// Currently, we don't persist rbd info on the disk, but for backward // Currently, we don't persist rbd info on the disk, but for backward
// compatbility, we need to clean it if found. // compatibility, we need to clean it if found.
rbdFile := filepath.Join(deviceMountPath, "rbd.json") rbdFile := filepath.Join(deviceMountPath, "rbd.json")
exists, err := utilpath.Exists(utilpath.CheckFollowSymlink, rbdFile) exists, err := utilpath.Exists(utilpath.CheckFollowSymlink, rbdFile)
if err != nil { if err != nil {