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

[Issue #4703] Add the pod name when we use podman ps -p #4748

Merged
merged 1 commit into from
Dec 29, 2019

Conversation

NevilleC
Copy link
Collaborator

@NevilleC NevilleC commented Dec 25, 2019

The pod name does not appear when doing podman ps -p.
It is missing as the documentation says:
-p, --pod Print the ID and name of the pod the containers are associated with

When we create a container, the pod name will be added in the ps output.

On master:

[x libpod]$ sudo bin/podman pod ps
POD ID         NAME                 STATUS    CREATED          # OF CONTAINERS   INFRA ID
01ede9c31b4d   inspiring_driscoll   Created   20 seconds ago   1                 04e03f9f9d55
[x libpod]$ sudo bin/podman ps -ap
CONTAINER ID  IMAGE                                 COMMAND  CREATED         STATUS   PORTS  NAMES                      POD
04e03f9f9d55  k8s.gcr.io/pause:3.1                           20 seconds ago  Created         01ede9c31b4d-infra         01ede9c31b4d

We cannot see the pod name in the second command.

On the feature branch:

[x libpod]$ sudo bin/podman pod ps
POD ID         NAME                 STATUS    CREATED         # OF CONTAINERS   INFRA ID
01ede9c31b4d   inspiring_driscoll   Created   5 seconds ago   1                 04e03f9f9d55
[x libpod]$ sudo bin/podman ps -ap
CONTAINER ID  IMAGE                                 COMMAND  CREATED         STATUS   PORTS  NAMES                      POD           POD NAME
04e03f9f9d55  k8s.gcr.io/pause:3.1                           16 seconds ago  Created         01ede9c31b4d-infra         01ede9c31b4d  inspiring_driscoll

The pod name does appear.

Closes #4703

Signed-off-by: NevilleC [email protected]

@openshift-ci-robot openshift-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S labels Dec 25, 2019
@openshift-ci-robot
Copy link
Collaborator

Hi @NevilleC. Thanks for your PR.

I'm waiting for a containers member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

libpod/container.go Outdated Show resolved Hide resolved
@mheon
Copy link
Member

mheon commented Dec 25, 2019

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 25, 2019
@NevilleC NevilleC requested a review from mheon December 25, 2019 02:03
@mheon
Copy link
Member

mheon commented Dec 25, 2019 via email

@NevilleC NevilleC force-pushed the nc-podname branch 10 times, most recently from 672729c to 2a589ad Compare December 25, 2019 23:20
@NevilleC NevilleC requested a review from mheon December 26, 2019 00:05
@mheon
Copy link
Member

mheon commented Dec 26, 2019

[+1164s] [Fail] Podman ps [It] podman --pod with a non-empty pod name

Ahhh, it's Varlink. You didn't pipe it through the Varlink adapter code - BatchContainerOp() in pkg/adapter/containers_remote.go would also need to be patched.

@baude Given the state of Varlink right now, I'd almost rather we not do that and SkipIfRemote() the test. Thoughts?

@mheon
Copy link
Member

mheon commented Dec 26, 2019

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mheon, NevilleC

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 26, 2019
@rhatdan
Copy link
Member

rhatdan commented Dec 27, 2019

Looks like podman remote tests are failing?

The pod name does not appear when doing `podman ps -p`.
It is missing as the documentation says:
-p, --pod              Print the ID and name of the pod the containers are associated with

The pod name is added in the ps output and checked in unit tests.

Closes containers#4703

Signed-off-by: NevilleC <[email protected]>
@NevilleC
Copy link
Collaborator Author

@rhatdan Yes, I was waiting for an answer to see if I should pipe it through the Varlink adapter code or use the SkipIfRemote(), as suggested by @mheon #4748 (comment).

I used the SkipIfRemote() as it seems it would be the way to go for the moment after reading mheon's comment.

The CI should pass now.

@rhatdan
Copy link
Member

rhatdan commented Dec 28, 2019

LGTM
@mheon PTAL

@mheon
Copy link
Member

mheon commented Dec 28, 2019 via email

@rhatdan
Copy link
Member

rhatdan commented Dec 29, 2019

/lgtm
Thanks @NevilleC

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 29, 2019
@openshift-merge-robot openshift-merge-robot merged commit 9e03aa1 into containers:master Dec 29, 2019
@NevilleC NevilleC deleted the nc-podname branch December 29, 2019 11:35
@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 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. ok-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman ps -p doesn't show pod name
5 participants