Skip to content

Conversation

@thaJeztah
Copy link
Contributor

@thaJeztah thaJeztah commented Dec 4, 2025

taken from #3757 - see individual commits for details

@thaJeztah
Copy link
Contributor Author

This will probably conflict with #3760 - happy to rebase if that patch goes in first

@thaJeztah thaJeztah marked this pull request as ready for review December 4, 2025 22:08
@thaJeztah
Copy link
Contributor Author

/cc @haircommander - easiest reviewed per-commit; this aligns the code more between the two packages to make it easier to keep them in sync where possible.

This will probably conflict with #3760 - happy to rebase if that patch goes in first

@thaJeztah
Copy link
Contributor Author

Some failures; not sure if related or flaky; let me see if I can find;

=== RUN   TestDockerContainerSpec
I1205 01:12:09.964183     550 framework.go:334] About to run - [sudo docker run -d --cpu-shares 2048 --cpuset-cpus 0 --memory 1073741824 --env TEST_VAR=FOO --label bar=baz registry.k8s.io/pause]
    docker_test.go:224: 
        	Error Trace:	/go/src/github.com/google/cadvisor/integration/tests/api/docker_test.go:224
        	Error:      	Not equal: 
        	            	expected: 0x7fe
        	            	actual  : 0x11b9
        	Test:       	TestDockerContainerSpec
        	Messages:   	Container should have 2046 shares, has 4537
I1205 01:12:10.097017     550 framework.go:334] About to run - [sudo docker rm -f 6f7e44ef8f11d5e9348a5bd8214b575e99eadea58f490612dad051898961ea9c]
--- FAIL: TestDockerContainerSpec (0.23s)
=== RUN   TestDockerFilesystemStats
I1205 01:12:31.471403     550 framework.go:334] About to run - [sudo docker info]
I1205 01:12:31.514302     550 framework.go:334] About to run - [sudo docker run -d registry.k8s.io/busybox:1.27 /bin/sh -c dd if=/dev/zero of=/file count=2 bs=8 & ping google.com]
I1205 01:12:31.648322     550 framework.go:334] About to run - [sudo docker rm -f 4369838bd562031951581e89fe7824123708dc100ada6e6270853c83976ffc5a]
    docker_test.go:376: 
        	Error Trace:	/go/src/github.com/google/cadvisor/integration/tests/api/docker_test.go:376
        	Error:      	Expected value not to be nil.
        	Test:       	TestDockerFilesystemStats
        	Messages:   	got info: {Spec:{CreationTime:2025-12-05 01:12:31.535480363 +0000 UTC Aliases:[peaceful_nobel 4369838bd562031951581e89fe7824123708dc100ada6e6270853c83976ffc5a] Namespace:docker Labels:map[] Envs:map[] HasCpu:true Cpu:{Limit:2597 MaxLimit:0 Mask:0-3 Quota:0 Period:0} HasMemory:true Memory:{Limit:18446744073709551615 Reservation:0 SwapLimit:18446744073709551615} HasHugetlb:false HasCustomMetrics:false CustomMetrics:[] HasProcesses:true Processes:{Limit:0} HasNetwork:true HasFilesystem:true HasDiskIo:true Image:registry.k8s.io/busybox:1.27} Stats:[0xc000250690]}

@thaJeztah
Copy link
Contributor Author

Ah, I see other PRs fail as well, and from the docker info output; I see it's now running docker v29.1 with containerd image store enabled;

 Server Version: 29.1.2
 Storage Driver: overlayfs
  driver-type: io.containerd.snapshotter.v1

So it's possible that some parts of the tests doesn't handle that correctly; at least I notice the list of storage-drivers, which doesn't include overlayfs (the containerd equivalent of overlay2);

needsBaseUsageCheck := false
switch storageDriver {
case framework.Aufs, framework.Overlay, framework.Overlay2, framework.DeviceMapper:
needsBaseUsageCheck = true
}
pass := false

use more generic names to start aligning the implementations for
easier maintenance.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
It's more idiomatic, and aligns with the docker implementation for
the same.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Align the code between the implementations for easier comparison;
mostly renaming some vars, changing order, and syncing comments.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the align_docker_podman branch from 1951240 to afc6074 Compare December 5, 2025 16:34
@thaJeztah
Copy link
Contributor Author

@dims rebased 😄

@dims dims merged commit b21c1a1 into google:master Dec 5, 2025
7 checks passed
@thaJeztah thaJeztah deleted the align_docker_podman branch December 5, 2025 17:44
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.

2 participants