Bug 865473 - useradd: cannot create directory /opt/rh/devtoolset-1.1/root/usr/var/lib/stap-server
useradd: cannot create directory /opt/rh/devtoolset-1.1/root/usr/var/lib/stap...
Status: CLOSED ERRATA
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: systemtap (Show other bugs)
DTS 1.1 RHEL 6
Unspecified Unspecified
medium Severity medium
: beta2
: 1.1
Assigned To: Frank Ch. Eigler
Martin Cermak
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-11 10:17 EDT by Michal Kovarik
Modified: 2013-01-22 09:34 EST (History)
5 users (show)

See Also:
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 09:34:41 EST
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 Michal Kovarik 2012-10-11 10:17:43 EDT
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 10:20:39 EDT
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 10:56:22 EDT
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 11:45:57 EDT
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 11:49:50 EDT
I reproduced it on RHEL-6.3 Server x86_64 with "setenforce 0".
Comment 6 Debi Rieden 2012-10-11 13:49:56 EDT
Hi Michal, can Frank log into your machine to see the behavior?
Comment 8 Frank Ch. Eigler 2012-10-11 14:19:49 EDT
devel_ack+, speculating that the explicit mkdir/%dir suggestion from bug #863832 cures this too.
Comment 9 Frank Ch. Eigler 2012-10-11 14:54:21 EDT
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 05:42:05 EDT
Ok; Based on Comment #13 setting VERIFIED. Thanks.
Comment 18 errata-xmlrpc 2013-01-22 09:34:41 EST
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

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