Cri-o: image: Image config is empty for gcr.io/google_containers/pause-amd64

Created on 20 Mar 2017  Â·  7Comments  Â·  Source: cri-o/cri-o

When running kubeadm 1.7 on top of CRI-O, as a test for kubeadm tries to start a dummy pod where the pod is made of one single container. The latter is suppose to run the gcr.io/google_containers/pause-amd64:3.0 image which happens to be a pause one:

ocic image status -id ff37f71df8d20abd11690fa791d3e29742a319caa3dc0e0d9d3fc1b976df73df
ID: ff37f71df8d20abd11690fa791d3e29742a319caa3dc0e0d9d3fc1b976df73df
Tag: gcr.io/google_containers/pause-amd64:latest
Tag: gcr.io/google_containers/pause-amd64:3.0
Tag: gcr.io/google_containers/pause-amd64
Size: 751477

Unfortunately, pkg/storage/runtime:createContainerOrPodSandbox() gets an empty blob for that image. When adding some debug to createContainerOrPodSandbox, we see that len(configBlob) is 0 for that specific image.

docker inspect on a gcr.io/google_containers/pause-amd64 gives:

[
    {
        "Id": "sha256:99e59f495ffaa222bfeb67580213e8c28c1e885f1d245ab2bbe3b1b1ec3bd0b2",
        "RepoTags": [
            "gcr.io/google_containers/pause-amd64:3.0"
        ],
        "RepoDigests": [
            "gcr.io/google_containers/pause-amd64@sha256:163ac025575b775d1c0f9bf0bdd0f086883171eb475b5068e7defa4ca9e76516"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2016-05-04T06:26:41.522308365Z",
        "Container": "a9873535145fe72b464d3055efbac36aab70d059914e221cbbd7fe3cac53ef6b",
        "ContainerConfig": {
            "Hostname": "95722352e41d",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": [
                "/bin/sh",
                "-c",
                "#(nop) ENTRYPOINT \u0026{[\"/pause\"]}"
            ],
            "Image": "f8e2eec424cf985b4e41d6423991433fb7a93c90f9acc73a5e7bee213b789c52",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/pause"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "DockerVersion": "1.9.1",
        "Author": "",
        "Config": {
            "Hostname": "95722352e41d",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": null,
            "Image": "f8e2eec424cf985b4e41d6423991433fb7a93c90f9acc73a5e7bee213b789c52",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/pause"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 746888,
        "VirtualSize": 746888,
        "GraphDriver": {
            "Name": "aufs",
            "Data": null
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:41ff149e94f22c52b8f36c59cafe7538b70ea771e62d9fc6922dedac25392fdf",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
            ]
        }
    }
]

Most helpful comment

So, here is the thing, for docker manifests schema 2 version 1 we do not have a "blob" for the configuration. The configuration is embedded in the manifest directly under history[0].v1Compatibility. I'll work with @mtrmac to see if we can do something to expose that.

All 7 comments

cc @nalind @mrunalp

@sameo am I doing something dumb or the image isn't available?

12:51:49 [~] docker pull gcr.io/google_containers/pause-amd64
Using default tag: latest
Trying to pull repository gcr.io/google_containers/pause-amd64 ...
manifest for gcr.io/google_containers/pause-amd64:latest not found
12:51:57 [~] docker pull gcr.io/google_containers/pause-amd64:latest                       1 ↵
Trying to pull repository gcr.io/google_containers/pause-amd64 ...
manifest for gcr.io/google_containers/pause-amd64:latest not found

@runcom the dummy template actually requests 3.0 version of the pause container.

# docker pull gcr.io/google_containers/pause-amd64:3.0
3.0: Pulling from google_containers/pause-amd64
a3ed95caeb02: Pull complete 
f11233434377: Pull complete 
Digest: sha256:163ac025575b775d1c0f9bf0bdd0f086883171eb475b5068e7defa4ca9e76516
Status: Downloaded newer image for gcr.io/google_containers/pause-amd64:3.0

@nalind @runcom I also get an empty image config with ocid from the quay.io/coreos/flannel:v0.7.0-amd64.
FWIW, I'm using flannel as the networking add-on for k8s.

I think it's a bug in containers/image - I'm looking into it and can reproduce also

So, here is the thing, for docker manifests schema 2 version 1 we do not have a "blob" for the configuration. The configuration is embedded in the manifest directly under history[0].v1Compatibility. I'll work with @mtrmac to see if we can do something to expose that.

as an update, I've finally found the time to tackle part of this in c/image at https://github.com/containers/image/pull/259 - afterwards we need to fix https://github.com/kubernetes-incubator/cri-o/blob/master/pkg/storage/runtime.go#L213-L225, I'll take care of that once c/image is fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

outcoldman picture outcoldman  Â·  9Comments

haircommander picture haircommander  Â·  6Comments

mrunalp picture mrunalp  Â·  4Comments

ssoor picture ssoor  Â·  7Comments

shaoyuta picture shaoyuta  Â·  8Comments