{"action":"created","comment":{"url":"https://api.github.com/repos/autotest/autotest-docker/pulls/comments/76038690","id":76038690,"diff_hunk":"@@ -0,0 +1,71 @@\n+\"\"\"\n+Summary\n+---------\n+\n+Tests relating to namespaces. As of 2016-08-23 only mount namespaces\n+but it's likely we'll need tests for user namespaces.\n+\n+Operational Summary\n+----------------------\n+\n+#. See individual tests.\n+\"\"\"\n+\n+from autotest.client import utils\n+from dockertest import subtest\n+from dockertest.dockercmd import AsyncDockerCmd\n+from dockertest.images import DockerImage\n+from dockertest.subtest import SubSubtest\n+\n+\n+class namespaces(subtest.SubSubtestCaller):\n+    pass\n+\n+\n+class namespaces_base(SubSubtest):\n+    pass\n+\n+\n+class rmdir_mount(namespaces_base):\n+    \"\"\"\n+    Motivation for this test was the August 2016 attempt to package\n+    docker-latest-1.12: the initial builds didn't work, docker daemon\n+    wouldn't start (various BZs, not important now). The workaround was\n+    to remove MountFlags=slave from the systemd unit file (1.12.0-5.el7).\n+    This actually seemed to work fine, and docker-autotest mostly passed,\n+    but as it turns out that workaround would've triggered problems in\n+    the field. This test is an attempt to catch one such problem. It\n+    passes on docker-latest-1.12.0-12.el7, fails if docker is run\n+    without MountFlags=slave. See rhbz1347821 for further info.\n+    \"\"\"\n+\n+    def initialize(self):\n+        super(rmdir_mount, self).initialize()\n+\n+    def run_once(self):\n+        \"\"\"\n+        Run a background container with --rm; while that's running,\n+        unshare its mount namespace in a longer-running process.\n+        When the container finishes, we expect the --rm to succeed.\n+        \"\"\"\n+        super(rmdir_mount, self).run_once()\n+        fin = DockerImage.full_name_from_defaults(self.config)\n+        subargs = ['--rm', fin, 'bash', '-c', '\"echo READY; sleep 15\"']\n+        dkrcmd = AsyncDockerCmd(self, 'run', subargs)\n+        self.sub_stuff['dkrcmd'] = dkrcmd\n+        dkrcmd.execute()\n+        dkrcmd.wait_for_ready(timeout=5)\n+        self.sub_stuff['unshare'] = utils.run(\"unshare -m bash -c 'sleep 20'\")","path":"subtests/docker_cli/namespaces/namespaces.py","position":58,"original_position":58,"commit_id":"850a2606829e8ad0c16f5f3e487bc78fcccc0abd","original_commit_id":"850a2606829e8ad0c16f5f3e487bc78fcccc0abd","user":{"login":"cevich","id":1183438,"avatar_url":"https://avatars.githubusercontent.com/u/1183438?v=3","gravatar_id":"","url":"https://api.github.com/users/cevich","html_url":"https://github.com/cevich","followers_url":"https://api.github.com/users/cevich/followers","following_url":"https://api.github.com/users/cevich/following{/other_user}","gists_url":"https://api.github.com/users/cevich/gists{/gist_id}","starred_url":"https://api.github.com/users/cevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cevich/subscriptions","organizations_url":"https://api.github.com/users/cevich/orgs","repos_url":"https://api.github.com/users/cevich/repos","events_url":"https://api.github.com/users/cevich/events{/privacy}","received_events_url":"https://api.github.com/users/cevich/received_events","type":"User","site_admin":false},"body":"Any other way to tickle this one that doesn't rely on the wall-clock?  Maybe use signaling instead?","created_at":"2016-08-24T11:22:04Z","updated_at":"2016-08-24T11:22:04Z","html_url":"https://github.com/autotest/autotest-docker/pull/627#discussion_r76038690","pull_request_url":"https://api.github.com/repos/autotest/autotest-docker/pulls/627","_links":{"self":{"href":"https://api.github.com/repos/autotest/autotest-docker/pulls/comments/76038690"},"html":{"href":"https://github.com/autotest/autotest-docker/pull/627#discussion_r76038690"},"pull_request":{"href":"https://api.github.com/repos/autotest/autotest-docker/pulls/627"}}},"pull_request":{"url":"https://api.github.com/repos/autotest/autotest-docker/pulls/627","id":82449653,"html_url":"https://github.com/autotest/autotest-docker/pull/627","diff_url":"https://github.com/autotest/autotest-docker/pull/627.diff","patch_url":"https://github.com/autotest/autotest-docker/pull/627.patch","issue_url":"https://api.github.com/repos/autotest/autotest-docker/issues/627","number":627,"state":"open","locked":false,"title":"New test for mount namespaces","user":{"login":"edsantiago","id":265639,"avatar_url":"https://avatars.githubusercontent.com/u/265639?v=3","gravatar_id":"","url":"https://api.github.com/users/edsantiago","html_url":"https://github.com/edsantiago","followers_url":"https://api.github.com/users/edsantiago/followers","following_url":"https://api.github.com/users/edsantiago/following{/other_user}","gists_url":"https://api.github.com/users/edsantiago/gists{/gist_id}","starred_url":"https://api.github.com/users/edsantiago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edsantiago/subscriptions","organizations_url":"https://api.github.com/users/edsantiago/orgs","repos_url":"https://api.github.com/users/edsantiago/repos","events_url":"https://api.github.com/users/edsantiago/events{/privacy}","received_events_url":"https://api.github.com/users/edsantiago/received_events","type":"User","site_admin":false},"body":"In particular, a way to detect that either docker is run\r\nwith MountFlags=latest in systemd unit file, or the kernel\r\nissue requiring that flag is fixed (not expected until 7.3+).\r\n\r\nSigned-off-by: Ed Santiago <santiago@redhat.com>","created_at":"2016-08-23T22:05:10Z","updated_at":"2016-08-24T11:22:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f791cd1e90d517c49bf89040d8c5f7a7e8f9e9d6","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/autotest/autotest-docker/milestones/23","html_url":"https://github.com/autotest/autotest-docker/milestones/Docker%20Autotest%20Version%200.8.6%20(NO%20API%20Changes)","labels_url":"https://api.github.com/repos/autotest/autotest-docker/milestones/23/labels","id":1747813,"number":23,"title":"Docker Autotest Version 0.8.6 (NO API Changes)","description":"","creator":{"login":"cevich","id":1183438,"avatar_url":"https://avatars.githubusercontent.com/u/1183438?v=3","gravatar_id":"","url":"https://api.github.com/users/cevich","html_url":"https://github.com/cevich","followers_url":"https://api.github.com/users/cevich/followers","following_url":"https://api.github.com/users/cevich/following{/other_user}","gists_url":"https://api.github.com/users/cevich/gists{/gist_id}","starred_url":"https://api.github.com/users/cevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cevich/subscriptions","organizations_url":"https://api.github.com/users/cevich/orgs","repos_url":"https://api.github.com/users/cevich/repos","events_url":"https://api.github.com/users/cevich/events{/privacy}","received_events_url":"https://api.github.com/users/cevich/received_events","type":"User","site_admin":false},"open_issues":41,"closed_issues":25,"state":"open","created_at":"2016-05-04T14:28:26Z","updated_at":"2016-08-23T22:09:47Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/autotest/autotest-docker/pulls/627/commits","review_comments_url":"https://api.github.com/repos/autotest/autotest-docker/pulls/627/comments","review_comment_url":"https://api.github.com/repos/autotest/autotest-docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/autotest/autotest-docker/issues/627/comments","statuses_url":"https://api.github.com/repos/autotest/autotest-docker/statuses/850a2606829e8ad0c16f5f3e487bc78fcccc0abd","head":{"label":"edsantiago:test_mount_namespace","ref":"test_mount_namespace","sha":"850a2606829e8ad0c16f5f3e487bc78fcccc0abd","user":{"login":"edsantiago","id":265639,"avatar_url":"https://avatars.githubusercontent.com/u/265639?v=3","gravatar_id":"","url":"https://api.github.com/users/edsantiago","html_url":"https://github.com/edsantiago","followers_url":"https://api.github.com/users/edsantiago/followers","following_url":"https://api.github.com/users/edsantiago/following{/other_user}","gists_url":"https://api.github.com/users/edsantiago/gists{/gist_id}","starred_url":"https://api.github.com/users/edsantiago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edsantiago/subscriptions","organizations_url":"https://api.github.com/users/edsantiago/orgs","repos_url":"https://api.github.com/users/edsantiago/repos","events_url":"https://api.github.com/users/edsantiago/events{/privacy}","received_events_url":"https://api.github.com/users/edsantiago/received_events","type":"User","site_admin":false},"repo":{"id":51094257,"name":"autotest-docker","full_name":"edsantiago/autotest-docker","owner":{"login":"edsantiago","id":265639,"avatar_url":"https://avatars.githubusercontent.com/u/265639?v=3","gravatar_id":"","url":"https://api.github.com/users/edsantiago","html_url":"https://github.com/edsantiago","followers_url":"https://api.github.com/users/edsantiago/followers","following_url":"https://api.github.com/users/edsantiago/following{/other_user}","gists_url":"https://api.github.com/users/edsantiago/gists{/gist_id}","starred_url":"https://api.github.com/users/edsantiago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edsantiago/subscriptions","organizations_url":"https://api.github.com/users/edsantiago/orgs","repos_url":"https://api.github.com/users/edsantiago/repos","events_url":"https://api.github.com/users/edsantiago/events{/privacy}","received_events_url":"https://api.github.com/users/edsantiago/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edsantiago/autotest-docker","description":"Autotest client test containing functional & integration subtests for the Docker project","fork":true,"url":"https://api.github.com/repos/edsantiago/autotest-docker","forks_url":"https://api.github.com/repos/edsantiago/autotest-docker/forks","keys_url":"https://api.github.com/repos/edsantiago/autotest-docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edsantiago/autotest-docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edsantiago/autotest-docker/teams","hooks_url":"https://api.github.com/repos/edsantiago/autotest-docker/hooks","issue_events_url":"https://api.github.com/repos/edsantiago/autotest-docker/issues/events{/number}","events_url":"https://api.github.com/repos/edsantiago/autotest-docker/events","assignees_url":"https://api.github.com/repos/edsantiago/autotest-docker/assignees{/user}","branches_url":"https://api.github.com/repos/edsantiago/autotest-docker/branches{/branch}","tags_url":"https://api.github.com/repos/edsantiago/autotest-docker/tags","blobs_url":"https://api.github.com/repos/edsantiago/autotest-docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edsantiago/autotest-docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edsantiago/autotest-docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/edsantiago/autotest-docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edsantiago/autotest-docker/statuses/{sha}","languages_url":"https://api.github.com/repos/edsantiago/autotest-docker/languages","stargazers_url":"https://api.github.com/repos/edsantiago/autotest-docker/stargazers","contributors_url":"https://api.github.com/repos/edsantiago/autotest-docker/contributors","subscribers_url":"https://api.github.com/repos/edsantiago/autotest-docker/subscribers","subscription_url":"https://api.github.com/repos/edsantiago/autotest-docker/subscription","commits_url":"https://api.github.com/repos/edsantiago/autotest-docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/edsantiago/autotest-docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/edsantiago/autotest-docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/edsantiago/autotest-docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/edsantiago/autotest-docker/contents/{+path}","compare_url":"https://api.github.com/repos/edsantiago/autotest-docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edsantiago/autotest-docker/merges","archive_url":"https://api.github.com/repos/edsantiago/autotest-docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edsantiago/autotest-docker/downloads","issues_url":"https://api.github.com/repos/edsantiago/autotest-docker/issues{/number}","pulls_url":"https://api.github.com/repos/edsantiago/autotest-docker/pulls{/number}","milestones_url":"https://api.github.com/repos/edsantiago/autotest-docker/milestones{/number}","notifications_url":"https://api.github.com/repos/edsantiago/autotest-docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edsantiago/autotest-docker/labels{/name}","releases_url":"https://api.github.com/repos/edsantiago/autotest-docker/releases{/id}","deployments_url":"https://api.github.com/repos/edsantiago/autotest-docker/deployments","created_at":"2016-02-04T17:56:14Z","updated_at":"2016-02-04T17:56:15Z","pushed_at":"2016-08-23T22:04:56Z","git_url":"git://github.com/edsantiago/autotest-docker.git","ssh_url":"git@github.com:edsantiago/autotest-docker.git","clone_url":"https://github.com/edsantiago/autotest-docker.git","svn_url":"https://github.com/edsantiago/autotest-docker","homepage":null,"size":2221,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"autotest:master","ref":"master","sha":"e0c917a91bbdfefcb06efbfd1db4a2f314f95121","user":{"login":"autotest","id":472856,"avatar_url":"https://avatars.githubusercontent.com/u/472856?v=3","gravatar_id":"","url":"https://api.github.com/users/autotest","html_url":"https://github.com/autotest","followers_url":"https://api.github.com/users/autotest/followers","following_url":"https://api.github.com/users/autotest/following{/other_user}","gists_url":"https://api.github.com/users/autotest/gists{/gist_id}","starred_url":"https://api.github.com/users/autotest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autotest/subscriptions","organizations_url":"https://api.github.com/users/autotest/orgs","repos_url":"https://api.github.com/users/autotest/repos","events_url":"https://api.github.com/users/autotest/events{/privacy}","received_events_url":"https://api.github.com/users/autotest/received_events","type":"Organization","site_admin":false},"repo":{"id":17869790,"name":"autotest-docker","full_name":"autotest/autotest-docker","owner":{"login":"autotest","id":472856,"avatar_url":"https://avatars.githubusercontent.com/u/472856?v=3","gravatar_id":"","url":"https://api.github.com/users/autotest","html_url":"https://github.com/autotest","followers_url":"https://api.github.com/users/autotest/followers","following_url":"https://api.github.com/users/autotest/following{/other_user}","gists_url":"https://api.github.com/users/autotest/gists{/gist_id}","starred_url":"https://api.github.com/users/autotest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autotest/subscriptions","organizations_url":"https://api.github.com/users/autotest/orgs","repos_url":"https://api.github.com/users/autotest/repos","events_url":"https://api.github.com/users/autotest/events{/privacy}","received_events_url":"https://api.github.com/users/autotest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autotest/autotest-docker","description":"Autotest client test containing functional & integration subtests for the Docker project","fork":false,"url":"https://api.github.com/repos/autotest/autotest-docker","forks_url":"https://api.github.com/repos/autotest/autotest-docker/forks","keys_url":"https://api.github.com/repos/autotest/autotest-docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autotest/autotest-docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autotest/autotest-docker/teams","hooks_url":"https://api.github.com/repos/autotest/autotest-docker/hooks","issue_events_url":"https://api.github.com/repos/autotest/autotest-docker/issues/events{/number}","events_url":"https://api.github.com/repos/autotest/autotest-docker/events","assignees_url":"https://api.github.com/repos/autotest/autotest-docker/assignees{/user}","branches_url":"https://api.github.com/repos/autotest/autotest-docker/branches{/branch}","tags_url":"https://api.github.com/repos/autotest/autotest-docker/tags","blobs_url":"https://api.github.com/repos/autotest/autotest-docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autotest/autotest-docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autotest/autotest-docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/autotest/autotest-docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autotest/autotest-docker/statuses/{sha}","languages_url":"https://api.github.com/repos/autotest/autotest-docker/languages","stargazers_url":"https://api.github.com/repos/autotest/autotest-docker/stargazers","contributors_url":"https://api.github.com/repos/autotest/autotest-docker/contributors","subscribers_url":"https://api.github.com/repos/autotest/autotest-docker/subscribers","subscription_url":"https://api.github.com/repos/autotest/autotest-docker/subscription","commits_url":"https://api.github.com/repos/autotest/autotest-docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/autotest/autotest-docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/autotest/autotest-docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/autotest/autotest-docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/autotest/autotest-docker/contents/{+path}","compare_url":"https://api.github.com/repos/autotest/autotest-docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autotest/autotest-docker/merges","archive_url":"https://api.github.com/repos/autotest/autotest-docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autotest/autotest-docker/downloads","issues_url":"https://api.github.com/repos/autotest/autotest-docker/issues{/number}","pulls_url":"https://api.github.com/repos/autotest/autotest-docker/pulls{/number}","milestones_url":"https://api.github.com/repos/autotest/autotest-docker/milestones{/number}","notifications_url":"https://api.github.com/repos/autotest/autotest-docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autotest/autotest-docker/labels{/name}","releases_url":"https://api.github.com/repos/autotest/autotest-docker/releases{/id}","deployments_url":"https://api.github.com/repos/autotest/autotest-docker/deployments","created_at":"2014-03-18T14:53:27Z","updated_at":"2016-06-28T13:43:29Z","pushed_at":"2016-08-23T22:05:10Z","git_url":"git://github.com/autotest/autotest-docker.git","ssh_url":"git@github.com:autotest/autotest-docker.git","clone_url":"https://github.com/autotest/autotest-docker.git","svn_url":"https://github.com/autotest/autotest-docker","homepage":null,"size":2731,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":54,"forks":21,"open_issues":54,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/autotest/autotest-docker/pulls/627"},"html":{"href":"https://github.com/autotest/autotest-docker/pull/627"},"issue":{"href":"https://api.github.com/repos/autotest/autotest-docker/issues/627"},"comments":{"href":"https://api.github.com/repos/autotest/autotest-docker/issues/627/comments"},"review_comments":{"href":"https://api.github.com/repos/autotest/autotest-docker/pulls/627/comments"},"review_comment":{"href":"https://api.github.com/repos/autotest/autotest-docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/autotest/autotest-docker/pulls/627/commits"},"statuses":{"href":"https://api.github.com/repos/autotest/autotest-docker/statuses/850a2606829e8ad0c16f5f3e487bc78fcccc0abd"}}}}
{"actor":{"display_login":"cevich"}}