{"action":"created","issue":{"url":"https://api.github.com/repos/PBSPro/pbspro/issues/848","repository_url":"https://api.github.com/repos/PBSPro/pbspro","labels_url":"https://api.github.com/repos/PBSPro/pbspro/issues/848/labels{/name}","comments_url":"https://api.github.com/repos/PBSPro/pbspro/issues/848/comments","events_url":"https://api.github.com/repos/PBSPro/pbspro/issues/848/events","html_url":"https://github.com/PBSPro/pbspro/pull/848","id":371879841,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0MjI2MDc1","number":848,"title":"Add openSUSE 15 CI and remove all old hacks from Travis","user":{"login":"hirenvadalia","id":17191391,"node_id":"MDQ6VXNlcjE3MTkxMzkx","avatar_url":"https://avatars2.githubusercontent.com/u/17191391?v=4","gravatar_id":"","url":"https://api.github.com/users/hirenvadalia","html_url":"https://github.com/hirenvadalia","followers_url":"https://api.github.com/users/hirenvadalia/followers","following_url":"https://api.github.com/users/hirenvadalia/following{/other_user}","gists_url":"https://api.github.com/users/hirenvadalia/gists{/gist_id}","starred_url":"https://api.github.com/users/hirenvadalia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hirenvadalia/subscriptions","organizations_url":"https://api.github.com/users/hirenvadalia/orgs","repos_url":"https://api.github.com/users/hirenvadalia/repos","events_url":"https://api.github.com/users/hirenvadalia/events{/privacy}","received_events_url":"https://api.github.com/users/hirenvadalia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-10-19T09:35:44Z","updated_at":"2018-10-19T15:29:15Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/PBSPro/pbspro/pulls/848","html_url":"https://github.com/PBSPro/pbspro/pull/848","diff_url":"https://github.com/PBSPro/pbspro/pull/848.diff","patch_url":"https://github.com/PBSPro/pbspro/pull/848.patch"},"body":"<!--- Please review your changes in preview mode -->\r\n<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n#### Bug/feature Description\r\n* Add openSUSE 15 CI\r\n* Remove all old hacks from Travis files as those are not required anymore\r\n* Fix recently added gcc warnings on openSUSE 15 CI\r\n* Add `hostname` package as install deps in openSUSE 15 which provides `hostname` command required by PBS init script\r\n* Fixed pbs_benchpress command for becoming session leader when started by `docker exec` or `docker run`\r\n\r\n#### Affected Platform(s)\r\n* All Linux\r\n\r\n#### Cause / Analysis / Design\r\n* `qstat.c` - gcc buffer overflow warning\r\n  ```\r\n   ../../../src/cmds/qstat.c:1131:18: error: '%3ld' directive writing between 3 and 13 bytes into a region of size 9 [-Werror=format-overflow=]\r\n       sprintf(rtn, \"%3ld \", percexp);\r\n                    ^~~~\r\n   ../../../src/cmds/qstat.c:1131:17: note: directive argument in the range [-214748364800, 214748364800]\r\n       sprintf(rtn, \"%3ld \", percexp);\r\n                    ^~~~~~~\r\n   ../../../src/cmds/qstat.c:1131:4: note: 'sprintf' output between 5 and 15 bytes into a destination of size 9\r\n       sprintf(rtn, \"%3ld \", percexp);\r\n       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n  ```\r\n* `job_info.c` - gcc misleading-indentation warning\r\n  ```\r\n   ../../../src/scheduler/job_info.c:5172:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]\r\n        if (find_resource_req(job->resreq, inp->err->rdef));\r\n        ^~\r\n   ../../../src/scheduler/job_info.c:5173:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'\r\n         return 1;\r\n         ^~~~~~\r\n  ```\r\n* Any command started by `docker run` or `docker exec` in container is already session leader for that session so calling os.setpgrp() fails with operation not permitted since it is already session leader\r\n  ```\r\n  XXXX@XXXX:~/code/pbspro$ docker run --privileged -it --rm -h testdev.pbspro.com centos:7 python -c 'import os; print os.getpid(); print os.getpgrp(); os.setpgrp()'\r\n  1\r\n  1\r\n  Traceback (most recent call last):\r\n    File \"<string>\", line 1, in <module>\r\n  OSError: [Errno 1] Operation not permitted\r\n  XXXX@XXXX:~/code/pbspro$ docker run --privileged -it -d --rm -h testdev.pbspro.com --name testdev centos:7 bash\r\n  b139a322c3e9496578eac4102289453ae5d0de584a9eaf8a8d9350b4912b845d\r\n  XXXX@XXXX:~/code/pbspro$ docker exec -it testdev python -c 'import os; print os.getpid(); print \r\n  os.getpgrp(); os.setpgrp()'\r\n  16\r\n  16\r\n  Traceback (most recent call last):\r\n    File \"<string>\", line 1, in <module>\r\n  OSError: [Errno 1] Operation not permitted\r\n  XXXX@XXXX:~/code/pbspro$ \r\n  ```\r\n* In openSUSE 15 `hostname` command is provided by package called `hostname` and it is not installed by default in openSUSE 15 container image\r\n\r\n#### Solution Description\r\n* Removed all hacks for Travis which we did in past\r\n* Added openSUSE 15 CI\r\n* Fixed gcc warnings (by using pbs_asprintf() instead sprintf() in qstat.c and by removing `;` in job_info.c)\r\n* Fixed pbs_benchpress not to become session leader if already\r\n* Added `hostname` package as install dependency in pbspro.spec{.in} for openSUSE15\r\n\r\n\r\n#### Testing logs/output\r\n* Not required since this PR is about to add new supported platform in CI\r\n\r\n#### Checklist:\r\n<!--- Use the preview button to see the checkboxes/links properly. -->\r\n<!--- Go over the following points, and put an `x` (without spaces around it) in the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] I have joined the **[pbspro community forum](http://community.pbspro.org/)**.\r\n- [x] My pull request contains a **single, signed** commit. See **[setting up gpg signature](https://pbspro.atlassian.net/wiki/display/DG/Signing+Your+Git+Commits)**.\r\n- [x] My code follows the **[coding style](https://pbspro.atlassian.net/wiki/display/DG/Coding+Standards)** of this project.\r\n- [ ] My change requires project documentation. See **[required documentation checklist](https://pbspro.atlassian.net/wiki/display/DG/Checklist+for+Developing+Features+and+Bug+Fixes)** for details.\r\n   - [ ] I have added documentation in the **[project documentation area](https://pbspro.atlassian.net/wiki/display/PD)**.\r\n- [ ] I have added new **PTL test(s) to my commit**. (See **[using PTL for testing](https://pbspro.atlassian.net/wiki/display/DG/Using+PTL+for+Testing)**) *(or)*\r\n   - [ ] I have added  **manual test(s) to this pull request and explained why PTL is not appropriate** for this case.\r\n- [x] All new and existing automated tests have passed. (See **[running automated PTL tests](https://pbspro.atlassian.net/wiki/display/DG/PTL+Quick+Start+Guide)**).\r\n- [ ] I have attached **test logs to this pull request** as evidence of testing/verification.\r\n\r\n\r\n__***For further information please visit the [Developer Guide Home](https://pbspro.atlassian.net/wiki/display/DG/Developer+Guide+Home).***__\r\n"},"comment":{"url":"https://api.github.com/repos/PBSPro/pbspro/issues/comments/431402476","html_url":"https://github.com/PBSPro/pbspro/pull/848#issuecomment-431402476","issue_url":"https://api.github.com/repos/PBSPro/pbspro/issues/848","id":431402476,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTQwMjQ3Ng==","user":{"login":"mike0042","id":2702535,"node_id":"MDQ6VXNlcjI3MDI1MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/2702535?v=4","gravatar_id":"","url":"https://api.github.com/users/mike0042","html_url":"https://github.com/mike0042","followers_url":"https://api.github.com/users/mike0042/followers","following_url":"https://api.github.com/users/mike0042/following{/other_user}","gists_url":"https://api.github.com/users/mike0042/gists{/gist_id}","starred_url":"https://api.github.com/users/mike0042/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike0042/subscriptions","organizations_url":"https://api.github.com/users/mike0042/orgs","repos_url":"https://api.github.com/users/mike0042/repos","events_url":"https://api.github.com/users/mike0042/events{/privacy}","received_events_url":"https://api.github.com/users/mike0042/received_events","type":"User","site_admin":false},"created_at":"2018-10-19T15:29:15Z","updated_at":"2018-10-19T15:29:15Z","author_association":"COLLABORATOR","body":"@hirenvadalia : I think we should use Travis to build on as many different OSs as possible (up to five) and perform the sanitize and debug builds in-house as part of our QA process. Others may disagree, but this is something that can easily be changed. I think taking this approach would allow Travis CI to detect the most problems, which is exactly the reason we utilize it."}}
{"actor":{"display_login":"mike0042"}}