Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Both RootfsImageName and RootfsImageId must be set if either is set #8558

Closed
rzlourenco opened this issue Dec 2, 2020 · 10 comments · Fixed by #8623
Closed

Both RootfsImageName and RootfsImageId must be set if either is set #8558

rzlourenco opened this issue Dec 2, 2020 · 10 comments · Fixed by #8623
Assignees
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@rzlourenco
Copy link
Contributor

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Since I upgraded to 2.2.0, I can no longer run containers from successful intermediate build steps.

Steps to reproduce the issue:

$ podman build .
[...]
STEP 12: USER ...
--> Using cache 5f166a88503a2a3ef76bb6dba7510795c5e7c664f0f17e181e78ae280ba5e5ee
--> 5f166a88503
STEP 13: RUN ...
[fails]
$ podman run -it --rm 5f166a88503 /bin/sh
Error: both RootfsImageName and RootfsImageID must be set if either is set: invalid argument

With --log-level=debug:

$ podman --log-level=debug run -it --rm 5f166a88503 /bin/sh
time="2020-12-02T16:07:38Z" level=info msg="podman filtering at log level debug"
time="2020-12-02T16:07:38Z" level=debug msg="Called run.PersistentPreRunE(podman --log-level=debug run -it --rm 5f166a88503 /bin/sh)"
time="2020-12-02T16:07:38Z" level=debug msg="Reading configuration file \"/usr/share/containers/containers.conf\""
time="2020-12-02T16:07:38Z" level=debug msg="Merged system config \"/usr/share/containers/containers.conf\": &{Containers:{Devices:[] Volumes:[] ApparmorProfile:containers-default-0.29.0 Annotations:[] CgroupNS:private Cgroups:enabled DefaultCapabilities:[CAP_AUDIT_WRITE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_KILL CAP_MKNOD CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETFCAP CAP_SETGID CAP_SETPCAP CAP_SETUID CAP_SYS_CHROOT] DefaultSysctls:[] DefaultUlimits:[] DefaultMountsFile: DNSServers:[] DNSOptions:[] DNSSearches:[] EnableKeyring:true EnableLabeling:false Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=xterm] EnvHost:false HTTPProxy:false Init:false InitPath: IPCNS:private LogDriver:k8s-file LogSizeMax:-1 NetNS:slirp4netns NoHosts:false PidsLimit:2048 PidNS:private SeccompProfile:/usr/share/containers/seccomp.json ShmSize:65536k TZ: Umask:0022 UTSNS:private UserNS:host UserNSSize:65536} Engine:{ImageBuildFormat:oci CgroupCheck:false CgroupManager:systemd ConmonEnvVars:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin] ConmonPath:[/usr/libexec/podman/conmon /usr/local/libexec/podman/conmon /usr/local/lib/podman/conmon /usr/bin/conmon /usr/sbin/conmon /usr/local/bin/conmon /usr/local/sbin/conmon /run/current-system/sw/bin/conmon] DetachKeys:ctrl-p,ctrl-q EnablePortReservation:true Env:[] EventsLogFilePath:/run/user/1000/libpod/tmp/events/events.log EventsLogger:journald HooksDir:[/usr/share/containers/oci/hooks.d] ImageDefaultTransport:docker:// InfraCommand: InfraImage:k8s.gcr.io/pause:3.2 InitPath:/usr/libexec/podman/catatonit LockType:shm MultiImageArchive:false Namespace: NetworkCmdPath: NoPivotRoot:false NumLocks:2048 OCIRuntime:crun OCIRuntimes:map[crun:[/usr/bin/crun /usr/sbin/crun /usr/local/bin/crun /usr/local/sbin/crun /sbin/crun /bin/crun /run/current-system/sw/bin/crun] kata:[/usr/bin/kata-runtime /usr/sbin/kata-runtime /usr/local/bin/kata-runtime /usr/local/sbin/kata-runtime /sbin/kata-runtime /bin/kata-runtime /usr/bin/kata-qemu /usr/bin/kata-fc] runc:[/usr/bin/runc /usr/sbin/runc /usr/local/bin/runc /usr/local/sbin/runc /sbin/runc /bin/runc /usr/lib/cri-o-runc/sbin/runc /run/current-system/sw/bin/runc]] PullPolicy:missing Remote:false RemoteURI: RemoteIdentity: ActiveService: ServiceDestinations:map[] RuntimePath:[] RuntimeSupportsJSON:[crun runc] RuntimeSupportsNoCgroups:[crun] RuntimeSupportsKVM:[kata kata-runtime kata-qemu kata-fc] SetOptions:{StorageConfigRunRootSet:false StorageConfigGraphRootSet:false StorageConfigGraphDriverNameSet:false StaticDirSet:false VolumePathSet:false TmpDirSet:false} SignaturePolicyPath:/etc/containers/policy.json SDNotify:false StateType:3 StaticDir:/home/rzl/.local/share/containers/storage/libpod StopTimeout:10 TmpDir:/run/user/1000/libpod/tmp VolumePath:/home/rzl/.local/share/containers/storage/volumes} Network:{CNIPluginDirs:[/usr/libexec/cni /usr/lib/cni /usr/local/lib/cni /opt/cni/bin] DefaultNetwork:podman NetworkConfigDir:/home/rzl/.config/cni/net.d}}"
time="2020-12-02T16:07:38Z" level=debug msg="Reading configuration file \"/etc/containers/containers.conf\""
time="2020-12-02T16:07:38Z" level=debug msg="Merged system config \"/etc/containers/containers.conf\": &{Containers:{Devices:[] Volumes:[] ApparmorProfile:containers-default-0.29.0 Annotations:[] CgroupNS:private Cgroups:enabled DefaultCapabilities:[CAP_AUDIT_WRITE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_KILL CAP_MKNOD CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETFCAP CAP_SETGID CAP_SETPCAP CAP_SETUID CAP_SYS_CHROOT] DefaultSysctls:[] DefaultUlimits:[] DefaultMountsFile: DNSServers:[] DNSOptions:[] DNSSearches:[] EnableKeyring:true EnableLabeling:false Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=xterm] EnvHost:false HTTPProxy:false Init:false InitPath: IPCNS:private LogDriver:k8s-file LogSizeMax:-1 NetNS:slirp4netns NoHosts:false PidsLimit:2048 PidNS:private SeccompProfile:/usr/share/containers/seccomp.json ShmSize:65536k TZ: Umask:0022 UTSNS:private UserNS:host UserNSSize:65536} Engine:{ImageBuildFormat:oci CgroupCheck:false CgroupManager:systemd ConmonEnvVars:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin] ConmonPath:[/usr/libexec/podman/conmon /usr/local/libexec/podman/conmon /usr/local/lib/podman/conmon /usr/bin/conmon /usr/sbin/conmon /usr/local/bin/conmon /usr/local/sbin/conmon /run/current-system/sw/bin/conmon] DetachKeys:ctrl-p,ctrl-q EnablePortReservation:true Env:[] EventsLogFilePath:/run/user/1000/libpod/tmp/events/events.log EventsLogger:journald HooksDir:[/usr/share/containers/oci/hooks.d] ImageDefaultTransport:docker:// InfraCommand: InfraImage:k8s.gcr.io/pause:3.2 InitPath:/usr/libexec/podman/catatonit LockType:shm MultiImageArchive:false Namespace: NetworkCmdPath: NoPivotRoot:false NumLocks:2048 OCIRuntime:crun OCIRuntimes:map[crun:[/usr/bin/crun /usr/sbin/crun /usr/local/bin/crun /usr/local/sbin/crun /sbin/crun /bin/crun /run/current-system/sw/bin/crun] kata:[/usr/bin/kata-runtime /usr/sbin/kata-runtime /usr/local/bin/kata-runtime /usr/local/sbin/kata-runtime /sbin/kata-runtime /bin/kata-runtime /usr/bin/kata-qemu /usr/bin/kata-fc] runc:[/usr/bin/runc /usr/sbin/runc /usr/local/bin/runc /usr/local/sbin/runc /sbin/runc /bin/runc /usr/lib/cri-o-runc/sbin/runc /run/current-system/sw/bin/runc]] PullPolicy:missing Remote:false RemoteURI: RemoteIdentity: ActiveService: ServiceDestinations:map[] RuntimePath:[] RuntimeSupportsJSON:[crun runc] RuntimeSupportsNoCgroups:[crun] RuntimeSupportsKVM:[kata kata-runtime kata-qemu kata-fc] SetOptions:{StorageConfigRunRootSet:false StorageConfigGraphRootSet:false StorageConfigGraphDriverNameSet:false StaticDirSet:false VolumePathSet:false TmpDirSet:false} SignaturePolicyPath:/etc/containers/policy.json SDNotify:false StateType:3 StaticDir:/home/rzl/.local/share/containers/storage/libpod StopTimeout:10 TmpDir:/run/user/1000/libpod/tmp VolumePath:/home/rzl/.local/share/containers/storage/volumes} Network:{CNIPluginDirs:[/usr/libexec/cni /usr/lib/cni /usr/local/lib/cni /opt/cni/bin] DefaultNetwork:podman NetworkConfigDir:/home/rzl/.config/cni/net.d}}"
time="2020-12-02T16:07:38Z" level=debug msg="Using conmon: \"/usr/bin/conmon\""
time="2020-12-02T16:07:38Z" level=debug msg="Initializing boltdb state at /home/rzl/.local/share/containers/storage/libpod/bolt_state.db"
time="2020-12-02T16:07:38Z" level=debug msg="Using graph driver overlay"
time="2020-12-02T16:07:38Z" level=debug msg="Using graph root /home/rzl/.local/share/containers/storage"
time="2020-12-02T16:07:38Z" level=debug msg="Using run root /run/user/1000/containers"
time="2020-12-02T16:07:38Z" level=debug msg="Using static dir /home/rzl/.local/share/containers/storage/libpod"
time="2020-12-02T16:07:38Z" level=debug msg="Using tmp dir /run/user/1000/libpod/tmp"
time="2020-12-02T16:07:38Z" level=debug msg="Using volume path /home/rzl/.local/share/containers/storage/volumes"
time="2020-12-02T16:07:38Z" level=debug msg="Set libpod namespace to \"\""
time="2020-12-02T16:07:38Z" level=debug msg="[graphdriver] trying provided driver \"overlay\""
time="2020-12-02T16:07:38Z" level=debug msg="overlay: mount_program=/usr/bin/fuse-overlayfs"
time="2020-12-02T16:07:38Z" level=debug msg="backingFs=btrfs, projectQuotaSupported=false, useNativeDiff=false, usingMetacopy=false"
time="2020-12-02T16:07:38Z" level=debug msg="Initializing event backend journald"
time="2020-12-02T16:07:38Z" level=debug msg="using runtime \"/usr/bin/runc\""
time="2020-12-02T16:07:38Z" level=debug msg="using runtime \"/usr/bin/crun\""
time="2020-12-02T16:07:38Z" level=warning msg="Error initializing configured OCI runtime kata: no valid executable found for OCI runtime kata: invalid argument"
time="2020-12-02T16:07:38Z" level=info msg="Setting parallel job count to 37"
time="2020-12-02T16:07:38Z" level=debug msg="parsed reference into \"[overlay@/home/rzl/.local/share/containers/storage+/run/user/1000/containers:overlay.mount_program=/usr/bin/fuse-overlayfs]@5f166a88503a2a3ef76bb6dba7510795c5e7c664f0f17e181e78ae280ba5e5ee\""
time="2020-12-02T16:07:38Z" level=debug msg="exporting opaque data as blob \"sha256:5f166a88503a2a3ef76bb6dba7510795c5e7c664f0f17e181e78ae280ba5e5ee\""
time="2020-12-02T16:07:38Z" level=debug msg="parsed reference into \"[overlay@/home/rzl/.local/share/containers/storage+/run/user/1000/containers:overlay.mount_program=/usr/bin/fuse-overlayfs]@5f166a88503a2a3ef76bb6dba7510795c5e7c664f0f17e181e78ae280ba5e5ee\""
time="2020-12-02T16:07:38Z" level=debug msg="exporting opaque data as blob \"sha256:5f166a88503a2a3ef76bb6dba7510795c5e7c664f0f17e181e78ae280ba5e5ee\""
time="2020-12-02T16:07:38Z" level=debug msg="using systemd mode: false"
time="2020-12-02T16:07:38Z" level=debug msg="No hostname set; container's hostname will default to runtime default"
time="2020-12-02T16:07:38Z" level=debug msg="Loading seccomp profile from \"/etc/containers/seccomp.json\""
Error: both RootfsImageName and RootfsImageID must be set if either is set: invalid argument

