Skip to content

Conversation

@runcom
Copy link
Member

@runcom runcom commented Oct 12, 2015

@icecrime
Copy link
Contributor

Thanks! LGTM assuming green.

@vdemeester
Copy link
Member

It's green ! 😉

LGTM 🐰

@runcom
Copy link
Member Author

runcom commented Oct 12, 2015

Let's wait @ibuildthecloud for the last LGTM then :)

@ibuildthecloud
Copy link
Contributor

I can't test until late tonight, but I glady will.

@thaJeztah
Copy link
Member

@runcom
Copy link
Member Author

runcom commented Oct 12, 2015

I don't think it's putting these fields back, iiu correctly from the issue, the new api version 1.21 which will ship with docker 1.9 currently hides those fields. Those fields have been deprecated in 1.20 but probably they were directly removed and showed only for api minor or equal to 1.19 instead of 1.20. Please someone confirm my view :)

@icecrime
Copy link
Contributor

Yeah I think we're good without docs updates too. I'll just keep this open in 4-merge and give @ibuildthecloud some time to test.

@ibuildthecloud
Copy link
Contributor

This didn't work for me, I'm investigating why.

@thaJeztah
Copy link
Member

From the issue;

Also, should have mentioned that I'm testing with 1.18 client.

Should this fix be in a ContainerInspectPre120?

@ibuildthecloud
Copy link
Contributor

@runcom The 's' is supposed to be lower case, so Cpuset. All params are

"Memory": 0,
"MemorySwap": 0,
"CpuShares": 0,
"Cpuset": ""

Also, these params were dropped in v1.20 (I just confirmed in Docker 1.8). So these fields should be returned for <=1.19, with this patch they are returned for 1.20 too.

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
@runcom runcom force-pushed the 16665-fix-inspect-Config-api120 branch from 21f6e35 to 8c63ce4 Compare October 13, 2015 07:09
@runcom
Copy link
Member Author

runcom commented Oct 13, 2015

@runcom
Copy link
Member Author

runcom commented Oct 13, 2015

1.19 and lower:

curl -s http://localhost:2375/v1.19/containers/7a/json | jq ".Config"
{
  -----------------------
  "Cpuset": "",
  "CpuShares": 0,
  "MemorySwap": 0,
  "Memory": 0,
  -----------------------
  "VolumeDriver": "",
  "StopSignal": "SIGTERM",
  "Labels": {},
  "OnBuild": null,
  "MacAddress": "",
  "NetworkDisabled": false,
  "Tty": false,
  "ExposedPorts": null,
  "AttachStderr": false,
  "AttachStdout": false,
  "AttachStdin": false,
  "User": "",
  "Domainname": "",
  "Hostname": "7a109e234350",
  "OpenStdin": false,
  "StdinOnce": false,
  "Env": null,
  "Cmd": [
    "top"
  ],
  "Image": "busybox",
  "Volumes": null,
  "WorkingDir": "",
  "Entrypoint": null
}

1.20:

curl -s http://localhost:2375/v1.20/containers/7a/json | jq ".Config"
{
  "VolumeDriver": "",
  "StopSignal": "SIGTERM",
  "Labels": {},
  "OnBuild": null,
  "MacAddress": "",
  "NetworkDisabled": false,
  "Tty": false,
  "ExposedPorts": null,
  "AttachStderr": false,
  "AttachStdout": false,
  "AttachStdin": false,
  "User": "",
  "Domainname": "",
  "Hostname": "7a109e234350",
  "OpenStdin": false,
  "StdinOnce": false,
  "Env": null,
  "Cmd": [
    "top"
  ],
  "Image": "busybox",
  "Volumes": null,
  "WorkingDir": "",
  "Entrypoint": null
}

@runcom runcom changed the title Return old Config fields for API v1.20 Return old Config fields for API < v1.20 Oct 13, 2015
@icecrime
Copy link
Contributor

Thanks @runcom, LGTM

@tiborvass
Copy link
Contributor

LGTM

tiborvass added a commit that referenced this pull request Oct 13, 2015
@tiborvass tiborvass merged commit 0bc748b into moby:master Oct 13, 2015
@runcom runcom deleted the 16665-fix-inspect-Config-api120 branch October 13, 2015 16:12
@runcom
Copy link
Member Author

runcom commented Oct 14, 2015

@ibuildthecloud see if it's now working for you pls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1.9: Config.Cpuset (and probably others) are missing in inspect

7 participants