{"action":"opened","issue":{"url":"https://api.github.com/repos/xcat2/xcat-core/issues/4058","repository_url":"https://api.github.com/repos/xcat2/xcat-core","labels_url":"https://api.github.com/repos/xcat2/xcat-core/issues/4058/labels{/name}","comments_url":"https://api.github.com/repos/xcat2/xcat-core/issues/4058/comments","events_url":"https://api.github.com/repos/xcat2/xcat-core/issues/4058/events","html_url":"https://github.com/xcat2/xcat-core/issues/4058","id":263584298,"number":4058,"title":"xHRM fails when installnic is not set","user":{"login":"kcgthb","id":186807,"avatar_url":"https://avatars1.githubusercontent.com/u/186807?v=4","gravatar_id":"","url":"https://api.github.com/users/kcgthb","html_url":"https://github.com/kcgthb","followers_url":"https://api.github.com/users/kcgthb/followers","following_url":"https://api.github.com/users/kcgthb/following{/other_user}","gists_url":"https://api.github.com/users/kcgthb/gists{/gist_id}","starred_url":"https://api.github.com/users/kcgthb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcgthb/subscriptions","organizations_url":"https://api.github.com/users/kcgthb/orgs","repos_url":"https://api.github.com/users/kcgthb/repos","events_url":"https://api.github.com/users/kcgthb/events{/privacy}","received_events_url":"https://api.github.com/users/kcgthb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-06T22:07:45Z","updated_at":"2017-10-06T22:07:45Z","closed_at":null,"author_association":"MEMBER","body":"Hi!\r\n\r\nWhen `installnic` is not set in the `noderes` table, the documentation states that the value will default to `primarynic`, and then to the `mac` keyword in case `primarynic` is not defined either.\r\n\r\nTurns out this is not really the case, as the default diskful install template (`mypostscript.tmpl`) does [this](https://github.com/xcat2/xcat-core/blob/master/xCAT-server/share/xcat/mypostscript/mypostscript.tmpl#L43):\r\n```\r\n:INSTALLNIC=#TABLE:noderes:$NODE:installnic#\r\n```\r\nSo if `installnic` is not defined in the `noderes` table, an empty `INSTALLNIC` environment variable is exported to the postinstall scripts.\r\n\r\nAs a consequence, the `xHRM` postinstall script fails when called without any argument, when `installnic` is not set, and exits with [\"Incorrect usage\"](https://github.com/xcat2/xcat-core/blob/master/xCAT-server/share/xcat/scripts/xHRM#L141):\r\n\r\n```\r\n# lsdef -c sh-hv01 -i installnic\r\nsh-hv01: installnic=\r\n\r\n# updatenode sh-hv01 -P \"xHRM bridgeprereq\"\r\nsh-hv01: xcatdsklspost: downloaded postscripts successfully\r\nsh-hv01: Fri Oct  6 15:07:24 PDT 2017 Running postscript: xHRM\r\nsh-hv01: Incorrect usage\r\nsh-hv01: postscript: xHRM exited with code 1\r\nsh-hv01: Running of postscripts has completed.\r\n```\r\n\r\n\r\n"}}
{"actor":{"display_login":"kcgthb"}}