Bug 865842 - Users running mgo requires access to execute /proc/sys/kernel/hostname
Users running mgo requires access to execute /proc/sys/kernel/hostname
Status: CLOSED UPSTREAM
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
low Severity medium
: ---
: ---
Assigned To: Rob Millner
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-12 11:38 EDT by Nam Duong
Modified: 2015-05-14 19:00 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-17 15:49:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nam Duong 2012-10-12 11:38:31 EDT
Description of problem:
This is coming from a forum thread:  
https://openshift.redhat.com/community/forums/openshift/diy-cartridge-cannot-get-hostname-in-golang-required-for-popular-mongo-driver

There are a few users using http://labix.org/mgo which has hard-coded calls to /proc/sys/kernel/hostname (http://golang.org/src/pkg/os/sys_linux.go), and they need access to call it the same way as everything else calls /bin/hostname, but today, /proc/sys/kernel/hostname gets "permission denied".
Comment 1 Rob Millner 2012-10-16 20:32:38 EDT
Asked our SELinux experts for guidance on the least privileged way to do this.
Comment 2 Rob Millner 2012-10-17 15:49:04 EDT
The author of mgo has already resolved the issue in development and an upcoming release will resolve it.

Ref:
https://groups.google.com/forum/?fromgroups=#!topic/mgo-users/aFdX2tnkgr4

Note You need to log in before you can comment on or make changes to this bug.