Skip to content

Commit

Permalink
Merge pull request containers#9838 from xordspar0/kubeVolumeErrors
Browse files Browse the repository at this point in the history
Add problematic volume name to kube play error messages
  • Loading branch information
openshift-merge-robot authored Mar 28, 2021
2 parents ec47312 + dce877c commit 4831d41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/specgen/generate/kube/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func InitializeVolumes(specVolumes []v1.Volume) (map[string]*KubeVolume, error)
for _, specVolume := range specVolumes {
volume, err := VolumeFromSource(specVolume.VolumeSource)
if err != nil {
return nil, err
return nil, errors.Wrapf(err, "failed to create volume %q", specVolume.Name)
}

volumes[specVolume.Name] = volume
Expand Down
1 change: 1 addition & 0 deletions test/e2e/play_kube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,7 @@ spec:
kube := podmanTest.Podman([]string{"play", "kube", kubeYaml})
kube.WaitWithDefaultTimeout()
Expect(kube.ExitCode()).NotTo(Equal(0))
Expect(kube.ErrorToString()).To(ContainSubstring(defaultVolName))
})

It("podman play kube test with empty HostPath type volume", func() {
Expand Down

0 comments on commit 4831d41

Please sign in to comment.