Describe the results you expected:

I expected a shell to be launched in a new container.

Output of podman version:

Version:      3.0.0-dev
API Version:  3.0.0
Go Version:   go1.15.5
Git Commit:   7210b86d9ee5aa38a07829e58038049d224cad61-dirty
Built:        Wed Dec  2 15:52:20 2020
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.19.0-dev
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: Unknown
    path: /usr/bin/conmon
    version: 'conmon version 2.0.21, commit: 35a2fa83022e56e18af7e6a865ba5d7165fa2a4a'
  cpus: 12
  distribution:
    distribution: arch
    version: unknown
  eventLogger: journald
  hostname: niflheim
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 10000
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 10000
  kernel: 5.9.11-arch2-1
  linkmode: dynamic
  memFree: 1750179840
  memTotal: 33567653888
  ociRuntime:
    name: crun
    package: Unknown
    path: /usr/bin/crun
    version: |-
      crun version 0.16
      commit: eb0145e5ad4d8207e84a327248af76663d4e50dd
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  rootless: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: Unknown
    version: |-
      slirp4netns version 1.1.7
      commit: e62caa08b78f3e662422bd7bfbcd2df3d12dcab1
      libslirp: 4.3.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.1
  swapFree: 0
  swapTotal: 0
  uptime: 4h 54m 40.29s (Approximately 0.17 days)
