{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/20858","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/20858/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/20858/comments","events_url":"https://api.github.com/repos/docker/docker/issues/20858/events","html_url":"https://github.com/docker/docker/pull/20858","id":137864408,"number":20858,"title":"validate log-opt when creating containers AGAIN (fixing drunkard's code)","user":{"login":"mountkin","id":1496652,"avatar_url":"https://avatars.githubusercontent.com/u/1496652?v=3","gravatar_id":"","url":"https://api.github.com/users/mountkin","html_url":"https://github.com/mountkin","followers_url":"https://api.github.com/users/mountkin/followers","following_url":"https://api.github.com/users/mountkin/following{/other_user}","gists_url":"https://api.github.com/users/mountkin/gists{/gist_id}","starred_url":"https://api.github.com/users/mountkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mountkin/subscriptions","organizations_url":"https://api.github.com/users/mountkin/orgs","repos_url":"https://api.github.com/users/mountkin/repos","events_url":"https://api.github.com/users/mountkin/events{/privacy}","received_events_url":"https://api.github.com/users/mountkin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/status/2-code-review","name":"status/2-code-review","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-02T12:39:58Z","updated_at":"2016-03-02T16:55:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/20858","html_url":"https://github.com/docker/docker/pull/20858","diff_url":"https://github.com/docker/docker/pull/20858.diff","patch_url":"https://github.com/docker/docker/pull/20858.patch"},"body":"This is a followup of https://github.com/docker/docker/pull/20749\r\nThe previous fix is complete wrong and it doesn't work at all.\r\n`container.HostConfig` is assigned by `daemon.setHostConfig`, which is called after `container.GetLogConfig` is called. But `container.GetLogConfig` depends on the `HostConfig` of the container. So in the previous PR https://github.com/docker/docker/pull/20749/files#diff-72dc1842ed7b5a92b4e98f84456a2c0cR85 always returns the  default log config of the daemon.\r\n\r\nMoreover, the test case added in https://github.com/docker/docker/pull/20749/files#diff-4b1e56bb77ac16f2ccf956fc24cf0a82R446 didn't provide an image to the `docker run` command, which made it always fail and the subsequential test passed unexpectedly.\r\n\r\nOh my! I must be drunk when writing that code :innocent:  Deeply sorry for the carelessness :sweat: \r\n \r\nSigned-off-by: Shijiang Wei <mountkin@gmail.com>"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/191324190","html_url":"https://github.com/docker/docker/pull/20858#issuecomment-191324190","issue_url":"https://api.github.com/repos/docker/docker/issues/20858","id":191324190,"user":{"login":"runcom","id":849915,"avatar_url":"https://avatars.githubusercontent.com/u/849915?v=3","gravatar_id":"","url":"https://api.github.com/users/runcom","html_url":"https://github.com/runcom","followers_url":"https://api.github.com/users/runcom/followers","following_url":"https://api.github.com/users/runcom/following{/other_user}","gists_url":"https://api.github.com/users/runcom/gists{/gist_id}","starred_url":"https://api.github.com/users/runcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runcom/subscriptions","organizations_url":"https://api.github.com/users/runcom/orgs","repos_url":"https://api.github.com/users/runcom/repos","events_url":"https://api.github.com/users/runcom/events{/privacy}","received_events_url":"https://api.github.com/users/runcom/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T16:55:58Z","updated_at":"2016-03-02T16:55:58Z","body":"LGTM"}}