{"action":"created","comment":{"url":"https://api.github.com/repos/systemd/systemd/pulls/comments/59210533","id":59210533,"diff_hunk":"@@ -2796,6 +2827,10 @@ static int outer_child(\n         if (r < 0)\n                 return r;\n \n+        r = setup_machine_id(directory);","path":"src/nspawn/nspawn.c","position":108,"original_position":108,"commit_id":"1b735f5b8fc6ac8bd0891b8aefea2066fb832cb5","original_commit_id":"1b735f5b8fc6ac8bd0891b8aefea2066fb832cb5","user":{"login":"poettering","id":2130732,"avatar_url":"https://avatars.githubusercontent.com/u/2130732?v=3","gravatar_id":"","url":"https://api.github.com/users/poettering","html_url":"https://github.com/poettering","followers_url":"https://api.github.com/users/poettering/followers","following_url":"https://api.github.com/users/poettering/following{/other_user}","gists_url":"https://api.github.com/users/poettering/gists{/gist_id}","starred_url":"https://api.github.com/users/poettering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poettering/subscriptions","organizations_url":"https://api.github.com/users/poettering/orgs","repos_url":"https://api.github.com/users/poettering/repos","events_url":"https://api.github.com/users/poettering/events{/privacy}","received_events_url":"https://api.github.com/users/poettering/received_events","type":"User","site_admin":false},"body":"Yeah, @keszybz has a point, instead of first writing the file, and then reading it back, let's just keep it around internally...","created_at":"2016-04-11T14:13:54Z","updated_at":"2016-04-11T14:13:54Z","html_url":"https://github.com/systemd/systemd/pull/2999#discussion_r59210533","pull_request_url":"https://api.github.com/repos/systemd/systemd/pulls/2999","_links":{"self":{"href":"https://api.github.com/repos/systemd/systemd/pulls/comments/59210533"},"html":{"href":"https://github.com/systemd/systemd/pull/2999#discussion_r59210533"},"pull_request":{"href":"https://api.github.com/repos/systemd/systemd/pulls/2999"}}},"pull_request":{"url":"https://api.github.com/repos/systemd/systemd/pulls/2999","id":65892584,"html_url":"https://github.com/systemd/systemd/pull/2999","diff_url":"https://github.com/systemd/systemd/pull/2999.diff","patch_url":"https://github.com/systemd/systemd/pull/2999.patch","issue_url":"https://api.github.com/repos/systemd/systemd/issues/2999","number":2999,"state":"open","locked":false,"title":"nspawn: always setup machine id","user":{"login":"msekletar","id":719023,"avatar_url":"https://avatars.githubusercontent.com/u/719023?v=3","gravatar_id":"","url":"https://api.github.com/users/msekletar","html_url":"https://github.com/msekletar","followers_url":"https://api.github.com/users/msekletar/followers","following_url":"https://api.github.com/users/msekletar/following{/other_user}","gists_url":"https://api.github.com/users/msekletar/gists{/gist_id}","starred_url":"https://api.github.com/users/msekletar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msekletar/subscriptions","organizations_url":"https://api.github.com/users/msekletar/orgs","repos_url":"https://api.github.com/users/msekletar/repos","events_url":"https://api.github.com/users/msekletar/events{/privacy}","received_events_url":"https://api.github.com/users/msekletar/received_events","type":"User","site_admin":false},"body":"We check /etc/machine-id of the container and if it is already populated\r\nwe use value from there, possibly ignoring value of --uuid option from\r\nthe command line. When dealing with R/O image we setup transient machine\r\nid.\r\n\r\nOnce we determined machine id of the container, we use this value for\r\nregistration with systemd-machined and we also export it via\r\ncontainer_uuid environment variable.\r\n\r\nAs registration with systemd-machined is done by the main nspawn process\r\nwe communicate container machine id established by setup_machine_id from\r\nouter child to the main process by unix domain socket. Similarly to PID\r\nof inner child.","created_at":"2016-04-09T21:08:48Z","updated_at":"2016-04-11T14:13:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91f18529ec0ff8bebe4e31f8d0b841d160007ef7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/systemd/systemd/pulls/2999/commits","review_comments_url":"https://api.github.com/repos/systemd/systemd/pulls/2999/comments","review_comment_url":"https://api.github.com/repos/systemd/systemd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/2999/comments","statuses_url":"https://api.github.com/repos/systemd/systemd/statuses/1b735f5b8fc6ac8bd0891b8aefea2066fb832cb5","head":{"label":"msekletar:nspawn-empty-machine-id-v2","ref":"nspawn-empty-machine-id-v2","sha":"1b735f5b8fc6ac8bd0891b8aefea2066fb832cb5","user":{"login":"msekletar","id":719023,"avatar_url":"https://avatars.githubusercontent.com/u/719023?v=3","gravatar_id":"","url":"https://api.github.com/users/msekletar","html_url":"https://github.com/msekletar","followers_url":"https://api.github.com/users/msekletar/followers","following_url":"https://api.github.com/users/msekletar/following{/other_user}","gists_url":"https://api.github.com/users/msekletar/gists{/gist_id}","starred_url":"https://api.github.com/users/msekletar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msekletar/subscriptions","organizations_url":"https://api.github.com/users/msekletar/orgs","repos_url":"https://api.github.com/users/msekletar/repos","events_url":"https://api.github.com/users/msekletar/events{/privacy}","received_events_url":"https://api.github.com/users/msekletar/received_events","type":"User","site_admin":false},"repo":{"id":35424596,"name":"systemd","full_name":"msekletar/systemd","owner":{"login":"msekletar","id":719023,"avatar_url":"https://avatars.githubusercontent.com/u/719023?v=3","gravatar_id":"","url":"https://api.github.com/users/msekletar","html_url":"https://github.com/msekletar","followers_url":"https://api.github.com/users/msekletar/followers","following_url":"https://api.github.com/users/msekletar/following{/other_user}","gists_url":"https://api.github.com/users/msekletar/gists{/gist_id}","starred_url":"https://api.github.com/users/msekletar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msekletar/subscriptions","organizations_url":"https://api.github.com/users/msekletar/orgs","repos_url":"https://api.github.com/users/msekletar/repos","events_url":"https://api.github.com/users/msekletar/events{/privacy}","received_events_url":"https://api.github.com/users/msekletar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/msekletar/systemd","description":"systemd hacking","fork":true,"url":"https://api.github.com/repos/msekletar/systemd","forks_url":"https://api.github.com/repos/msekletar/systemd/forks","keys_url":"https://api.github.com/repos/msekletar/systemd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/msekletar/systemd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/msekletar/systemd/teams","hooks_url":"https://api.github.com/repos/msekletar/systemd/hooks","issue_events_url":"https://api.github.com/repos/msekletar/systemd/issues/events{/number}","events_url":"https://api.github.com/repos/msekletar/systemd/events","assignees_url":"https://api.github.com/repos/msekletar/systemd/assignees{/user}","branches_url":"https://api.github.com/repos/msekletar/systemd/branches{/branch}","tags_url":"https://api.github.com/repos/msekletar/systemd/tags","blobs_url":"https://api.github.com/repos/msekletar/systemd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/msekletar/systemd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/msekletar/systemd/git/refs{/sha}","trees_url":"https://api.github.com/repos/msekletar/systemd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/msekletar/systemd/statuses/{sha}","languages_url":"https://api.github.com/repos/msekletar/systemd/languages","stargazers_url":"https://api.github.com/repos/msekletar/systemd/stargazers","contributors_url":"https://api.github.com/repos/msekletar/systemd/contributors","subscribers_url":"https://api.github.com/repos/msekletar/systemd/subscribers","subscription_url":"https://api.github.com/repos/msekletar/systemd/subscription","commits_url":"https://api.github.com/repos/msekletar/systemd/commits{/sha}","git_commits_url":"https://api.github.com/repos/msekletar/systemd/git/commits{/sha}","comments_url":"https://api.github.com/repos/msekletar/systemd/comments{/number}","issue_comment_url":"https://api.github.com/repos/msekletar/systemd/issues/comments{/number}","contents_url":"https://api.github.com/repos/msekletar/systemd/contents/{+path}","compare_url":"https://api.github.com/repos/msekletar/systemd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/msekletar/systemd/merges","archive_url":"https://api.github.com/repos/msekletar/systemd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/msekletar/systemd/downloads","issues_url":"https://api.github.com/repos/msekletar/systemd/issues{/number}","pulls_url":"https://api.github.com/repos/msekletar/systemd/pulls{/number}","milestones_url":"https://api.github.com/repos/msekletar/systemd/milestones{/number}","notifications_url":"https://api.github.com/repos/msekletar/systemd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/msekletar/systemd/labels{/name}","releases_url":"https://api.github.com/repos/msekletar/systemd/releases{/id}","deployments_url":"https://api.github.com/repos/msekletar/systemd/deployments","created_at":"2015-05-11T13:10:30Z","updated_at":"2016-01-22T09:18:35Z","pushed_at":"2016-04-10T12:37:10Z","git_url":"git://github.com/msekletar/systemd.git","ssh_url":"git@github.com:msekletar/systemd.git","clone_url":"https://github.com/msekletar/systemd.git","svn_url":"https://github.com/msekletar/systemd","homepage":"","size":57133,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"systemd:master","ref":"master","sha":"0c0ee5ebee697e7089f73ebf41caf1a43789c10f","user":{"login":"systemd","id":1918868,"avatar_url":"https://avatars.githubusercontent.com/u/1918868?v=3","gravatar_id":"","url":"https://api.github.com/users/systemd","html_url":"https://github.com/systemd","followers_url":"https://api.github.com/users/systemd/followers","following_url":"https://api.github.com/users/systemd/following{/other_user}","gists_url":"https://api.github.com/users/systemd/gists{/gist_id}","starred_url":"https://api.github.com/users/systemd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemd/subscriptions","organizations_url":"https://api.github.com/users/systemd/orgs","repos_url":"https://api.github.com/users/systemd/repos","events_url":"https://api.github.com/users/systemd/events{/privacy}","received_events_url":"https://api.github.com/users/systemd/received_events","type":"Organization","site_admin":false},"repo":{"id":32873313,"name":"systemd","full_name":"systemd/systemd","owner":{"login":"systemd","id":1918868,"avatar_url":"https://avatars.githubusercontent.com/u/1918868?v=3","gravatar_id":"","url":"https://api.github.com/users/systemd","html_url":"https://github.com/systemd","followers_url":"https://api.github.com/users/systemd/followers","following_url":"https://api.github.com/users/systemd/following{/other_user}","gists_url":"https://api.github.com/users/systemd/gists{/gist_id}","starred_url":"https://api.github.com/users/systemd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemd/subscriptions","organizations_url":"https://api.github.com/users/systemd/orgs","repos_url":"https://api.github.com/users/systemd/repos","events_url":"https://api.github.com/users/systemd/events{/privacy}","received_events_url":"https://api.github.com/users/systemd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/systemd/systemd","description":"systemd upstream","fork":false,"url":"https://api.github.com/repos/systemd/systemd","forks_url":"https://api.github.com/repos/systemd/systemd/forks","keys_url":"https://api.github.com/repos/systemd/systemd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/systemd/systemd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/systemd/systemd/teams","hooks_url":"https://api.github.com/repos/systemd/systemd/hooks","issue_events_url":"https://api.github.com/repos/systemd/systemd/issues/events{/number}","events_url":"https://api.github.com/repos/systemd/systemd/events","assignees_url":"https://api.github.com/repos/systemd/systemd/assignees{/user}","branches_url":"https://api.github.com/repos/systemd/systemd/branches{/branch}","tags_url":"https://api.github.com/repos/systemd/systemd/tags","blobs_url":"https://api.github.com/repos/systemd/systemd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/systemd/systemd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/systemd/systemd/git/refs{/sha}","trees_url":"https://api.github.com/repos/systemd/systemd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/systemd/systemd/statuses/{sha}","languages_url":"https://api.github.com/repos/systemd/systemd/languages","stargazers_url":"https://api.github.com/repos/systemd/systemd/stargazers","contributors_url":"https://api.github.com/repos/systemd/systemd/contributors","subscribers_url":"https://api.github.com/repos/systemd/systemd/subscribers","subscription_url":"https://api.github.com/repos/systemd/systemd/subscription","commits_url":"https://api.github.com/repos/systemd/systemd/commits{/sha}","git_commits_url":"https://api.github.com/repos/systemd/systemd/git/commits{/sha}","comments_url":"https://api.github.com/repos/systemd/systemd/comments{/number}","issue_comment_url":"https://api.github.com/repos/systemd/systemd/issues/comments{/number}","contents_url":"https://api.github.com/repos/systemd/systemd/contents/{+path}","compare_url":"https://api.github.com/repos/systemd/systemd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/systemd/systemd/merges","archive_url":"https://api.github.com/repos/systemd/systemd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/systemd/systemd/downloads","issues_url":"https://api.github.com/repos/systemd/systemd/issues{/number}","pulls_url":"https://api.github.com/repos/systemd/systemd/pulls{/number}","milestones_url":"https://api.github.com/repos/systemd/systemd/milestones{/number}","notifications_url":"https://api.github.com/repos/systemd/systemd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/systemd/systemd/labels{/name}","releases_url":"https://api.github.com/repos/systemd/systemd/releases{/id}","deployments_url":"https://api.github.com/repos/systemd/systemd/deployments","created_at":"2015-03-25T15:27:27Z","updated_at":"2016-04-10T03:29:50Z","pushed_at":"2016-04-11T14:07:17Z","git_url":"git://github.com/systemd/systemd.git","ssh_url":"git@github.com:systemd/systemd.git","clone_url":"https://github.com/systemd/systemd.git","svn_url":"https://github.com/systemd/systemd","homepage":"http://www.freedesktop.org/wiki/Software/systemd/","size":70183,"stargazers_count":1002,"watchers_count":1002,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":396,"mirror_url":null,"open_issues_count":391,"forks":396,"open_issues":391,"watchers":1002,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/systemd/systemd/pulls/2999"},"html":{"href":"https://github.com/systemd/systemd/pull/2999"},"issue":{"href":"https://api.github.com/repos/systemd/systemd/issues/2999"},"comments":{"href":"https://api.github.com/repos/systemd/systemd/issues/2999/comments"},"review_comments":{"href":"https://api.github.com/repos/systemd/systemd/pulls/2999/comments"},"review_comment":{"href":"https://api.github.com/repos/systemd/systemd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/systemd/systemd/pulls/2999/commits"},"statuses":{"href":"https://api.github.com/repos/systemd/systemd/statuses/1b735f5b8fc6ac8bd0891b8aefea2066fb832cb5"}}}}