Bug 852486 - rubygem-stickshift-node is running restorecon against /var/lib/stickshift
rubygem-stickshift-node is running restorecon against /var/lib/stickshift
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Ram Ranganathan
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-28 13:07 EDT by Thomas Wiest
Modified: 2015-05-14 18:58 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-17 17:29:05 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 Thomas Wiest 2012-08-28 13:07:13 EDT
Description of problem:
rubygem-stickshift-node is running restorecon against /var/lib/stickshift and shouldn't be.

This is probably causing issues that will need to be corrected with rhc-restorecon.

This is also the cause of the over 1 hour update runs on the c9 nodes. So it'd be nice if the fix was to remove this completely.


Version-Release number of selected component (if applicable):
rubygem-stickshift-node-0.15.7-1.el6_3.noarch


How reproducible:
Very


Steps to Reproduce:
1. Run:  rpm -q rubygem-stickshift-node --scripts
2. Notice the line that says this:  restorecon -r /var/lib/stickshift

  
Actual results:
It's running restorecon against /var/lib/stickshift


Expected results:
It should not be running restorecon against /var/lib/stickshift
Comment 1 Ram Ranganathan 2012-09-05 02:14:45 EDT
@kraman made that fix to add /var/lib/stickshift as part of commit bf9987ce 
-- not sure what the reason was -- the log says to get devenv running.  Krishna?

bf9987ce (Krishna Raman   2012-03-07 10:06:02 -0800  123) /sbin/restorecon /var/lib/stickshift || :
bf9987ce (Krishna Raman   2012-03-07 10:06:02 -0800  126) /sbin/restorecon /var/lib/stickshift/.httpd.d/ || :

Heads up, am going to be removing those 2 lines in the next couple of days -- afaics, its not needed but feel free to holler if you feel otherwise!!
Comment 2 Krishna Raman 2012-09-05 11:01:57 EDT
Was added for the Origin to fix file permissions. If you remove it, will need to add a restorecon to ss-setup-node script.
Comment 3 Ram Ranganathan 2012-09-05 14:12:37 EDT
Ok -- will do that -- remove it from node.spec and add it to the ss-setup-node script.
Comment 4 Ram Ranganathan 2012-09-05 21:06:21 EDT
Fixed with pull requests:  
   https://github.com/openshift/li/pull/344
   https://github.com/openshift/crankcase/pull/456
Comment 5 Jianwei Hou 2012-09-06 02:41:09 EDT
Tested on devenv_2119

Steps:
1. Run:  rpm -q rubygem-stickshift-node --scripts
[root@ip-10-190-85-85 ~]# rpm -q rubygem-stickshift-node --scripts
postinstall scriptlet (using /bin/sh):
echo "/usr/bin/ss-trap-user" >> /etc/shells
restorecon -r /var/lib/stickshift

# copying this file in the post hook so that this file can be replaced by rhc-node
# copy this file only if it doesn't already exist
if ! [ -f /etc/stickshift/resource_limits.conf ]; then
  cp -f /etc/stickshift/resource_limits.template /etc/stickshift/resource_limits.conf
fi

2. Run:  rpm -q rhc-node --scripts
There is no line as: "restorecon -r /var/lib/stickshift"

Since reproduced the problem, assign it back
Comment 6 Ram Ranganathan 2012-09-06 16:47:55 EDT
Good catch Hou.  

So Thomas, looks like it was being done a couple of times.

Ugg, we seem to have these scattered across the place ... 

One more fix in pull request: 
https://github.com/openshift/crankcase/pull/460
Comment 7 Xiaoli Tian 2012-09-07 06:39:32 EDT
Move it to ON_QA since https://github.com/openshift/crankcase/pull/460 is merged
Comment 8 Jianwei Hou 2012-09-07 06:50:31 EDT
Verified on devenv_2132

Steps:
1. Run:  rpm -q rubygem-stickshift-node --scripts
2. Run:  rpm -q rhc-node --scripts

Result:
There is no line as: "restorecon -r /var/lib/stickshift"
Comment 9 Jianwei Hou 2012-09-10 05:01:30 EDT
Verified on devenv_2140

Steps:
1. Run:  rpm -q rubygem-stickshift-node --scripts

postinstall scriptlet (using /bin/sh):
echo "/usr/bin/ss-trap-user" >> /etc/shells

# copying this file in the post hook so that this file can be replaced by rhc-node
# copy this file only if it doesn't already exist
if ! [ -f /etc/stickshift/resource_limits.conf ]; then
  cp -f /etc/stickshift/resource_limits.template /etc/stickshift/resource_limits.conf
fi


2. Run:  rpm -q rhc-node --scripts
No restorecon against /var/lib/stickshift
There is no line as: "restorecon -r /var/lib/stickshift"

So move this bug to verified.

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