{"action":"created","issue":{"url":"https://api.github.com/repos/xcat2/xcat-core/issues/2452","repository_url":"https://api.github.com/repos/xcat2/xcat-core","labels_url":"https://api.github.com/repos/xcat2/xcat-core/issues/2452/labels{/name}","comments_url":"https://api.github.com/repos/xcat2/xcat-core/issues/2452/comments","events_url":"https://api.github.com/repos/xcat2/xcat-core/issues/2452/events","html_url":"https://github.com/xcat2/xcat-core/pull/2452","id":204384640,"number":2452,"title":"Set the hostname using the hostnamectl command in the hardeths postscripts ","user":{"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},"labels":[{"id":310576733,"url":"https://api.github.com/repos/xcat2/xcat-core/labels/component:os_provision","name":"component:os_provision","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"bybai","id":6743951,"avatar_url":"https://avatars.githubusercontent.com/u/6743951?v=3","gravatar_id":"","url":"https://api.github.com/users/bybai","html_url":"https://github.com/bybai","followers_url":"https://api.github.com/users/bybai/followers","following_url":"https://api.github.com/users/bybai/following{/other_user}","gists_url":"https://api.github.com/users/bybai/gists{/gist_id}","starred_url":"https://api.github.com/users/bybai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bybai/subscriptions","organizations_url":"https://api.github.com/users/bybai/orgs","repos_url":"https://api.github.com/users/bybai/repos","events_url":"https://api.github.com/users/bybai/events{/privacy}","received_events_url":"https://api.github.com/users/bybai/received_events","type":"User","site_admin":false},"assignees":[{"login":"bybai","id":6743951,"avatar_url":"https://avatars.githubusercontent.com/u/6743951?v=3","gravatar_id":"","url":"https://api.github.com/users/bybai","html_url":"https://github.com/bybai","followers_url":"https://api.github.com/users/bybai/followers","following_url":"https://api.github.com/users/bybai/following{/other_user}","gists_url":"https://api.github.com/users/bybai/gists{/gist_id}","starred_url":"https://api.github.com/users/bybai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bybai/subscriptions","organizations_url":"https://api.github.com/users/bybai/orgs","repos_url":"https://api.github.com/users/bybai/repos","events_url":"https://api.github.com/users/bybai/events{/privacy}","received_events_url":"https://api.github.com/users/bybai/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/xcat2/xcat-core/milestones/25","html_url":"https://github.com/xcat2/xcat-core/milestone/25","labels_url":"https://api.github.com/repos/xcat2/xcat-core/milestones/25/labels","id":2235929,"number":25,"title":"2.13.2","description":"","creator":{"login":"zet809","id":8222144,"avatar_url":"https://avatars.githubusercontent.com/u/8222144?v=3","gravatar_id":"","url":"https://api.github.com/users/zet809","html_url":"https://github.com/zet809","followers_url":"https://api.github.com/users/zet809/followers","following_url":"https://api.github.com/users/zet809/following{/other_user}","gists_url":"https://api.github.com/users/zet809/gists{/gist_id}","starred_url":"https://api.github.com/users/zet809/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zet809/subscriptions","organizations_url":"https://api.github.com/users/zet809/orgs","repos_url":"https://api.github.com/users/zet809/repos","events_url":"https://api.github.com/users/zet809/events{/privacy}","received_events_url":"https://api.github.com/users/zet809/received_events","type":"User","site_admin":false},"open_issues":71,"closed_issues":27,"state":"open","created_at":"2017-01-09T00:30:53Z","updated_at":"2017-02-09T06:59:35Z","due_on":"2017-02-24T08:00:00Z","closed_at":null},"comments":0,"created_at":"2017-01-31T18:35:26Z","updated_at":"2017-02-09T07:20:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xcat2/xcat-core/pulls/2452","html_url":"https://github.com/xcat2/xcat-core/pull/2452","diff_url":"https://github.com/xcat2/xcat-core/pull/2452.diff","patch_url":"https://github.com/xcat2/xcat-core/pull/2452.patch"},"body":"Addresses Issue #2446 \r\n\r\nCurrently when we are using `hardeths`, the hostname is not set on Operating systems with systemd using the `hostnamectl` command.  The pull requests changes this to test for the `hostnamectl` command and if it's found, set the hostname using the NODE and DOMAIN environment variables. \r\n\r\n\r\nBefore code changes, the behavior is the following\r\n\r\n## for diskless \r\n```\r\n[root@fs1 ~]# NODE=frame45cn05\r\n[root@fs1 ~]# lsdef $NODE -i provmethod,postscripts\r\nObject name: frame45cn05\r\n    postscripts=syslog,remoteshell,syncfiles,hardeths\r\n    provmethod=rhels7.3-GA-ppc64le-netboot-compute\r\n[root@fs1 ~]# xdsh $NODE  hostnamectl | grep hostname\r\nframe45cn05:    Static hostname: localhost.localdomain\r\nframe45cn05: Transient hostname: frame45cn05\r\n[root@fs1 ~]#  xdsh $NODE cat /etc/hostname\r\nframe45cn05: localhost.localdomain\r\n```\r\n\r\n## for diskful...\r\n```\r\n[root@fs1 ~]# NODE=frame45cn12\r\n[root@fs1 ~]# lsdef $NODE -i provmethod,postscripts\r\nObject name: frame45cn12\r\n    postscripts=syslog,remoteshell,syncfiles,hardeths\r\n    provmethod=rhels7.3-GA-ppc64le-install-compute\r\n[root@fs1 ~]# xdsh $NODE  hostnamectl | grep hostname\r\nframe45cn12:    Static hostname: frame45cn12\r\n[root@fs1 ~]# xdsh $NODE cat /etc/hostname\r\nframe45cn12: frame45cn12\r\n```\r\n\r\nAfter the changes, the behavior is the following:\r\n\r\n## for diskless\r\n\r\n```\r\n[root@fs4 vhu]# NODE=frame23cn22\r\n[root@fs4 vhu]# lsdef $NODE -i provmethod,postscripts\r\nObject name: frame23cn22\r\n    postscripts=syslog,remoteshell,syncfiles,hardeths\r\n    provmethod=rhels7.3-GA-ppc64le-netboot-compute\r\n[root@fs4 vhu]# xdsh $NODE  hostnamectl | grep hostname\r\nframe23cn22:    Static hostname: frame23cn22.pok.stglabs.ibm.com\r\n[root@fs4 vhu]# xdsh $NODE cat /etc/hostname\r\nframe23cn22: frame23cn22.pok.stglabs.ibm.com\r\n```\r\n\r\n## for diskfull\r\n```\r\n[root@fs4 vhu]# NODE=frame23cn24\r\n[root@fs4 vhu]# lsdef $NODE -i provmethod,postscripts\r\nObject name: frame23cn24\r\n    postscripts=syslog,remoteshell,syncfiles,hardeths\r\n    provmethod=rhels7.3-GA-ppc64le-install-compute\r\n[root@fs4 vhu]# xdsh $NODE  hostnamectl | grep hostname\r\nframe23cn24:    Static hostname: frame23cn24\r\n[root@fs4 vhu]# xdsh $NODE cat /etc/hostname\r\nframe23cn24: frame23cn24\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/xcat2/xcat-core/issues/comments/278565900","html_url":"https://github.com/xcat2/xcat-core/pull/2452#issuecomment-278565900","issue_url":"https://api.github.com/repos/xcat2/xcat-core/issues/2452","id":278565900,"user":{"login":"bybai","id":6743951,"avatar_url":"https://avatars.githubusercontent.com/u/6743951?v=3","gravatar_id":"","url":"https://api.github.com/users/bybai","html_url":"https://github.com/bybai","followers_url":"https://api.github.com/users/bybai/followers","following_url":"https://api.github.com/users/bybai/following{/other_user}","gists_url":"https://api.github.com/users/bybai/gists{/gist_id}","starred_url":"https://api.github.com/users/bybai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bybai/subscriptions","organizations_url":"https://api.github.com/users/bybai/orgs","repos_url":"https://api.github.com/users/bybai/repos","events_url":"https://api.github.com/users/bybai/events{/privacy}","received_events_url":"https://api.github.com/users/bybai/received_events","type":"User","site_admin":false},"created_at":"2017-02-09T07:20:23Z","updated_at":"2017-02-09T07:20:23Z","body":"I am ok to merge the changes.\r\n\r\n"}}
{"actor":{"display_login":"bybai"}}