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

Parsing of IMAGE in runlabel command changed behavior in 4d4baba #10192

Closed
KKoukiou opened this issue May 3, 2021 · 5 comments · Fixed by #10193
Closed

Parsing of IMAGE in runlabel command changed behavior in 4d4baba #10192

KKoukiou opened this issue May 3, 2021 · 5 comments · Fixed by #10193
Labels
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

@KKoukiou
Copy link
Contributor

KKoukiou commented May 3, 2021

/kind bug

Description

runlabel behavior changed in podman version 3.1.1.

Steps to reproduce the issue:

podman container runlabel INSTALL cockpit/ws
Error: repository name must be lowercase
Error: `/proc/self/exe run --rm --privileged -v /:/host IMAGE /container/atomic-install IMAGE` failed: exit status 125

Dockerfile:

FROM registry.fedoraproject.org/fedora:33
LABEL maintainer="[email protected]"
LABEL VERSION=243

ARG VERSION=243

ADD . /container

RUN echo -e '[group_cockpit-cockpit-preview]\nname=Copr repo for cockpit-preview owned by @cockpit\nbaseurl=https://copr-be.cloud.fedoraproject.org/results/@cockpit/cockpit-preview/fedora-$releasever-$basearch/\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://copr-be.cloud.fedoraproject.org/results/@cockpit/cockpit-preview/pubkey.gpg\nrepo_gpgcheck=0\nenabled=1\nenabled_metadata=1' > /etc/yum.repos.d/cockpit.repo

# Again see above ... we do our branching in shell script
RUN /container/install-package.sh && /container/prep-container.sh

LABEL INSTALL="/usr/bin/docker run --rm --privileged -v /:/host IMAGE /container/atomic-install IMAGE"
LABEL UNINSTALL="/usr/bin/docker run --rm --privileged -v /:/host IMAGE /container/atomic-uninstall"
LABEL RUN="/usr/bin/docker run -d --name NAME --privileged --pid=host -v /:/host IMAGE /container/atomic-run --local-ssh"

# Look ma, no EXPOSE

CMD ["/container/atomic-run"]

Commit which changed behavior:

commit 4d4babac7615ac832edaa8d405b507e5264a2122 (refs/bisect/bad)
Author: Daniel J Walsh <[email protected]>
Date:   Mon Apr 5 18:12:50 2021 -0400

    Fix handling of $NAME and $IMAGE in runlabel
    
    Fixes: https://github.com/containers/podman/issues/9405
    
    Add system runlabel tests.
    
    Signed-off-by: Daniel J Walsh <[email protected]>

Describe the results you received:
Error: repository name must be lowercase

Describe the results you expected:
No error :)

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

 3.1.1
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 3, 2021
@KKoukiou
Copy link
Contributor Author

KKoukiou commented May 3, 2021

So the question is, is that an expected change? Should we use IMAGE like $IMAGE ?

KKoukiou added a commit to KKoukiou/cockpit-container that referenced this issue May 3, 2021
KKoukiou added a commit to KKoukiou/cockpit-container that referenced this issue May 3, 2021
@martinpitt
Copy link
Contributor

It's been IMAGE for years in docker and atomic, so this smells like a plain regression?

@rhatdan
Copy link
Member

rhatdan commented May 3, 2021

Yes we should use IMAGE like $IMAGE, since we did this way back in Atomic.

@vrothberg
Copy link
Member

@rhatdan before fixing, let's wait until #10147 is merged.

@rhatdan
Copy link
Member

rhatdan commented May 3, 2021

Should not be effected by this.

KKoukiou added a commit to KKoukiou/cockpit that referenced this issue May 3, 2021
…man page example

The label commands where adjusted to contain IMAGE and NAME as env variables.
With newer podman, these are apparently just passed into the environment of the
docker run call itself, instead of being string-substituted on the command line.

See containers/podman#10192
martinpitt pushed a commit to cockpit-project/cockpit that referenced this issue May 4, 2021
…man page example

The label commands where adjusted to contain IMAGE and NAME as env variables.
With newer podman, these are apparently just passed into the environment of the
docker run call itself, instead of being string-substituted on the command line.

See containers/podman#10192
rhatdan added a commit to rhatdan/podman that referenced this issue May 5, 2021
@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
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.

5 participants