AliyunContainerService / pouch

An Efficient Enterprise-class Container Engine
https://pouchcontainer.io
Apache License 2.0
4.64k stars 949 forks source link

[bug] logical problem with the metric 'imageActionCounter' calculation #2923

Closed KevinBetterQ closed 2 years ago

KevinBetterQ commented 5 years ago

Ⅰ. Issue Description

when removing a nonexistent image , should not be recorded on the metric 'imageActionCounter'.

Ⅱ. Describe what happened

when removing a nonexistent image , the metric 'imageActionCounter' with label 'delete' will add one, but the metric 'ImageSuccessActionsCounter' will not add. This makes it noisy to monitor the success rate of deleting image , which means that the success rate is reduced by deleting the non-existing image, but this is not a real problem.

Ⅲ. Describe what you expected to happen

when removing a nonexistent image, the metric 'imageActionCounter' will not add. The metric is recorded only when it actually performs a delete operation.

Ⅳ. How to reproduce it (as minimally and precisely as possible)

1. 2. 3.

Ⅴ. Anything else we need to know?

Ⅵ. Environment: