Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic host volumes: cleanup comments #24830

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion nomad/structs/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ func (v *VolumeRequest) Validate(jobType string, taskGroupCount, canaries int) e

case VolumeTypeHost:
if v.MountOptions != nil {
// TODO(1.10.0): support mount options for dynamic host volumes
addErr("host volumes cannot have mount options")
}

Expand Down
9 changes: 5 additions & 4 deletions scheduler/feasible.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,11 @@ func (h *HostVolumeChecker) hasVolumes(n *structs.Node) bool {
if volCfg.ID != "" { // dynamic host volume
vol, err := h.ctx.State().HostVolumeByID(nil, h.namespace, volCfg.ID, false)
if err != nil || vol == nil {
// node fingerprint has a dynamic volume that's no longer in the
// state store; this is only possible if the batched fingerprint
// update from a delete RPC is written before the delete RPC's
// raft entry completes
// the dynamic host volume in the node fingerprint does not
// belong to the namespace we need. or the volume is no longer
// in the state store because the batched fingerprint update
// from a delete RPC is written before the delete RPC's raft
// entry completes
return false
}
if !h.hostVolumeIsAvailable(vol,
Expand Down
Loading