registries: {}
store:
  configFile: /home/rzl/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: Unknown
      Version: |-
        fusermount3 version: 3.10.0
        fuse-overlayfs: version 1.3
        FUSE library version 3.10.0
        using FUSE kernel interface version 7.31
  graphRoot: /home/rzl/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 12
  runRoot: /run/user/1000/containers
  volumePath: /home/rzl/.local/share/containers/storage/volumes
version:
  APIVersion: 3.0.0
  Built: 1606924340
  BuiltTime: Wed Dec  2 15:52:20 2020
  GitCommit: 7210b86d9ee5aa38a07829e58038049d224cad61-dirty
  GoVersion: go1.15.5
  OsArch: linux/amd64
  Version: 3.0.0-dev

Package info (e.g. output of rpm -q podman or apt list podman):

(I edited the PKGBUILD to build from git but it seems that master does not have the v2.2.0 tag, hence the weird version.)

podman 2.2.0+rc2+94+g7210b86d9-1

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 2, 2020
@mheon
Copy link
Member

mheon commented Dec 2, 2020

Can you try podman create instead of podman run? And if podman create works can you include a full podman inspect of the created container?

@rzlourenco
Copy link
Contributor Author

Since it was related to names, I tried tagging the build with podman build --tag batata .. It did not work. However, once I commented the failing command and the rest of the Dockerfile, it ran. Thus:

