Skip to content

Fix image usage calculation error#4275

Merged
dmcgowan merged 1 commit intocontainerd:masterfrom
estesp:fix-image-usage
May 20, 2020
Merged

Fix image usage calculation error#4275
dmcgowan merged 1 commit intocontainerd:masterfrom
estesp:fix-image-usage

Conversation

@estesp
Copy link
Copy Markdown
Member

@estesp estesp commented May 20, 2020

Including snapshotter usage in total calculation should be gated by the
option snapshotter boolean.

Sometimes a flaky test is trying to tell you something 😄 The intermittent failures of TestImageUsage were actually always reporting the same "offset"; turns out that offset was the exact size of the unpacked root fs of the busybox amd64 build. What was happening is since busybox is used throughout other tests, a snapshot was created that was sometimes not garbage collected by the time TestImageUsage ran, and therefore since the label was associated with the amd64 manifest, it would be added to the size calculation and cause this test to fail.

// cc: @fuweid since I know you had tried to fix this at one point; I also added a deferred deletion of the image reference pinned to the sha256 in the test as when you run it locally multiple times you still get wrong results unless both images are removed. A possibly more "stable" result would be to use a totally different image name that isn't used by any other tests.

Signed-off-by: Phil Estes estesp@linux.vnet.ibm.com

Including snapshotter usage in total calculation should be gated by the
option `snapshotter` boolean.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented May 20, 2020

Build succeeded.

@fuweid fuweid requested a review from dmcgowan May 20, 2020 15:22
Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @estesp !

Copy link
Copy Markdown
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

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

LGTM

@dmcgowan dmcgowan merged commit 7ef3c0f into containerd:master May 20, 2020
@estesp estesp deleted the fix-image-usage branch May 20, 2020 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants