Description of problem: If running tgtd inside a docker container, it will immediately exit on startup because it lacks permissions to change oom_score_adj, even if running as root in the container. stat("/proc/self/oom_score_adj", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 open("/proc/self/oom_score_adj", O_WRONLY) = 8 write(8, "-1000\n", 6) = -1 EACCES (Permission denied) write(2, "can't adjust oom-killer's pardon"..., 77can't adjust oom-killer's pardon /proc/self/oom_score_adj, Permission denied ) = 77 close(8) = 0 exit_group(1) = ? +++ exited with 1 +++ Latest upstream has added check to avoid this problem a year ago https://github.com/fujita/tgt/commit/d27320f7cdd9eef7a257b42f4bd6816efb106259 for some reason Fedora 26 version is lagging behind upstream by ~ 2 years so is lacking this fix :-( Version-Release number of selected component (if applicable): scsi-target-utils-1.0.55-6.fc26.x86_64
FWIW an updated version 1.0.70 is available for F25, but upstream has unresolved issues building with F26's GCC 7. Let me work on resolving those and we should be able to get F26 more current.
Created attachment 1301664 [details] Fix build on Fedora 26
That patch is what I used to let it build cleanly on F26
scsi-target-utils-1.0.70-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-fa34b3107e
Thanks, Daniel!
scsi-target-utils-1.0.70-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-fa34b3107e
scsi-target-utils-1.0.70-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.