method --tag untagged
intermediate step (failed build) FAIL FAIL
intermediate step (successful build) FAIL FAIL
final step SUCCESS FAIL

It seems that only the tagged and COMMITted image is fit to run.

Can you try podman create instead of podman run? And if podman create works can you include a full podman inspect of the created container?

$ podman create -it --rm 75f56f28315 /bin/sh
Error: both RootfsImageName and RootfsImageID must be set if either is set: invalid argument
$ podman image inspect 75f56f28315
[
    {
        "Id": "75f56f28315043fa5dbcc8ad3b5ba70701816f067bfb1d0c325c3ca16120dbab",
        "Digest": "sha256:af25d9c6949ee5657e6fe491031805b9f6e1cda47cfc237b657db9e1647d067e",
        "RepoTags": null,
        "RepoDigests": null,
        "Parent": "",
        "Comment": "",
        "Created": "2020-12-02T16:34:20.722353327Z",
        "Config": {
            "User": "ldap:ldap",
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "SNIP",
                "SNIP",
                "SNIP",
                "SNIP",
                "SNIP"
            ],
            "Cmd": [
                "/bin/sh"
            ],
            "Labels": {
                "io.buildah.version": "1.19.0-dev"
            }
        },
        "Version": "",
        "Author": "",
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 69918653,
        "VirtualSize": 69918653,
        "GraphDriver": {
            "Name": "overlay",
            "Data": {
                "LowerDir": "/home/rzl/.local/share/containers/storage/overlay/403fe00d8c79009182a40c4cfb638913de44492d13d833d80b4626ce9683538a/diff:/home/rzl/.local/share/containers/storage/overlay/bb89f71f928e48fc533a2b23fcf92e676d78beb1a1f88ea320e292117103fc72/diff:/home/rzl/.local/share/containers/storage/overlay/0295df59eb4363652bf73b8006e716b4d0891efcc071aef9dff721bb23e0ea84/diff:/home/rzl/.local/share/containers/storage/overlay/0b9382d4db7ae101d1e4f82df0403a75581c3045c130fbffe71d0f264d0de41d/diff:/home/rzl/.local/share/containers/storage/overlay/ace0eda3e3be35a979cec764a3321b4c7d0b9e4bb3094d20d3ff6782961a8d54/diff",
                "UpperDir": "/home/rzl/.local/share/containers/storage/overlay/62604b973b72fa263bb6fcfa67392d961d547eac30261e3b268b54b5fc6a8ff1/diff",
                "WorkDir": "/home/rzl/.local/share/containers/storage/overlay/62604b973b72fa263bb6fcfa67392d961d547eac30261e3b268b54b5fc6a8ff1/work"
            }
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:ace0eda3e3be35a979cec764a3321b4c7d0b9e4bb3094d20d3ff6782961a8d54",
                "sha256:aa37a41205979c91fbe7431a716b812980501920dbe4e01f09fafc03f83de354",
                "sha256:544b4834d73253f607a6a812bcd5055dd371ec4ee750e5fe29d895385076af8a",
                "sha256:3c1c8ed12123ab8c137c8ab28992c5f127d0308561a8b481c662e7eed4f3d683",
                "sha256:597fa637670cfc279eb4ababe992044f5e3f22793b5797085bac19c6ac54bd28",
                "sha256:7c279a24631ef49fa3a03820bca2e8e0c121b4a0e89f2007f3c4285cb5c2c0de"
            ]
        },
        "Labels": {
            "io.buildah.version": "1.19.0-dev"
        },
        "Annotations": {},
        "ManifestType": "application/vnd.oci.image.manifest.v1+json",
        "User": "ldap:ldap",
        "History": [
            {
                "created": "2020-10-22T02:19:24.33416307Z",
                "created_by": "/bin/sh -c #(nop) ADD file:f17f65714f703db9012f00e5ec98d0b2541ff6147c2633f7ab9ba659d0c507f4 in / "
            },
            {
                "created": "2020-10-22T02:19:24.499382102Z",
                "created_by": "/bin/sh -c #(nop)  CMD [\"/bin/sh\"]",
                "empty_layer": true
            },
            {
                "created": "2020-12-02T16:34:02.098909762Z",
                "created_by": "/bin/sh -c #(nop) ENV SNIP",
                "empty_layer": true
            },
            {
                "created": "2020-12-02T16:34:02.214969153Z",
                "created_by": "/bin/sh -c #(nop) ENV SNIP",
                "empty_layer": true
            },
            {
                "created": "2020-12-02T16:34:02.33974481Z",
                "created_by": "/bin/sh -c #(nop) ENV SNIP",
                "empty_layer": true
            },
            {
                "created": "2020-12-02T16:34:02.460545165Z",
                "created_by": "/bin/sh -c #(nop) ENV SNIP",
                "empty_layer": true
            },
            {
                "created": "2020-12-02T16:34:02.579084626Z",
                "created_by": "/bin/sh -c #(nop) ENV SNIP",
                "empty_layer": true
            },
            {
                "created": "2020-12-02T16:34:11.510577429Z",
                "created_by": "/bin/sh -c :     \u0026\u0026 apk --no-cache upgrade --latest --all     \u0026\u0026 apk --no-cache add         openldap           openldap-clients           openldap-back-mdb           openldap-back-mdb           openldap-overlay-unique         krb5-server           krb5           krb5-server-ldap         cyrus-sasl-gssapiv2         supervisor"
            },
            {
                "created": "2020-12-02T16:34:15.145067462Z",
                "created_by": "/bin/sh -c #(nop) COPY file:b23c7dd17fe22ea9b54a376aba8eefd4e74b2fe180e37fca07931ae7e4aaed79 in /etc/openldap/ldap.conf "
            },
            {
                "created": "2020-12-02T16:34:16.845056161Z",
                "created_by": "/bin/sh -c #(nop) COPY file:675d5ee4e656651c8d26c00372e85c14dd1e9d4eb418f562f6b51eb7905a6a73 in /etc/openldap/slapd.ldif "
            },
            {
                "created": "2020-12-02T16:34:18.638819269Z",
                "created_by": "/bin/sh -c #(nop) COPY multi:1c9efab3ca6ebbf74b90d0e1ba39680dcb80f1992dc3389e60aed4d7a8b1e168 in /etc/openldap/schema/ "
            },
            {
                "created": "2020-12-02T16:34:20.506215027Z",
                "created_by": "/bin/sh -c :     \u0026\u0026 SNIP     \u0026\u0026 mkdir --mode=0770 /run/openldap /etc/openldap/slapd.d     \u0026\u0026 chown ldap:ldap /run/openldap /etc/openldap/slapd.d"
            },
            {
                "created": "2020-12-02T16:34:20.722612807Z",
                "created_by": "/bin/sh -c #(nop) USER ldap:ldap",
                "empty_layer": true
            }
        ],
        "NamesHistory": [
            "localhost/batata:latest",
            "docker.io/library/27d3fdae58ed6d0f54f5b12ae26cd74955dd1235a9616cc80da61cffdde91f3e-tmp:latest"
        ]
    }
]

