{"action":"created","issue":{"url":"https://api.github.com/repos/alibaba/pouch/issues/2230","repository_url":"https://api.github.com/repos/alibaba/pouch","labels_url":"https://api.github.com/repos/alibaba/pouch/issues/2230/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/pouch/issues/2230/comments","events_url":"https://api.github.com/repos/alibaba/pouch/issues/2230/events","html_url":"https://github.com/alibaba/pouch/pull/2230","id":358996124,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NTk0Mjk4","number":2230,"title":"feature: support update hostname","user":{"login":"wangforthinker","id":4704263,"node_id":"MDQ6VXNlcjQ3MDQyNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/4704263?v=4","gravatar_id":"","url":"https://api.github.com/users/wangforthinker","html_url":"https://github.com/wangforthinker","followers_url":"https://api.github.com/users/wangforthinker/followers","following_url":"https://api.github.com/users/wangforthinker/following{/other_user}","gists_url":"https://api.github.com/users/wangforthinker/gists{/gist_id}","starred_url":"https://api.github.com/users/wangforthinker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangforthinker/subscriptions","organizations_url":"https://api.github.com/users/wangforthinker/orgs","repos_url":"https://api.github.com/users/wangforthinker/repos","events_url":"https://api.github.com/users/wangforthinker/events{/privacy}","received_events_url":"https://api.github.com/users/wangforthinker/received_events","type":"User","site_admin":false},"labels":[{"id":722344260,"node_id":"MDU6TGFiZWw3MjIzNDQyNjA=","url":"https://api.github.com/repos/alibaba/pouch/labels/conflict/needs-rebase","name":"conflict/needs-rebase","color":"cccccc","default":false},{"id":722348097,"node_id":"MDU6TGFiZWw3MjIzNDgwOTc=","url":"https://api.github.com/repos/alibaba/pouch/labels/kind/feature","name":"kind/feature","color":"1d76db","default":false},{"id":722355711,"node_id":"MDU6TGFiZWw3MjIzNTU3MTE=","url":"https://api.github.com/repos/alibaba/pouch/labels/size/XXL","name":"size/XXL","color":"cc3d73","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/alibaba/pouch/milestones/6","html_url":"https://github.com/alibaba/pouch/milestone/6","labels_url":"https://api.github.com/repos/alibaba/pouch/milestones/6/labels","id":3718347,"node_id":"MDk6TWlsZXN0b25lMzcxODM0Nw==","number":6,"title":"v1.1","description":"containerd has been released to v1.2, which improves the performance and fixes issues. pouchcontainer `ctrd` package is designed before containerd v1.0.0 so that there needs changes to `ctrd` package before using v1.2 containerd.","creator":{"login":"fuweid","id":17510957,"node_id":"MDQ6VXNlcjE3NTEwOTU3","avatar_url":"https://avatars3.githubusercontent.com/u/17510957?v=4","gravatar_id":"","url":"https://api.github.com/users/fuweid","html_url":"https://github.com/fuweid","followers_url":"https://api.github.com/users/fuweid/followers","following_url":"https://api.github.com/users/fuweid/following{/other_user}","gists_url":"https://api.github.com/users/fuweid/gists{/gist_id}","starred_url":"https://api.github.com/users/fuweid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fuweid/subscriptions","organizations_url":"https://api.github.com/users/fuweid/orgs","repos_url":"https://api.github.com/users/fuweid/repos","events_url":"https://api.github.com/users/fuweid/events{/privacy}","received_events_url":"https://api.github.com/users/fuweid/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":3,"state":"open","created_at":"2018-10-08T02:55:30Z","updated_at":"2018-10-23T10:04:22Z","due_on":"2018-11-30T08:00:00Z","closed_at":null},"comments":2,"created_at":"2018-09-11T11:03:10Z","updated_at":"2018-10-24T07:12:34Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/alibaba/pouch/pulls/2230","html_url":"https://github.com/alibaba/pouch/pull/2230","diff_url":"https://github.com/alibaba/pouch/pull/2230.diff","patch_url":"https://github.com/alibaba/pouch/pull/2230.patch"},"body":"Signed-off-by: allen.wang <allen.wq@alipay.com>\r\n\r\n<!-- \r\nPlease make sure you have read and understood the contributing guidelines;\r\nhttps://github.com/alibaba/pouch/blob/master/CONTRIBUTING.md -->\r\n\r\n### Ⅰ. Describe what this PR did\r\nConsider to update container's hostname in a running container, It should join container namespace. So it imports package github.com/opencontainers/runc/libcontainer/nsenter to meet the requirement(about more implementation details refferring to Ⅳ. Describe how to verify it). Otherwise, It provides more register functions which can do more in container namespace. \r\n\r\n### Ⅱ. Does this pull request fix one issue?\r\n<!--If that, add \"fixes #xxxx\" below in the next line, for example, fixes #15. Otherwise, add \"NONE\" -->\r\nfixes #2179 \r\n\r\n### Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗？)\r\nadd test TestRunningContainerUpdateHostname and TestStoppedContainerUpdateHostname.\r\n\r\n\r\n### Ⅳ. Describe how to verify it\r\nafter doing update hostname, we can exec into container, and run command \"hostname\" to verify it.  \r\n\r\n### Ⅴ. Special notes for reviews\r\nIt adds a package pkg/nsexec, which defines a function NsExec to join container namespace.  It provides register functions map to allow do something in container namespace such as update hostname.  It registers a reexec command called nsexec, which imports  github.com/opencontainers/runc/libcontainer/nsenter to join container namespace by calling C code. Package pkg/nsexec executes new command to call pouchd nsexec. \r\n"},"comment":{"url":"https://api.github.com/repos/alibaba/pouch/issues/comments/432539883","html_url":"https://github.com/alibaba/pouch/pull/2230#issuecomment-432539883","issue_url":"https://api.github.com/repos/alibaba/pouch/issues/2230","id":432539883,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjUzOTg4Mw==","user":{"login":"pouchrobot","id":33292901,"node_id":"MDQ6VXNlcjMzMjkyOTAx","avatar_url":"https://avatars1.githubusercontent.com/u/33292901?v=4","gravatar_id":"","url":"https://api.github.com/users/pouchrobot","html_url":"https://github.com/pouchrobot","followers_url":"https://api.github.com/users/pouchrobot/followers","following_url":"https://api.github.com/users/pouchrobot/following{/other_user}","gists_url":"https://api.github.com/users/pouchrobot/gists{/gist_id}","starred_url":"https://api.github.com/users/pouchrobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pouchrobot/subscriptions","organizations_url":"https://api.github.com/users/pouchrobot/orgs","repos_url":"https://api.github.com/users/pouchrobot/repos","events_url":"https://api.github.com/users/pouchrobot/events{/privacy}","received_events_url":"https://api.github.com/users/pouchrobot/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T07:12:34Z","updated_at":"2018-10-24T07:12:34Z","author_association":"COLLABORATOR","body":"ping @wangforthinker \nConflict happens after merging a previous commit.\nPlease rebase the branch against master and push it back again. Thanks a lot.\n"}}
{"actor":{"display_login":"pouchrobot"}}