diff --git a/.changelog/17346.txt b/.changelog/17346.txt new file mode 100644 index 000000000..660d7a32a --- /dev/null +++ b/.changelog/17346.txt @@ -0,0 +1,3 @@ +```release-note:bug +cli: Fix a panic in the `nomad job restart` command when monitoring replacement allocations +``` diff --git a/command/job_restart.go b/command/job_restart.go index 33f8b183f..ae5b61772 100644 --- a/command/job_restart.go +++ b/command/job_restart.go @@ -1045,7 +1045,7 @@ func (c *JobRestartCommand) monitorReplacementAlloc( alloc, qm, err := c.client.Allocations().Info(currentAllocID, q) if err != nil { - errCh <- fmt.Errorf("Failed to retrieve allocation %q: %w", limit(alloc.ID, c.length), err) + errCh <- fmt.Errorf("Failed to retrieve allocation %q: %w", limit(currentAllocID, c.length), err) return }