@JennToo
Copy link

JennToo commented Dec 2, 2020

I see the same issue on Ubuntu, version 2.2.0~2.

cn-bm-jwilcox2 ~/junk/tmp5 $ cat Dockerfile
FROM alpine:3.12
RUN apk update && apk add netcat-openbsd


cn-bm-jwilcox2 ~/junk/tmp5 $ podman build .
STEP 1: FROM alpine:3.12
Completed short name "alpine" with unqualified-search registries (origin: /etc/containers/registries.conf)
Getting image source signatures
Copying blob 188c0c94c7c5 done
Copying config d6e46aa247 done
Writing manifest to image destination
Storing signatures
STEP 2: RUN apk update && apk add netcat-openbsd
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
v3.12.1-69-gbdfcc49399 [http://dl-cdn.alpinelinux.org/alpine/v3.12/main]
v3.12.1-69-gbdfcc49399 [http://dl-cdn.alpinelinux.org/alpine/v3.12/community]
OK: 12746 distinct packages available
(1/2) Installing libbsd (0.10.0-r0)
(2/2) Installing netcat-openbsd (1.130-r1)
Executing busybox-1.31.1-r19.trigger
OK: 6 MiB in 16 packages
STEP 3: COMMIT
--> da2411ac2f8
da2411ac2f8091670d430ac325ef32ba13d8327f8fab0b349a148e9ea44040fd


cn-bm-jwilcox2 ~/junk/tmp5 $ podman run -it --rm da2411ac2f8091670d430ac325ef32ba13d8327f8fab0b349a148e9ea44040fd
Error: both RootfsImageName and RootfsImageID must be set if either is set: invalid argument

@mheon
Copy link
Member

mheon commented Dec 2, 2020

I think we need to get this fixed for 2.2.1

@rhatdan
Copy link
Member

rhatdan commented Dec 4, 2020

I agree, do you know what is causing it?

@mheon
Copy link
Member

mheon commented Dec 4, 2020

@rhatdan No idea, haven't found time to look into this.

@Luap99
Copy link
Member

Luap99 commented Dec 4, 2020

git bisect says it's 410fa53

To be exactly its caused by these lines:

// If the input name changed, we could properly resolve the
// image. Otherwise, it must have been an ID where we're
// defaulting to the first name or an empty one if no names are
// present.
imgName := newImage.InputName
if s.Image == newImage.InputName && strings.HasPrefix(newImage.ID(), s.Image) {
imgName = ""
names := newImage.Names()
if len(names) > 0 {
imgName = names[0]
}
}

@vrothberg PTAL

@vrothberg
Copy link
Member

Looking into it now.

@vrothberg vrothberg self-assigned this Dec 7, 2020
@vrothberg vrothberg added the In Progress This issue is actively being worked by the assignee, please do not work on this at this time. label Dec 7, 2020
vrothberg added a commit to vrothberg/libpod that referenced this issue Dec 7, 2020
When creating a container, do not clear the input-image name before
looking up image names.  Also add a regression test.

Fixes: containers#8558
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
@vrothberg
Copy link
Member

Looking into it now.

-> #8623

@rzlourenco
Copy link
Contributor Author

#8623 fixes it for me, thank you!

vrothberg added a commit to vrothberg/libpod that referenced this issue Dec 7, 2020
As suggested by @edsantiago, add a comment to the regression test
of containers#8558 to better document the context.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
vrothberg added a commit to vrothberg/libpod that referenced this issue Dec 7, 2020
As suggested by @edsantiago, add a comment to the regression test
of containers#8558 to better document the context.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
openshift-merge-robot added a commit that referenced this issue Dec 7, 2020
[CI:DOCS] add comment to #8558 regression test
mheon pushed a commit to mheon/libpod that referenced this issue Dec 7, 2020
When creating a container, do not clear the input-image name before
looking up image names.  Also add a regression test.

Fixes: containers#8558
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
<MH: Fixed cherry-pick conflicts>
Signed-off-by: Matthew Heon <mheon@redhat.com>
pmoogi-redhat pushed a commit to pmoogi-redhat/podman that referenced this issue Dec 15, 2020
When creating a container, do not clear the input-image name before
looking up image names.  Also add a regression test.

Fixes: containers#8558
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
pmoogi-redhat pushed a commit to pmoogi-redhat/podman that referenced this issue Dec 15, 2020
As suggested by @edsantiago, add a comment to the regression test
of containers#8558 to better document the context.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants