diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-06 10:15:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-06 10:15:04 +0200 |
commit | 80a2317ca20b0e5e1cd064a8962beed642be3a36 (patch) | |
tree | 0730915a611542bf028d5b9c66ace1390a6c036f /pkg/domain/infra/abi/play.go | |
parent | f584d47a9d0c050c3b39793a73b0aba17b45e8ba (diff) | |
parent | d4aa89bb40b3a2c1730c9bff31a681007a3feb97 (diff) | |
download | podman-80a2317ca20b0e5e1cd064a8962beed642be3a36.tar.gz podman-80a2317ca20b0e5e1cd064a8962beed642be3a36.tar.bz2 podman-80a2317ca20b0e5e1cd064a8962beed642be3a36.zip |
Merge pull request #7929 from kolyshkin/nits-err
Nits
Diffstat (limited to 'pkg/domain/infra/abi/play.go')
-rw-r--r-- | pkg/domain/infra/abi/play.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go index aa6aeede2..40edc1ae3 100644 --- a/pkg/domain/infra/abi/play.go +++ b/pkg/domain/infra/abi/play.go @@ -100,7 +100,7 @@ func (ic *ContainerEngine) playKubeDeployment(ctx context.Context, deploymentYAM podName := fmt.Sprintf("%s-pod-%d", deploymentName, i) podReport, err := ic.playKubePod(ctx, podName, &podSpec, options) if err != nil { - return nil, errors.Wrapf(err, "Error encountered while bringing up pod %s", podName) + return nil, errors.Wrapf(err, "error encountered while bringing up pod %s", podName) } report.Pods = append(report.Pods, podReport.Pods...) } @@ -248,18 +248,18 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY case v1.HostPathDirectoryOrCreate: if _, err := os.Stat(hostPath.Path); os.IsNotExist(err) { if err := os.Mkdir(hostPath.Path, kubeDirectoryPermission); err != nil { - return nil, errors.Errorf("Error creating HostPath %s at %s", volume.Name, hostPath.Path) + return nil, errors.Errorf("error creating HostPath %s", volume.Name) } } // Label a newly created volume if err := libpod.LabelVolumePath(hostPath.Path); err != nil { - return nil, errors.Wrapf(err, "Error giving %s a label", hostPath.Path) + return nil, errors.Wrapf(err, "error giving %s a label", hostPath.Path) } case v1.HostPathFileOrCreate: if _, err := os.Stat(hostPath.Path); os.IsNotExist(err) { f, err := os.OpenFile(hostPath.Path, os.O_RDONLY|os.O_CREATE, kubeFilePermission) if err != nil { - return nil, errors.Errorf("Error creating HostPath %s at %s", volume.Name, hostPath.Path) + return nil, errors.Errorf("error creating HostPath %s", volume.Name) } if err := f.Close(); err != nil { logrus.Warnf("Error in closing newly created HostPath file: %v", err) @@ -267,15 +267,15 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY } // unconditionally label a newly created volume if err := libpod.LabelVolumePath(hostPath.Path); err != nil { - return nil, errors.Wrapf(err, "Error giving %s a label", hostPath.Path) + return nil, errors.Wrapf(err, "error giving %s a label", hostPath.Path) } case v1.HostPathSocket: st, err := os.Stat(hostPath.Path) if err != nil { - return nil, errors.Wrapf(err, "Error checking HostPathSocket") + return nil, errors.Wrap(err, "error checking HostPathSocket") } if st.Mode()&os.ModeSocket != os.ModeSocket { - return nil, errors.Errorf("Error checking HostPathSocket: path %s is not a socket", hostPath.Path) + return nil, errors.Errorf("error checking HostPathSocket: path %s is not a socket", hostPath.Path) } case v1.HostPathDirectory: @@ -289,7 +289,7 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY } if err := parse.ValidateVolumeHostDir(hostPath.Path); err != nil { - return nil, errors.Wrapf(err, "Error in parsing HostPath in YAML") + return nil, errors.Wrapf(err, "error in parsing HostPath in YAML") } volumes[volume.Name] = hostPath.Path } |