Commit Graph

10 Commits

Author SHA1 Message Date
Phil Estes
0c9b05fa60
Fix image usage calculation error
Including snapshotter usage in total calculation should be gated by the
option `snapshotter` boolean.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2020-05-20 08:44:05 -04:00
Wei Fu
1d888ad6a6 cleanup the image synchronously for Usage case
TestImageIsUnpacked will unpacked docker.io/library/busybox:latest with
linux/amd64 platform. If the TestImageUsage doesn't wait for cleanup
finish (snapshotter is cleanup by gc asynchronously) and fetch image,
the Usage(ctx) will get 10767844 bytes(manifestUsage + snapshotUsage).

However, the manifestUsage is 9466142 bytes. That is why we got the
error:

```
Expected actual usage to equal manifest reported usage of 9466142:
got 10767844
```

This commit is to make sure that the image has been cleanup fully.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-02-22 00:02:33 +08:00
Li Yuxuan
19f7f3ccc4 test: Do SynchronousDelete cleanup before testing ImageIsUnpacked
Simply delete the image will not clean up the snapshots.

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2019-11-17 11:01:35 +08:00
Derek McGowan
a40c3830df
Add option to pull all metadata
Add flags to pull and fetch to grab all metadata.
Add fetch option to pull only metadata.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-08-26 11:05:21 -07:00
Derek McGowan
75771c4634
Add usage function to client
The usage function allows more configurable and accurate calculations
of the usage for an image.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-08-09 15:46:22 -07:00
Derek McGowan
63ceaf877d
Add testing log context
Enables showing debug logs in testing output.
For integration tests the client log output will show
in addition to daemon output, with timestamps for better
correlation.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-07-16 10:31:43 -07:00
Wei Fu
506b815483 remotes: add distribution labels to blob data
We can use cross repository push feature to reuse the existing blobs in
the same registry. Before make push fast, we know where the blob comes
from.

Use the `containerd.io/distribution.source. = [,]` as label format. For
example, the blob is downloaded by the docker.io/library/busybox:latest
and the label will be

    containerd.io/distribution.source.docker.io = library/busybox

If the blob is shared by different repos in the same registry, the repo
name will be appended, like:

    containerd.io/distribution.source.docker.io = library/busybox,x/y

NOTE:
1. no need to apply for legacy docker image schema1.
2. the concurrent fetch actions might miss some repo names in label, but
it is ok.
3. it is optional. no need to add label if the engine only uses images
not push.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-03-12 13:42:54 +08:00
Derek McGowan
438b3cb694
Update multi-arch image tests
Ensure the test pull for all platforms uses a multi-arch image
Use the pause container for testing specific platforms
Update the image unpack test to be explicit about the platform to unpack

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-08-01 11:22:07 -07:00
Kunal Kushwaha
b12c3215a0 Licence header added
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-02-19 10:32:26 +09:00
Jess Valarezo
1552ee23da client: Add helper function which checks if an image is unpacked
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-30 16:33:54 -07:00