Skip to content

[release/1.7] Cumulative stats can't decrease#10670

Merged
samuelkarp merged 2 commits intocontainerd:release/1.7from
jsturtevant:nano-calc-backport-1.7
Sep 3, 2024
Merged

[release/1.7] Cumulative stats can't decrease#10670
samuelkarp merged 2 commits intocontainerd:release/1.7from
jsturtevant:nano-calc-backport-1.7

Conversation

@jsturtevant
Copy link
Copy Markdown
Contributor

cherry-pick of f6677a4

During removal of the container a stat value might be reported as zero; in this case the caluclation could end up with an extremely large number.  If the cumulative stat decreases report zero.

Signed-off-by: James Sturtevant <[email protected]>
(cherry picked from commit f6677a4)
Signed-off-by: James Sturtevant <[email protected]>
Signed-off-by: James Sturtevant <[email protected]>
@jsturtevant
Copy link
Copy Markdown
Contributor Author

xref #10652

@dosubot dosubot Bot added the area/cri Container Runtime Interface (CRI) label Sep 3, 2024
@samuelkarp samuelkarp changed the title [Release/1.7] Cumulative stats can't decrease [release/1.7] Cumulative stats can't decrease Sep 3, 2024
@jsturtevant
Copy link
Copy Markdown
Contributor Author

/test pull-containerd-node-e2e-1-7

@jsturtevant
Copy link
Copy Markdown
Contributor Author

@cpuguy83

@samuelkarp samuelkarp merged commit eb52ab6 into containerd:release/1.7 Sep 3, 2024
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/cri/sbserver/container_stats_list_test.go

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/cri/sbserver/container_stats_list_test.go

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/cri/server/container_stats_list.go

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/cri/server/container_stats_list_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cri Container Runtime Interface (CRI) impact/changelog size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants