{"action":"created","comment":{"url":"https://api.github.com/repos/xcat2/xcat-core/pulls/comments/85275994","pull_request_review_id":5997675,"id":85275994,"diff_hunk":"@@ -66,6 +66,38 @@ my $tempfile;\n my $prompt;\n my $ignorekernelchk;\n my $noupdate;\n+my $lockfile;\n+my $hassymlink = eval { symlink(\"\", \"\"); 1 };\n+my $lockinfofn=\"/tmp/genimage.$$.lockinfo\";\n+my $exps;\n+\n+#where should only be one genimage process running on the same rootimg dir\n+#the lock() subroutine is to acquire lock\n+#return value:\n+#0: lock acquired\n+#1: acquire lock failed due to some system error\n+#2: acquire lock failed due to the lock is not release yet \n+sub lock {\n+    my $lockinfo=undef;\n+    my $ret=0;\n+    open($lockinfo,\">\", $lockinfofn) or return 1;\n+    print $lockinfo  \"$$\";\n+    close($lockinfo);\n+    if( -l $lockfile){\n+      open($lockinfo,\"<\",$lockfile ) or return 1;","path":"xCAT-server/share/xcat/netboot/rh/genimage","position":22,"original_position":22,"commit_id":"fc2d14be0cb9c9786d08f2077607421cf0a34668","original_commit_id":"fc2d14be0cb9c9786d08f2077607421cf0a34668","user":{"login":"neo954","id":12424088,"avatar_url":"https://avatars.githubusercontent.com/u/12424088?v=3","gravatar_id":"","url":"https://api.github.com/users/neo954","html_url":"https://github.com/neo954","followers_url":"https://api.github.com/users/neo954/followers","following_url":"https://api.github.com/users/neo954/following{/other_user}","gists_url":"https://api.github.com/users/neo954/gists{/gist_id}","starred_url":"https://api.github.com/users/neo954/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo954/subscriptions","organizations_url":"https://api.github.com/users/neo954/orgs","repos_url":"https://api.github.com/users/neo954/repos","events_url":"https://api.github.com/users/neo954/events{/privacy}","received_events_url":"https://api.github.com/users/neo954/received_events","type":"User","site_admin":false},"body":"If the file `$lockfile` does not exist, the program should move on, not `return  1` here.","created_at":"2016-10-27T06:57:30Z","updated_at":"2016-10-27T07:04:20Z","html_url":"https://github.com/xcat2/xcat-core/pull/2036#discussion_r85275994","pull_request_url":"https://api.github.com/repos/xcat2/xcat-core/pulls/2036","_links":{"self":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/comments/85275994"},"html":{"href":"https://github.com/xcat2/xcat-core/pull/2036#discussion_r85275994"},"pull_request":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/2036"}}},"pull_request":{"url":"https://api.github.com/repos/xcat2/xcat-core/pulls/2036","id":90999439,"html_url":"https://github.com/xcat2/xcat-core/pull/2036","diff_url":"https://github.com/xcat2/xcat-core/pull/2036.diff","patch_url":"https://github.com/xcat2/xcat-core/pull/2036.patch","issue_url":"https://api.github.com/repos/xcat2/xcat-core/issues/2036","number":2036,"state":"open","locked":false,"title":"add lock in rh/genimage to avoid multiple genimage processes on same rootimg directory;add guard code before umount/remove mount points under rootimg directory","user":{"login":"immarvin","id":5668922,"avatar_url":"https://avatars.githubusercontent.com/u/5668922?v=3","gravatar_id":"","url":"https://api.github.com/users/immarvin","html_url":"https://github.com/immarvin","followers_url":"https://api.github.com/users/immarvin/followers","following_url":"https://api.github.com/users/immarvin/following{/other_user}","gists_url":"https://api.github.com/users/immarvin/gists{/gist_id}","starred_url":"https://api.github.com/users/immarvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/immarvin/subscriptions","organizations_url":"https://api.github.com/users/immarvin/orgs","repos_url":"https://api.github.com/users/immarvin/repos","events_url":"https://api.github.com/users/immarvin/events{/privacy}","received_events_url":"https://api.github.com/users/immarvin/received_events","type":"User","site_admin":false},"body":"fix https://github.com/xcat2/xcat-core/issues/1936\r\nfix https://github.com/xcat2/xcat-core/issues/1767\r\n1. add lock in rh/genimage to avoid multiple genimage processes on same rootimg directory;\r\n2. add guard code for umount/remove mount points under rootimg directory\r\n","created_at":"2016-10-26T13:02:27Z","updated_at":"2016-10-27T07:04:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae071d6d68e6b372284969f695033746707c136a","assignee":{"login":"whowutwut","id":10049070,"avatar_url":"https://avatars.githubusercontent.com/u/10049070?v=3","gravatar_id":"","url":"https://api.github.com/users/whowutwut","html_url":"https://github.com/whowutwut","followers_url":"https://api.github.com/users/whowutwut/followers","following_url":"https://api.github.com/users/whowutwut/following{/other_user}","gists_url":"https://api.github.com/users/whowutwut/gists{/gist_id}","starred_url":"https://api.github.com/users/whowutwut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whowutwut/subscriptions","organizations_url":"https://api.github.com/users/whowutwut/orgs","repos_url":"https://api.github.com/users/whowutwut/repos","events_url":"https://api.github.com/users/whowutwut/events{/privacy}","received_events_url":"https://api.github.com/users/whowutwut/received_events","type":"User","site_admin":false},"assignees":[{"login":"whowutwut","id":10049070,"avatar_url":"https://avatars.githubusercontent.com/u/10049070?v=3","gravatar_id":"","url":"https://api.github.com/users/whowutwut","html_url":"https://github.com/whowutwut","followers_url":"https://api.github.com/users/whowutwut/followers","following_url":"https://api.github.com/users/whowutwut/following{/other_user}","gists_url":"https://api.github.com/users/whowutwut/gists{/gist_id}","starred_url":"https://api.github.com/users/whowutwut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whowutwut/subscriptions","organizations_url":"https://api.github.com/users/whowutwut/orgs","repos_url":"https://api.github.com/users/whowutwut/repos","events_url":"https://api.github.com/users/whowutwut/events{/privacy}","received_events_url":"https://api.github.com/users/whowutwut/received_events","type":"User","site_admin":false},{"login":"neo954","id":12424088,"avatar_url":"https://avatars.githubusercontent.com/u/12424088?v=3","gravatar_id":"","url":"https://api.github.com/users/neo954","html_url":"https://github.com/neo954","followers_url":"https://api.github.com/users/neo954/followers","following_url":"https://api.github.com/users/neo954/following{/other_user}","gists_url":"https://api.github.com/users/neo954/gists{/gist_id}","starred_url":"https://api.github.com/users/neo954/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo954/subscriptions","organizations_url":"https://api.github.com/users/neo954/orgs","repos_url":"https://api.github.com/users/neo954/repos","events_url":"https://api.github.com/users/neo954/events{/privacy}","received_events_url":"https://api.github.com/users/neo954/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/xcat2/xcat-core/milestones/19","html_url":"https://github.com/xcat2/xcat-core/milestones/2.12.4","labels_url":"https://api.github.com/repos/xcat2/xcat-core/milestones/19/labels","id":1963591,"number":19,"title":"2.12.4","description":"","creator":{"login":"whowutwut","id":10049070,"avatar_url":"https://avatars.githubusercontent.com/u/10049070?v=3","gravatar_id":"","url":"https://api.github.com/users/whowutwut","html_url":"https://github.com/whowutwut","followers_url":"https://api.github.com/users/whowutwut/followers","following_url":"https://api.github.com/users/whowutwut/following{/other_user}","gists_url":"https://api.github.com/users/whowutwut/gists{/gist_id}","starred_url":"https://api.github.com/users/whowutwut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whowutwut/subscriptions","organizations_url":"https://api.github.com/users/whowutwut/orgs","repos_url":"https://api.github.com/users/whowutwut/repos","events_url":"https://api.github.com/users/whowutwut/events{/privacy}","received_events_url":"https://api.github.com/users/whowutwut/received_events","type":"User","site_admin":false},"open_issues":107,"closed_issues":79,"state":"open","created_at":"2016-08-25T18:08:59Z","updated_at":"2016-10-27T06:32:39Z","due_on":"2016-11-11T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/xcat2/xcat-core/pulls/2036/commits","review_comments_url":"https://api.github.com/repos/xcat2/xcat-core/pulls/2036/comments","review_comment_url":"https://api.github.com/repos/xcat2/xcat-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xcat2/xcat-core/issues/2036/comments","statuses_url":"https://api.github.com/repos/xcat2/xcat-core/statuses/fc2d14be0cb9c9786d08f2077607421cf0a34668","head":{"label":"immarvin:ongenimage","ref":"ongenimage","sha":"fc2d14be0cb9c9786d08f2077607421cf0a34668","user":{"login":"immarvin","id":5668922,"avatar_url":"https://avatars.githubusercontent.com/u/5668922?v=3","gravatar_id":"","url":"https://api.github.com/users/immarvin","html_url":"https://github.com/immarvin","followers_url":"https://api.github.com/users/immarvin/followers","following_url":"https://api.github.com/users/immarvin/following{/other_user}","gists_url":"https://api.github.com/users/immarvin/gists{/gist_id}","starred_url":"https://api.github.com/users/immarvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/immarvin/subscriptions","organizations_url":"https://api.github.com/users/immarvin/orgs","repos_url":"https://api.github.com/users/immarvin/repos","events_url":"https://api.github.com/users/immarvin/events{/privacy}","received_events_url":"https://api.github.com/users/immarvin/received_events","type":"User","site_admin":false},"repo":{"id":42424849,"name":"xcat-core","full_name":"immarvin/xcat-core","owner":{"login":"immarvin","id":5668922,"avatar_url":"https://avatars.githubusercontent.com/u/5668922?v=3","gravatar_id":"","url":"https://api.github.com/users/immarvin","html_url":"https://github.com/immarvin","followers_url":"https://api.github.com/users/immarvin/followers","following_url":"https://api.github.com/users/immarvin/following{/other_user}","gists_url":"https://api.github.com/users/immarvin/gists{/gist_id}","starred_url":"https://api.github.com/users/immarvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/immarvin/subscriptions","organizations_url":"https://api.github.com/users/immarvin/orgs","repos_url":"https://api.github.com/users/immarvin/repos","events_url":"https://api.github.com/users/immarvin/events{/privacy}","received_events_url":"https://api.github.com/users/immarvin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/immarvin/xcat-core","description":"Code repo for xCAT core packages","fork":true,"url":"https://api.github.com/repos/immarvin/xcat-core","forks_url":"https://api.github.com/repos/immarvin/xcat-core/forks","keys_url":"https://api.github.com/repos/immarvin/xcat-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/immarvin/xcat-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/immarvin/xcat-core/teams","hooks_url":"https://api.github.com/repos/immarvin/xcat-core/hooks","issue_events_url":"https://api.github.com/repos/immarvin/xcat-core/issues/events{/number}","events_url":"https://api.github.com/repos/immarvin/xcat-core/events","assignees_url":"https://api.github.com/repos/immarvin/xcat-core/assignees{/user}","branches_url":"https://api.github.com/repos/immarvin/xcat-core/branches{/branch}","tags_url":"https://api.github.com/repos/immarvin/xcat-core/tags","blobs_url":"https://api.github.com/repos/immarvin/xcat-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/immarvin/xcat-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/immarvin/xcat-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/immarvin/xcat-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/immarvin/xcat-core/statuses/{sha}","languages_url":"https://api.github.com/repos/immarvin/xcat-core/languages","stargazers_url":"https://api.github.com/repos/immarvin/xcat-core/stargazers","contributors_url":"https://api.github.com/repos/immarvin/xcat-core/contributors","subscribers_url":"https://api.github.com/repos/immarvin/xcat-core/subscribers","subscription_url":"https://api.github.com/repos/immarvin/xcat-core/subscription","commits_url":"https://api.github.com/repos/immarvin/xcat-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/immarvin/xcat-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/immarvin/xcat-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/immarvin/xcat-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/immarvin/xcat-core/contents/{+path}","compare_url":"https://api.github.com/repos/immarvin/xcat-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/immarvin/xcat-core/merges","archive_url":"https://api.github.com/repos/immarvin/xcat-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/immarvin/xcat-core/downloads","issues_url":"https://api.github.com/repos/immarvin/xcat-core/issues{/number}","pulls_url":"https://api.github.com/repos/immarvin/xcat-core/pulls{/number}","milestones_url":"https://api.github.com/repos/immarvin/xcat-core/milestones{/number}","notifications_url":"https://api.github.com/repos/immarvin/xcat-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/immarvin/xcat-core/labels{/name}","releases_url":"https://api.github.com/repos/immarvin/xcat-core/releases{/id}","deployments_url":"https://api.github.com/repos/immarvin/xcat-core/deployments","created_at":"2015-09-14T03:24:03Z","updated_at":"2016-01-14T05:22:58Z","pushed_at":"2016-10-26T12:55:41Z","git_url":"git://github.com/immarvin/xcat-core.git","ssh_url":"git@github.com:immarvin/xcat-core.git","clone_url":"https://github.com/immarvin/xcat-core.git","svn_url":"https://github.com/immarvin/xcat-core","homepage":null,"size":187782,"stargazers_count":0,"watchers_count":0,"language":"Perl","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":"xcat2:master","ref":"master","sha":"05fdc34e19d3a6349635d3d0ae75d573c5f6f813","user":{"login":"xcat2","id":10124414,"avatar_url":"https://avatars.githubusercontent.com/u/10124414?v=3","gravatar_id":"","url":"https://api.github.com/users/xcat2","html_url":"https://github.com/xcat2","followers_url":"https://api.github.com/users/xcat2/followers","following_url":"https://api.github.com/users/xcat2/following{/other_user}","gists_url":"https://api.github.com/users/xcat2/gists{/gist_id}","starred_url":"https://api.github.com/users/xcat2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcat2/subscriptions","organizations_url":"https://api.github.com/users/xcat2/orgs","repos_url":"https://api.github.com/users/xcat2/repos","events_url":"https://api.github.com/users/xcat2/events{/privacy}","received_events_url":"https://api.github.com/users/xcat2/received_events","type":"Organization","site_admin":false},"repo":{"id":27747508,"name":"xcat-core","full_name":"xcat2/xcat-core","owner":{"login":"xcat2","id":10124414,"avatar_url":"https://avatars.githubusercontent.com/u/10124414?v=3","gravatar_id":"","url":"https://api.github.com/users/xcat2","html_url":"https://github.com/xcat2","followers_url":"https://api.github.com/users/xcat2/followers","following_url":"https://api.github.com/users/xcat2/following{/other_user}","gists_url":"https://api.github.com/users/xcat2/gists{/gist_id}","starred_url":"https://api.github.com/users/xcat2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcat2/subscriptions","organizations_url":"https://api.github.com/users/xcat2/orgs","repos_url":"https://api.github.com/users/xcat2/repos","events_url":"https://api.github.com/users/xcat2/events{/privacy}","received_events_url":"https://api.github.com/users/xcat2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xcat2/xcat-core","description":"Code repo for xCAT core packages","fork":false,"url":"https://api.github.com/repos/xcat2/xcat-core","forks_url":"https://api.github.com/repos/xcat2/xcat-core/forks","keys_url":"https://api.github.com/repos/xcat2/xcat-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xcat2/xcat-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xcat2/xcat-core/teams","hooks_url":"https://api.github.com/repos/xcat2/xcat-core/hooks","issue_events_url":"https://api.github.com/repos/xcat2/xcat-core/issues/events{/number}","events_url":"https://api.github.com/repos/xcat2/xcat-core/events","assignees_url":"https://api.github.com/repos/xcat2/xcat-core/assignees{/user}","branches_url":"https://api.github.com/repos/xcat2/xcat-core/branches{/branch}","tags_url":"https://api.github.com/repos/xcat2/xcat-core/tags","blobs_url":"https://api.github.com/repos/xcat2/xcat-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xcat2/xcat-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xcat2/xcat-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/xcat2/xcat-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xcat2/xcat-core/statuses/{sha}","languages_url":"https://api.github.com/repos/xcat2/xcat-core/languages","stargazers_url":"https://api.github.com/repos/xcat2/xcat-core/stargazers","contributors_url":"https://api.github.com/repos/xcat2/xcat-core/contributors","subscribers_url":"https://api.github.com/repos/xcat2/xcat-core/subscribers","subscription_url":"https://api.github.com/repos/xcat2/xcat-core/subscription","commits_url":"https://api.github.com/repos/xcat2/xcat-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/xcat2/xcat-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/xcat2/xcat-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/xcat2/xcat-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/xcat2/xcat-core/contents/{+path}","compare_url":"https://api.github.com/repos/xcat2/xcat-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xcat2/xcat-core/merges","archive_url":"https://api.github.com/repos/xcat2/xcat-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xcat2/xcat-core/downloads","issues_url":"https://api.github.com/repos/xcat2/xcat-core/issues{/number}","pulls_url":"https://api.github.com/repos/xcat2/xcat-core/pulls{/number}","milestones_url":"https://api.github.com/repos/xcat2/xcat-core/milestones{/number}","notifications_url":"https://api.github.com/repos/xcat2/xcat-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xcat2/xcat-core/labels{/name}","releases_url":"https://api.github.com/repos/xcat2/xcat-core/releases{/id}","deployments_url":"https://api.github.com/repos/xcat2/xcat-core/deployments","created_at":"2014-12-09T03:21:50Z","updated_at":"2016-10-24T12:53:15Z","pushed_at":"2016-10-27T06:32:40Z","git_url":"git://github.com/xcat2/xcat-core.git","ssh_url":"git@github.com:xcat2/xcat-core.git","clone_url":"https://github.com/xcat2/xcat-core.git","svn_url":"https://github.com/xcat2/xcat-core","homepage":null,"size":188550,"stargazers_count":58,"watchers_count":58,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":164,"forks":67,"open_issues":164,"watchers":58,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/2036"},"html":{"href":"https://github.com/xcat2/xcat-core/pull/2036"},"issue":{"href":"https://api.github.com/repos/xcat2/xcat-core/issues/2036"},"comments":{"href":"https://api.github.com/repos/xcat2/xcat-core/issues/2036/comments"},"review_comments":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/2036/comments"},"review_comment":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xcat2/xcat-core/pulls/2036/commits"},"statuses":{"href":"https://api.github.com/repos/xcat2/xcat-core/statuses/fc2d14be0cb9c9786d08f2077607421cf0a34668"}}}}
{"actor":{"display_login":"neo954"}}