Bug 1253266 - "docker inspect" appears to repeat strings if template resolution fails
Summary: "docker inspect" appears to repeat strings if template resolution fails
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: docker
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: smahajan@redhat.com
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-13 11:22 UTC by Robert P. J. Day
Modified: 2016-07-19 20:12 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 20:12:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Robert P. J. Day 2015-08-13 11:22:08 UTC
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 17:03:37 UTC
Issue opened upstream.
https://github.com/docker/docker/issues/15566

Shishir

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

Shishir

Comment 3 smahajan@redhat.com 2015-10-23 14:22:24 UTC
Fixed Upstream. This will be available in the next release.
Closing this one.

Comment 4 Daniel Walsh 2015-10-23 14:27:49 UTC
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 14:43:43 UTC
docker 1.9

Comment 6 Lokesh Mandvekar 2016-02-16 19:59:26 UTC
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 20:12:36 UTC
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.