Bug 865473

Summary: useradd: cannot create directory /opt/rh/devtoolset-1.1/root/usr/var/lib/stap-server
Product: Red Hat Developer Toolset Reporter: Michal Kovarik <mkovarik>
Component: systemtapAssignee: Frank Ch. Eigler <fche>
Status: CLOSED ERRATA QA Contact: Martin Cermak <mcermak>
Severity: medium Docs Contact:
Priority: medium    
Version: DTS 1.1 RHEL 6CC: borgan, drieden, ljozsa, mcermak, mnewsome
Target Milestone: beta2   
Target Release: 1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemtap-1.8-8.el6 Doc Type: Bug Fix
Doc Text:
Prior versions of the systemtap-server subpackage relied on useradd(8) to create a home directory for the stap-server user, but in some cases this was prevented by selinux or other configuration. Current versions instead create the .../var/lib/stap-server directory within the RPM, so useradd's constraints are not applied.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-22 14:34:41 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:

Description Michal Kovarik 2012-10-11 14:17:43 UTC
Description of problem:
Postscript error

[root@system1 ~]# yum --enablerepo=rhel-workstation-dts-6-rhb-rpms reinstall devtoolset-1.1-systemtap-server-1.8-7.el6.x86_64
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Setting up Reinstall Process
rhel-6-workstation-rpms                                  | 3.7 kB     00:00     
rhel-workstation-dts-6-rhb-rpms                          | 2.9 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package devtoolset-1.1-systemtap-server.x86_64 0:1.8-7.el6 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                 Arch   Version   Repository                       Size
================================================================================
Reinstalling:
 devtoolset-1.1-systemtap-server
                         x86_64 1.8-7.el6 rhel-workstation-dts-6-rhb-rpms 186 k

Transaction Summary
================================================================================
Reinstall     1 Package(s)

Total download size: 186 k
Installed size: 782 k
Is this ok [y/N]: y
Downloading Packages:
devtoolset-1.1-systemtap-server-1.8-7.el6.x86_64.rpm     | 186 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : devtoolset-1.1-systemtap-server-1.8-7.el6.x86_64             1/1 
useradd: cannot create directory /opt/rh/devtoolset-1.1/root/usr/var/lib/stap-server
warning: user stap-server does not exist - using root
runuser: user stap-server does not exist
rhel-workstation-dts-6-rhb-rpms/productid                | 1.7 kB     00:00     
Installed products updated.
  Verifying  : devtoolset-1.1-systemtap-server-1.8-7.el6.x86_64             1/1 

Installed:
  devtoolset-1.1-systemtap-server.x86_64 0:1.8-7.el6                            

Complete!


Version-Release number of selected component (if applicable):
RHEL-6.3 Workstation x86_64
devtoolset-1.1-systemtap-server-1.8-7.el6.x86_64

How reproducible:
Always

Comment 1 Frank Ch. Eigler 2012-10-11 14:20:39 UTC
Please try again with selinux "# setenforce 0" in effect during installation.  This is a perennial problem, see bug #853456, bug #863832, ....

Comment 3 Frank Ch. Eigler 2012-10-11 14:56:22 UTC
By the way, I'm unable to reproduce this on my rhel6 VM; can you identify your selinux* version numbers?

Comment 4 Ladislav Jozsa 2012-10-11 15:45:57 UTC
I had the same problem with i386 workstation variant. Turning off selinux didn't help.

[root@hp-dl360g5-01 tmp]# setenforce 0
[root@hp-dl360g5-01 tmp]# getenforce 
Permissive
[root@hp-dl360g5-01 tmp]# yum --disablerepo='rhel-source-beta' --enablerepo=rhel-workstation-dts-6-rhb-rpms reinstall devtoolset-1.1-systemtap-server-1.8-7.el6.i686
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Setting up Reinstall Process
rhel-6-workstation-rpms                                  | 3.7 kB     00:00     
rhel-workstation-dts-6-rhb-rpms                          | 2.9 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package devtoolset-1.1-systemtap-server.i686 0:1.8-7.el6 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                   Arch Version   Repository                       Size
================================================================================
Reinstalling:
 devtoolset-1.1-systemtap-server
                           i686 1.8-7.el6 rhel-workstation-dts-6-rhb-rpms 186 k

Transaction Summary
================================================================================
Reinstall     1 Package(s)

Total download size: 186 k
Installed size: 762 k
Is this ok [y/N]: y
Downloading Packages:
devtoolset-1.1-systemtap-server-1.8-7.el6.i686.rpm       | 186 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : devtoolset-1.1-systemtap-server-1.8-7.el6.i686               1/1 
useradd: cannot create directory /opt/rh/devtoolset-1.1/root/usr/var/lib/stap-server
warning: user stap-server does not exist - using root
runuser: user stap-server does not exist
Installed products updated.
  Verifying  : devtoolset-1.1-systemtap-server-1.8-7.el6.i686               1/1 

Installed:
  devtoolset-1.1-systemtap-server.i686 0:1.8-7.el6                              

Complete!

[root@hp-dl360g5-01 tmp]# rpm -q selinux-policy
selinux-policy-3.7.19-154.el6.noarch

Comment 5 Michal Kovarik 2012-10-11 15:49:50 UTC
I reproduced it on RHEL-6.3 Server x86_64 with "setenforce 0".

Comment 6 Debi Rieden 2012-10-11 17:49:56 UTC
Hi Michal, can Frank log into your machine to see the behavior?

Comment 8 Frank Ch. Eigler 2012-10-11 18:19:49 UTC
devel_ack+, speculating that the explicit mkdir/%dir suggestion from bug #863832 cures this too.

Comment 9 Frank Ch. Eigler 2012-10-11 18:54:21 UTC
A build is available in brew; please check it out.  (Please note I have been unable to reproduce this problem myself, so am guessing that the change in 1.8-8 might help.)

Comment 16 Martin Cermak 2012-10-25 09:42:05 UTC
Ok; Based on Comment #13 setting VERIFIED. Thanks.

Comment 18 errata-xmlrpc 2013-01-22 14:34:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-0179.html