Bug 1253266 - "docker inspect" appears to repeat strings if template resolution fails
"docker inspect" appears to repeat strings if template resolution fails
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: docker (Show other bugs)
22
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: smahajan@redhat.com
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-13 07:22 EDT by Robert P. J. Day
Modified: 2016-07-19 16:12 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-19 16:12:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Robert P. J. Day 2015-08-13 07:22:08 EDT
When you're using literal strings in a "docker inspect" format string, it seems that if a template resolution fails, leading literal strings can be duplicated. First, an example when it works, both without and with a leading literal string:

sh-4.3# docker inspect -f '{{.Architecture}}' httpd
amd64
sh-4.3# docker inspect -f 'My arch is {{.Architecture}}' httpd
My arch is amd64
sh-4.3#

But look what happens if i misspell as "Archtecture" in both cases:

sh-4.3# docker inspect -f '{{.Archtecture}}' httpd
<no value>
sh-4.3# docker inspect -f 'My arch is {{.Archtecture}}' httpd
My arch is My arch is <no value>
           ^^^^^^^^^^ ???

This is entirely reproducible; just misspell the contents of the template:

sh-4.3# docker inspect -f 'My ports are {{.Config.Ports}}' httpd
My ports are My ports are <no value>
Comment 1 smahajan@redhat.com 2015-08-13 13:03:37 EDT
Issue opened upstream.
https://github.com/docker/docker/issues/15566

Shishir
Comment 2 smahajan@redhat.com 2015-08-13 13:06:33 EDT
PR Opened upstream.
https://github.com/docker/docker/pull/15567

Shishir
Comment 3 smahajan@redhat.com 2015-10-23 10:22:24 EDT
Fixed Upstream. This will be available in the next release.
Closing this one.
Comment 4 Daniel Walsh 2015-10-23 10:27:49 EDT
Shishir, we need a docker version for this fix.  Did it make it into docker-1.9 or docker-1.10?
Comment 5 smahajan@redhat.com 2015-10-23 10:43:43 EDT
docker 1.9
Comment 6 Lokesh Mandvekar 2016-02-16 14:59:26 EST
Putting this ON_QA as docker 1.9 is already in stable and 1.10.1 is in testing.
Comment 7 Fedora End Of Life 2016-07-19 16:12:36 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.