Bug 852486 - rubygem-stickshift-node is running restorecon against /var/lib/stickshift
Summary: rubygem-stickshift-node is running restorecon against /var/lib/stickshift
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ram Ranganathan
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-28 17:07 UTC by Thomas Wiest
Modified: 2015-05-14 22:58 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-17 21:29:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Thomas Wiest 2012-08-28 17:07:13 UTC
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 06:14:45 UTC
@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 15:01:57 UTC
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 18:12:37 UTC
Ok -- will do that -- remove it from node.spec and add it to the ss-setup-node script.

Comment 4 Ram Ranganathan 2012-09-06 01:06:21 UTC
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 06:41:09 UTC
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 20:47:55 UTC
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 10:39:32 UTC
Move it to ON_QA since https://github.com/openshift/crankcase/pull/460 is merged

Comment 8 Jianwei Hou 2012-09-07 10:50:31 UTC
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 09:01:30 UTC
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.