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

podman: Add pasta to podman info #18640

Merged

Conversation

HirazawaUi
Copy link
Contributor

[NO NEW TESTS NEEDED]

Fixes: #18561

Does this PR introduce a user-facing change?

podman info will output information about the pasta if it exists in helper_binaries_dir or $PATH

@rhatdan
Copy link
Member

rhatdan commented May 21, 2023

LGTM
@Luap99 PTAL

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, some small comments and please also adjust the example output in https://github.com/containers/podman/blob/main/docs/source/markdown/podman-info.1.md to include the new output

@@ -64,6 +64,7 @@ type slirp4netnsNetworkOptions struct {
const (
ipv6ConfDefaultAcceptDadSysctl = "/proc/sys/net/ipv6/conf/default/accept_dad"
slirp4netnsBinaryName = "slirp4netns"
pastaBinaryName = "passt"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the definition to networking_pasta_linux.go

@@ -71,6 +71,21 @@ func (r *Runtime) setPlatformHostInfo(info *define.HostInfo) error {
info.Slirp4NetNS = program
}

info.Pasta = define.PastaInfo{}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line isn't necessary

@edsantiago
Copy link
Member

@HirazawaUi thank you for your PR, but why not spend a few seconds to add tests? Here's a simple one-liner that could prevent future regressions:

diff --git a/test/system/005-info.bats b/test/system/005-info.bats
index f8a14ef1c..2f974439d 100644
--- a/test/system/005-info.bats
+++ b/test/system/005-info.bats
@@ -43,6 +43,7 @@ host.conmon.package       | .*conmon.*
 host.cgroupManager        | \\\(systemd\\\|cgroupfs\\\)
 host.cgroupVersion        | v[12]
 host.ociRuntime.path      | $expr_path
+host.pasta                | .*executable.*package.*
 store.configFile          | $expr_path
 store.graphDriverName     | [a-z0-9]\\\+\\\$
 store.graphRoot           | $expr_path

@TomSweeneyRedHat
Copy link
Member

LGTM in general, once the other comments are addressed. Thanks @HirazawaUi !

@HirazawaUi
Copy link
Contributor Author

@HirazawaUi thank you for your PR, but why not spend a few seconds to add tests? Here's a simple one-liner that could prevent future regressions:

diff --git a/test/system/005-info.bats b/test/system/005-info.bats
index f8a14ef1c..2f974439d 100644
--- a/test/system/005-info.bats
+++ b/test/system/005-info.bats
@@ -43,6 +43,7 @@ host.conmon.package       | .*conmon.*
 host.cgroupManager        | \\\(systemd\\\|cgroupfs\\\)
 host.cgroupVersion        | v[12]
 host.ociRuntime.path      | $expr_path
+host.pasta                | .*executable.*package.*
 store.configFile          | $expr_path
 store.graphDriverName     | [a-z0-9]\\\+\\\$
 store.graphRoot           | $expr_path

Thanks for reminder

@HirazawaUi HirazawaUi force-pushed the add-pasta-to-podman-info branch from bd59c7b to f0399b4 Compare May 23, 2023 15:17
@HirazawaUi
Copy link
Contributor Author

Thanks, some small comments and please also adjust the example output in https://github.com/containers/podman/blob/main/docs/source/markdown/podman-info.1.md to include the new output

Thanks for reminder, I have adjusted the example output

@@ -87,6 +87,15 @@ host:
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
os: linux
pasta:
executable: /usr/bin/passt
package: passt-0^20221116.gace074c-1.fc35.aarch64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh. I'm really sorry, I really appreciate your updating the documentation.... but I think a casual reader might be confused by the mix of fc34/fc35 and amd64/aarch64 in this output. Could you massage it a little please? Change fc35 to fc34, and aarch64 to amd64 in all the new additions? (The output does not need to reflect True Reality™, it just needs to be internally consistent). Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh. I'm really sorry, I really appreciate your updating the documentation.... but I think a casual reader might be confused by the mix of fc34/fc35 and amd64/aarch64 in this output. Could you massage it a little please? Change fc35 to fc34, and aarch64 to amd64 in all the new additions? (The output does not need to reflect True Reality™, it just needs to be internally consistent). Thank you!

All right

[NO NEW TESTS NEEDED]

Fixes: containers#18561

Signed-off-by: binghongtao <[email protected]>
@HirazawaUi HirazawaUi force-pushed the add-pasta-to-podman-info branch from f0399b4 to 977b3cd Compare May 24, 2023 16:40
@edsantiago
Copy link
Member

LGTM! @containers/podman-maintainers PTAL.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 25, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 25, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HirazawaUi, Luap99

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 25, 2023
@openshift-merge-robot openshift-merge-robot merged commit 688e6db into containers:main May 25, 2023
@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 Aug 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 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. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman info should include info about Pasta
6 participants