Bug 1915383

Summary: Podman "--format" does not support "join"
Product: Red Hat Enterprise Linux 8 Reporter: Milan Lysonek <mlysonek>
Component: podmanAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: Joy Pu <ypu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.4CC: bbaude, dwalsh, jhonce, jligon, jnovy, lsm5, mheon, pthomas, tsweeney, umohnani, ypu
Target Milestone: rcKeywords: Regression, Triaged
Target Release: 8.0Flags: tsweeney: needinfo-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: podman-3.0.0-0.41rc2.el8 or newer Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1922077 1957299 (view as bug list) Environment:
Last Closed: 2021-05-18 15:34:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1922077, 1957299    

Description Milan Lysonek 2021-01-12 14:51:43 UTC
Description of problem:
Podman no longer supports "join" in output formatting "--format".

Version-Release number of selected component (if applicable):
Version: 2.2.1
Release: 2.module+el8.3.1+9107+df0d2892

How reproducible:
100%

Steps to Reproduce:
1. podman pull registry.access.redhat.com/ubi8/ubi-minimal
2. podman inspect registry.access.redhat.com/ubi8/ubi-minimal --format '{{join .Config.Env "\n"}}'

Actual results:
ERRO[0000] Error printing inspect output: template: all inspect:1: function "join" not defined

Expected results:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
container=oci

Additional info:
https://github.com/containers/podman/issues/8773

Comment 1 Matus Marhefka 2021-01-12 14:58:06 UTC
Will you be able to fix this in 8.4? Our oscap-podman depends on the join Go template so if you are not able to fix it on your side we will need to workaround. Please let us know.

Comment 2 Daniel Walsh 2021-01-12 15:38:27 UTC
Jon this looks like something you need to handle.

Comment 5 Jhon Honce 2021-01-29 21:12:18 UTC
c/common updated with https://github.com/containers/common/pull/426
podman will need to vendor in this update.

Comment 7 Jhon Honce 2021-02-02 16:28:34 UTC
https://github.com/containers/common/pull/426 provided changes to code
https://github.com/containers/podman/pull/9196 should have included fix in podman

Comment 8 Jindrich Novy 2021-02-05 15:29:06 UTC
Jhon, do you plan to fix it for 8.4.0 (podman-3.0)?

Comment 10 Jhon Honce 2021-02-10 16:11:31 UTC
https://github.com/containers/podman/pull/9285 fixes this issue for podman 3.0.0

Comment 16 Joy Pu 2021-02-22 07:18:01 UTC
Test with podman-3.0.1-1.module+el8.4.0+10073+30e5ea69.x86_64 and it works as expected. So set this to verified.
# podman pull registry.access.redhat.com/ubi8/ubi-minimal
Trying to pull registry.access.redhat.com/ubi8/ubi-minimal:latest...
Getting image source signatures
Checking if image destination supports signatures
Copying blob 76b9354adec6 skipped: already exists  
Copying blob a591faa84ab0 [--------------------------------------] 0.0b / 0.0b
Copying config dc080723f5 done  
Writing manifest to image destination
Storing signatures
dc080723f596f2407300cca2c19a17accad89edcf39f7b8b33e6472dd41e30f1
# podman inspect registry.access.redhat.com/ubi8/ubi-minimal --format '{{join .Config.Env "\n"}}'
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
container=oci

Comment 18 errata-xmlrpc 2021-05-18 15:34:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: container-tools:rhel8 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1796