diff --git a/cmd/gpu_plugin/gpu_plugin.go b/cmd/gpu_plugin/gpu_plugin.go index 5a050fb1..d820974b 100644 --- a/cmd/gpu_plugin/gpu_plugin.go +++ b/cmd/gpu_plugin/gpu_plugin.go @@ -182,6 +182,7 @@ func (dp *devicePlugin) bypathMountsForPci(cardPath, cardName, bypathDir string) for _, f := range files { if strings.HasPrefix(f.Name(), linkPrefix) { absPath := path.Join(bypathDir, f.Name()) + mounts = append(mounts, pluginapi.Mount{ ContainerPath: absPath, HostPath: absPath, diff --git a/pkg/apis/deviceplugin/v1/webhook_common.go b/pkg/apis/deviceplugin/v1/webhook_common.go index b27f97a1..c41e70fd 100644 --- a/pkg/apis/deviceplugin/v1/webhook_common.go +++ b/pkg/apis/deviceplugin/v1/webhook_common.go @@ -42,14 +42,14 @@ func validatePluginImage(image, expectedImageName string, expectedMinVersion *ve imageName := parts[0] versionStr := parts[1] - // If user provided faulty SHA digest, the image name may include @sha256 suffix so strip it + // If user provided faulty SHA digest, the image name may include @sha256 suffix so strip it. if strings.TrimSuffix(imageName, "@sha256") != expectedImageName { - return errors.Errorf("incorrect image name %q. Make sure you use '/%s'.", imageName, expectedImageName) + return errors.Errorf("incorrect image name %q. Make sure you use '/%s'", imageName, expectedImageName) } ver, err := version.ParseSemantic(versionStr) if err != nil { - return errors.Wrapf(err, "unable to parse version %q. Make sure it's either valid SHA digest or semver tag.", versionStr) + return errors.Wrapf(err, "unable to parse version %q. Make sure it's either valid SHA digest or semver tag", versionStr) } if !ver.AtLeast(expectedMinVersion) {