Skip to content

Commit

Permalink
When fetch pid counts the contianer can be in an invalid state sometimes
Browse files Browse the repository at this point in the history
Signed-off-by: James Sturtevant <jstur@microsoft.com>
(cherry picked from commit 2095093)
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
  • Loading branch information
jsturtevant authored and kiashok committed Oct 13, 2023
1 parent 0ff2f71 commit a7d3976
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/containerd-shim-runhcs-v1/task_hcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,9 @@ func (ht *hcsTask) Pids(ctx context.Context) ([]runhcsopts.ProcessDetails, error
// Get the guest pids
props, err := ht.c.Properties(ctx, schema1.PropertyTypeProcessList)
if err != nil {
if isStatsNotFound(err) {
return nil, errors.Wrapf(errdefs.ErrNotFound, "failed to fetch pids: %s", err)
}
return nil, err
}

Expand Down

0 comments on commit a7d3976

Please sign in to comment.