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

create network --label and run --restart unless-stopped are not compatible with Docker. #7989

Closed
HarriL opened this issue Oct 10, 2020 · 10 comments
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

@HarriL
Copy link

HarriL commented Oct 10, 2020

Description
/kind bug
You can not just install podman-docker and expect podman to be compatible.

I installed podman-docker and got four compatibility issues from a Docker compatible installation kit.
1. Build Bridge
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: unknown flag: --label
2. Start container1
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: the unless-stopped restart policy is not supported: invalid argument
3. Start container2
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: the unless-stopped restart policy is not supported: invalid argument
4. Start container3
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: the unless-stopped restart policy is not supported: invalid argument

Steps to reproduce the issue:

  1. Install CentOS 8.2.2004
  2. Install podman-docker
  3. Run `docker network create --label "abc" --label "xyz" target-name
  4. Run docker run ... --restart unless-stopped ...

Describe the results you received:
3. Error: unknown flag: --label
4. Error: the unless-stopped restart policy is not supported: invalid argument
Describe the results you expected:
3. Accept metadata "abc" and "zyz" in the network container as Docker defines and as other type of containers does.
4. The error message is wrong, this is not a restart. Actually this is not restart ! And Podman already works as this argument asks it to do! This argument means that after the "podman stop" command do not start this container in a reboot. And that is how podman works already. Remove the error and just do nothing. This way the behavior of podman is correct and the argument is handled "correctly".

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

Case 1: docker network create --label abc --label xyz target-name

Raises error:

Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: unknown flag: --label

Expected to handle metadata argument(s):

--label argument1 --label argument2

Docker definition: Link to Docker CLI reference

The second one seems to be a misunderstanding of what does Docker's argument unless-stopped really means/does.

Case 2: docker run ... --restart unless-stopped ...

Raises error:

Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: the unless-stopped restart policy is not supported: invalid argument

NOTE: the community has misunderstood what this argument does and means! it is related to docker stop and nothing to with Docker Engine! It means that if you have stopped a container it does not restart the container automatically after reboot!
Expected to not raise an error, but instead, just ignore this argument in Podman without raising an error!
Root cause: Podman does not start containers automatically after reboot as Docker does and that is the same that Docker unless-stopped does in Docker!
Reasoning: It is annoying to get correct "unless-stopped" behavior natively by Podman and at the same time it does raise an error on the argument that askes literally to do that!

Environment

podman version 1.6.4
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
Linux ... 4.18.0-193.19.1.el8_2.x86_64
Docker version 19.03.12, build 48a66213fe
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
Linux ... 3.10.0-1127.19.1.el7.x86_64

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 Oct 10, 2020
@zhangguanzhang
Copy link
Collaborator

I think you should try with the latest version, maybe you need update your repo, and install the latest podman by your package command

@mheon
Copy link
Member

mheon commented Oct 10, 2020 via email

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Nov 11, 2020

@mheon What is stopping us from adding --label to the network now?

@mheon
Copy link
Member

mheon commented Nov 11, 2020

No place to store them. We only store networks as CNI conflist files, and there is no provision for storing a label in those files (and no provision for comments, so we can't hack them in easily either)

@rhatdan
Copy link
Member

rhatdan commented Nov 23, 2020

@mheon should we add this data to database then?

@mheon
Copy link
Member

mheon commented Nov 23, 2020

That's what we have to do - the "network rewrite" I keep talking about it basically moving network logic inside Libpod so we can use the DB to store information on a network and lessen our dependence on CNI for what we do and do not support.

Doing it right is probably a sprint worth of work, minimum, for a team member, though. I'd be happy to take it on early next year once volume plugins are done if the priorities work out right.

@rhatdan
Copy link
Member

rhatdan commented Dec 24, 2020

@HarriL @afbjorklund @mheon Have we gotten any closer on this one?

@mheon
Copy link
Member

mheon commented Dec 24, 2020 via email

@rhatdan rhatdan closed this as completed Dec 26, 2020
@afbjorklund
Copy link
Contributor

afbjorklund commented Dec 27, 2020

For now we have removed --label and mtu for podman (only used for docker) in the minikube "kic" driver, once 8494bcb and b1b3570 lands in a release (3.0?) and that release is started to be used we can revisit... Also needs the ls fix for the --filter.

@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

No branches or pull requests

6 participants