Merge pull request #80318 from davidxia/fix-err-caps
cleanup: fix some log and error capitalizations
This commit is contained in:
@@ -79,14 +79,14 @@ func mountInChroot(rootfsPath string, args []string) error {
|
||||
// Mount failed because it is NFS V3 and we need to run rpcBind
|
||||
output, err = exec.Command(chrootCmd, rootfsPath, rpcBindCmd, "-w").CombinedOutput()
|
||||
if err != nil {
|
||||
return fmt.Errorf("Mount issued for NFS V3 but unable to run rpcbind:\n Output: %s\n Error: %v", string(output), err)
|
||||
return fmt.Errorf("mount issued for NFS V3 but unable to run rpcbind:\n Output: %s\n Error: %v", string(output), err)
|
||||
}
|
||||
|
||||
// Rpcbind is running, try mounting again
|
||||
output, err = exec.Command(chrootCmd, args...).CombinedOutput()
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("Mount failed for NFS V3 even after running rpcBind %s, %v", string(output), err)
|
||||
return fmt.Errorf("mount failed for NFS V3 even after running rpcBind %s, %v", string(output), err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@@ -195,12 +195,12 @@ func (e *CombinedEtcdClient) AttachLease(leaseDuration time.Duration) error {
|
||||
defer v3client.Close()
|
||||
objectsResp, err := v3client.KV.Get(ctx, ttlKeysPrefix, clientv3.WithPrefix())
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error while getting objects to attach to the lease")
|
||||
return fmt.Errorf("error while getting objects to attach to the lease")
|
||||
}
|
||||
|
||||
lease, err := v3client.Lease.Grant(ctx, int64(leaseDuration/time.Second))
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error while creating lease: %v", err)
|
||||
return fmt.Errorf("error while creating lease: %v", err)
|
||||
}
|
||||
klog.Infof("Lease with TTL: %v created", lease.TTL)
|
||||
|
||||
|
@@ -87,7 +87,7 @@ func (r *EtcdMigrateServer) Start(version *EtcdVersion) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("error killing etcd: %v", err)
|
||||
}
|
||||
return fmt.Errorf("Timed out waiting for etcd on port %d", r.cfg.port)
|
||||
return fmt.Errorf("timed out waiting for etcd on port %d", r.cfg.port)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -111,7 +111,7 @@ type EtcdVersionPair struct {
|
||||
func ParseEtcdVersionPair(s string) (*EtcdVersionPair, error) {
|
||||
parts := strings.Split(s, "/")
|
||||
if len(parts) != 2 {
|
||||
return nil, fmt.Errorf("Malformed version file, expected <major>.<minor>.<patch>/<storage> but got %s", s)
|
||||
return nil, fmt.Errorf("malformed version file, expected <major>.<minor>.<patch>/<storage> but got %s", s)
|
||||
}
|
||||
version, err := ParseEtcdVersion(parts[0])
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user