diff --git a/client/allocrunner/taskrunner/volume_hook.go b/client/allocrunner/taskrunner/volume_hook.go index 6c548b3f7..b2c0ab3e7 100644 --- a/client/allocrunner/taskrunner/volume_hook.go +++ b/client/allocrunner/taskrunner/volume_hook.go @@ -78,7 +78,7 @@ func (h *volumeHook) hostVolumeMountConfigurations(taskMounts []*structs.VolumeM } mcfg := &drivers.MountConfig{ - HostPath: hostVolume.Source, + HostPath: hostVolume.Path, TaskPath: m.Destination, Readonly: hostVolume.ReadOnly || req.ReadOnly || m.ReadOnly, } diff --git a/command/agent/config_parse_test.go b/command/agent/config_parse_test.go index cbb57b833..362bddb92 100644 --- a/command/agent/config_parse_test.go +++ b/command/agent/config_parse_test.go @@ -83,7 +83,7 @@ var basicConfig = &Config{ NoHostUUID: helper.BoolToPtr(false), DisableRemoteExec: true, HostVolumes: []*structs.ClientHostVolumeConfig{ - {Name: "tmp", Source: "/tmp"}, + {Name: "tmp", Path: "/tmp"}, }, }, Server: &ServerConfig{ diff --git a/command/agent/testdata/basic.hcl b/command/agent/testdata/basic.hcl index 68176295e..03ce1c749 100644 --- a/command/agent/testdata/basic.hcl +++ b/command/agent/testdata/basic.hcl @@ -91,7 +91,7 @@ client { disable_remote_exec = true host_volume "tmp" { - source = "/tmp" + path = "/tmp" } } diff --git a/command/agent/testdata/basic.json b/command/agent/testdata/basic.json index f855dd397..6eedcb85f 100644 --- a/command/agent/testdata/basic.json +++ b/command/agent/testdata/basic.json @@ -55,7 +55,7 @@ { "tmp": [ { - "source": "/tmp" + "path": "/tmp" } ] } diff --git a/nomad/structs/volumes.go b/nomad/structs/volumes.go index 6486a1ae8..a1fdfc6d3 100644 --- a/nomad/structs/volumes.go +++ b/nomad/structs/volumes.go @@ -12,7 +12,7 @@ const ( // ClientHostVolumeConfig is used to configure access to host paths on a Nomad Client type ClientHostVolumeConfig struct { Name string `hcl:",key"` - Source string `hcl:"source"` + Path string `hcl:"path"` ReadOnly bool `hcl:"read_only"` Hidden bool `hcl:"hidden"` }