Bug 1471920
| Summary: | Unable to run tgtd inside a docker container due to ECCESS on oom_score_adj | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Daniel Berrangé <berrange> | ||||
| Component: | scsi-target-utils | Assignee: | Andy Grover <agrover> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 26 | CC: | agrover, mchristi, terje.rosten | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | scsi-target-utils-1.0.70-2.fc26 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2017-08-09 15:57:32 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
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. |
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