RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1092773 - Image and container JSON keys have no consistency
Summary: Image and container JSON keys have no consistency
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1138364
TreeView+ depends on / blocked
 
Reported: 2014-04-30 01:04 UTC by J.C. Molet
Modified: 2019-03-06 01:46 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 03:18:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0623 0 normal SHIPPED_LIVE Low: docker security, bug fix, and enhancement update 2015-03-05 15:28:35 UTC

Description J.C. Molet 2014-04-30 01:04:53 UTC
Description of problem:
The json config files for docker containers and images have no consistency whatsoever.  These are the files that are parsed/pretty-printed when you run docker inspect.  This causes automation and reporting around docker to have additional, needless, complexity.

Version-Release number of selected component (if applicable):
# docker version
Client version: 0.10.0
Client API version: 1.10
Go version (client): go1.2.1
Git commit (client): dc9c28f/0.10.0
Server version: 0.10.0
Server API version: 1.10
Git commit (server): dc9c28f/0.10.0
Go version (server): go1.2.1
Last stable version: 0.10.0


How reproducible:
always

Steps to Reproduce:
1. Run docker and pull down an image.  (ex: docker pull mattdm/fedora)
2. Use docker to create a simple container based off that image (ex. docker run mattdm/fedora /bin/bash -c "echo 'hello world'")
3. Run "docker inspect" against these images and containers.

Actual results:
Sometimes the JSON keys are CamelCase, sometimes_underscores, sometimes lowercase.  You have an image's "id" vs a container's "ID", in an image you'll have "Config" vs a container's "container_config".  In a image's JSON the outer keys will all be lowercase except for, randomly, Size - and they'll use underscores.  The inner keys for the same JSON are all in CamelCase.

# docker inspect 871613fadf3d
[{
    "id": "871613fadf3d8f5f4ab7737b5ae80d1ae7568c3d1117b8b378a7341a3f855cc2",
    "comment": "Imported from -",
    "created": "2013-12-17T12:42:21.01048812Z",
    "container_config": {
        "Hostname": "",
        "Domainname": "",
...
        "User": "",
        "NetworkDisabled": false,
        "OnBuild": null
    },
    "docker_version": "0.7.1",
    "architecture": "x86_64",
    "Size": 363959682

and on a container:
# docker inspect silly_einstein
[{
    "ID": "dc761aab614700a78082ccd6345957710c19ac480013104f71f1bd1bd4b977a9",
    "Created": "2014-04-01T17:30:09.992917458Z",
    "Path": "/bin/bash",
    "Args": [
        "-c",
        "rm -f stop; trap \"/usr/bin/date \u003e stop\" SIGUSR1; while ! [ -f stop ]; do :; done"
    ],
    "Config": {
        "Hostname": "dc761aab6147",
...
and so on
     

Expected results:
There should be a consistent key naming schema that brings the pretty printing of the docker inspect command some uniformity.

Additional info:

Comment 2 Daniel Walsh 2014-06-17 19:21:17 UTC
I wonder if it is too late to fix these?  Since docker 1.0 has shipped. is this part of the protocol now.

Comment 3 Daniel Walsh 2014-06-17 19:24:23 UTC
Actually looking at docker 1.0 I think this might be fixed.

Comment 5 Chris Evich 2014-07-18 14:44:27 UTC
Confirmed fixed in docker-1.0.0-10.el7.x86_64 All keys are in CamelCase.

Comment 7 errata-xmlrpc 2015-03-05 03:18:48 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, 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://rhn.redhat.com/errata/RHSA-2015-0623.html


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