Skip to content

Commit

Permalink
backport of commit df16c96 (#18640)
Browse files Browse the repository at this point in the history
Co-authored-by: James Rasell <[email protected]>
  • Loading branch information
hc-github-team-nomad-core and jrasell authored Oct 3, 2023
1 parent 6da7c6e commit 773f4e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/18604.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
cli: Use same offset when following single or multiple alloc logs
```
4 changes: 2 additions & 2 deletions command/alloc_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func (l *AllocLogsCommand) tailMultipleFiles(client *api.Client, alloc *api.Allo
defer close(cancel)

stdoutFrames, stdoutErrCh := client.AllocFS().Logs(
alloc, true, l.task, api.FSLogNameStdout, api.OriginEnd, 1, cancel, nil)
alloc, true, l.task, api.FSLogNameStdout, api.OriginEnd, 0, cancel, nil)

// Setting up the logs stream can fail, therefore we need to check the
// error channel before continuing further.
Expand All @@ -369,7 +369,7 @@ func (l *AllocLogsCommand) tailMultipleFiles(client *api.Client, alloc *api.Allo
}

stderrFrames, stderrErrCh := client.AllocFS().Logs(
alloc, true, l.task, api.FSLogNameStderr, api.OriginEnd, 1, cancel, nil)
alloc, true, l.task, api.FSLogNameStderr, api.OriginEnd, 0, cancel, nil)

// Setting up the logs stream can fail, therefore we need to check the
// error channel before continuing further.
Expand Down

0 comments on commit 773f4e9

Please sign in to comment.