Skip to content
This repository has been archived by the owner on Feb 8, 2021. It is now read-only.

Should treat name@digest and name:tag format image reference as same #613

Closed
Crazykev opened this issue Apr 17, 2017 · 4 comments
Closed

Comments

@Crazykev
Copy link
Contributor

$ sudo hyperctl pull busybox
Using default tag: latest
latest: Pulling from library/busybox
Digest: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
Status: Image is up to date for busybox:latest
$ sudo hyperctl run -d busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f sh
sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f: Pulling from library/busybox
Digest: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
Status: Downloaded newer image for busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
POD id is elegant_easley
Time to run a POD is 12637 ms

Sometimes kubernetes will relay on this feature, pull image busybox:latest and then create container with image busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f.

/cc @feiskyer

@gnawux
Copy link
Member

gnawux commented Apr 20, 2017

This is an issue derived from docker 1.10.3

➜ docker --version
Docker version 1.10.3, build 20f81dd
➜ docker pull busybox
Using default tag: latest
latest: Pulling from library/busybox
7520415ce762: Pull complete
Digest: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
Status: Downloaded newer image for busybox:latest
➜ docker run -itd busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
Unable to find image 'busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f' locally
sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f: Pulling from library/busybox
Digest: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
Status: Downloaded newer image for busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
35a4538cf675a93980801db880cba0697ce6a4cc56da172b4c4a65ba6116eb47
➜

@Crazykev
Copy link
Contributor Author

Crazykev commented May 2, 2017

@gnawux Could we upgrade docker vendor to newer version, ie 1.12 ?

@gnawux
Copy link
Member

gnawux commented May 2, 2017

@Crazykev not an easy job, I am working on a simpler work around

gnawux added a commit to gnawux/hyper that referenced this issue May 3, 2017
This is a work around for hyperhq#613

## Background

We have docker daemon 1.10.3 as vendor, which provides the
image DB management functions. However, there is an issue of
it, which caused hyperhq#613.

## Possible fixes

To fix this, we have three methods

- The work around in this patch
- Update to latest docker vendor
- Introduce an indirect layer for docker vendor

As the docker is changing to moby, we think we will made
further update once the moby transition done. And we will
apply this simple work around firstly for the 0.8.1 release.

## Known issue

Will introduce two additional (useless actually) manifest fetching,
which will slow down a pull progress, esp. when you are far from
the registry.

## Test result:

```
➜  sudo ./hyperctl pull busybox
Using default tag: latest
latest: Pulling from library/busybox
7520415ce762: Pull complete
Digest: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
Status: Downloaded newer image for busybox:latest
sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f: Pulling from library/busybox
Digest: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
Status: Downloaded newer image for busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
➜  sudo ./hyperctl images
REPOSITORY          TAG                 IMAGE ID            CREATED               VIRTUAL SIZE
busybox             latest              00f017a8c2a6        2017-03-09 13:28:04   1.11 MB
➜  sudo ./hyperctl run -t busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
/ # ls
bin   dev   etc   home  lib   proc  root  sys   tmp   usr   var
/ # exit
➜
```

Signed-off-by: Wang Xu <gnawux@gmail.com>
gnawux added a commit to gnawux/hyper that referenced this issue May 3, 2017
This is a work around for hyperhq#613

## Background

We have docker daemon 1.10.3 as vendor, which provides the
image DB management functions. However, there is an issue of
it, which caused hyperhq#613.

## Possible fixes

To fix this, we have three methods

- The work around in this patch
- Update to latest docker vendor
- Introduce an indirect layer for docker vendor

As the docker is changing to moby, we think we will made
further update once the moby transition done. And we will
apply this simple work around firstly for the 0.8.1 release.

## Known issue

Will introduce two additional (useless actually) manifest fetching,
which will slow down a pull progress, esp. when you are far from
the registry.

## Test result:

```
➜  sudo ./hyperctl pull busybox
Using default tag: latest
latest: Pulling from library/busybox
7520415ce762: Pull complete
Digest: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
Status: Downloaded newer image for busybox:latest
sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f: Pulling from library/busybox
Digest: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
Status: Downloaded newer image for busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
➜  sudo ./hyperctl images
REPOSITORY          TAG                 IMAGE ID            CREATED               VIRTUAL SIZE
busybox             latest              00f017a8c2a6        2017-03-09 13:28:04   1.11 MB
➜  sudo ./hyperctl run -t busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
/ # ls
bin   dev   etc   home  lib   proc  root  sys   tmp   usr   var
/ # exit
➜
```

Signed-off-by: Wang Xu <gnawux@gmail.com>
@feiskyer
Copy link
Contributor

feiskyer commented May 3, 2017

Fixed by #624

@feiskyer feiskyer closed this as completed May 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants