From 01ff8960b5849c9abfc51c22bb461a7ca653e1c8 Mon Sep 17 00:00:00 2001 From: Danielle Lancashire Date: Thu, 13 Feb 2020 11:23:50 +0100 Subject: [PATCH] volume_hook: Loosen validation in host volume prep --- client/allocrunner/taskrunner/volume_hook.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/allocrunner/taskrunner/volume_hook.go b/client/allocrunner/taskrunner/volume_hook.go index 15881df20..3bd3e6e96 100644 --- a/client/allocrunner/taskrunner/volume_hook.go +++ b/client/allocrunner/taskrunner/volume_hook.go @@ -57,8 +57,10 @@ func (h *volumeHook) hostVolumeMountConfigurations(taskMounts []*structs.VolumeM for _, m := range taskMounts { req, ok := taskVolumesByAlias[m.Volume] if !ok { - // Should never happen unless we misvalidated on job submission - return nil, fmt.Errorf("No group volume declaration found named: %s", m.Volume) + // This function receives only the task volumes that are of type Host, + // if we can't find a group volume then we assume the mount is for another + // type. + continue } // This is a defensive check, but this function should only ever receive