Bug 751678

Summary: Installer (install.pl) should support symlink for /rhnsat
Product: Red Hat Satellite 5 Reporter: Ashish Humbe <ahumbe>
Component: InstallerAssignee: Jan Pazdziora (Red Hat) <jpazdziora>
Status: CLOSED CURRENTRELEASE QA Contact: Dimitar Yordanov <dyordano>
Severity: medium Docs Contact:
Priority: medium    
Version: 541CC: ahumbe, cperry, dyordano, jpazdziora, lpramuk, mkollar, xdmoon
Target Milestone: ---Keywords: FutureFeature, Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-setup-1.7.9-17-sat Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-21 09:19:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 818987    

Comment 5 Jan Pazdziora (Red Hat) 2012-08-01 07:21:31 UTC
Making bugzilla public.

Public summary:

RHN Satellite installer should support softlink for /rhnsat 

Currently RHN Satellite installer (install.pl) fails at database installation if the /rhnsat is linked (softlink) to any other directory. Installer should support softlink for /rhnsat

Steps to Reproduce:

1. Do fresh installation of RHEL system 
2. Create softlink for /rhnsat 
 mkdir /mnt/rhn-db
 ln -s /mnt/rhn-db /rhnsat

3. Run install.pl 
  
Actual results:

** Database:   /var/log/rhn/install_db.log
*** Progress: ########
Could not install database. 


Error message in install_db.log

<snip>

Attempting to create Oracle instance rhnsat ...
Username/Password access for this database will be rhnsat/rhnsat

Using ORACLE_HOME=/opt/apps/oracle/web/product/10.2.0/db_1

Unable to create data directory /rhnsat/data/rhnsat.  Please create and ensure
it can be read and written to by oracle:dba.

</snip>

Comment 6 Jan Pazdziora (Red Hat) 2012-08-01 07:24:35 UTC
Fixed in Spacewalk master, b24626a894273e5f80b185c853e4c38d32610e4e. We now chown to oracle the target of the symlink as well.

Comment 8 Jan Pazdziora (Red Hat) 2012-08-01 08:05:27 UTC
I should point out that for the "/rhnsat is symlink" setup to work, SELinux either needs to be in permissive mode with fixup and enforcing after installation, or the installation has to be left to fail, then the file contexts of the target of /rhnsat need to be set accordingly (semanage fcontext -a -e in RHEL 6 or something manual in RHEL 5) and the installation rerun. We did not attempt to support the full file context reset of the target directory structure of the /rhnsat.

Comment 11 Matej Kollar 2012-09-19 09:38:18 UTC
Re-verified. spacewalk-setup-1.7.9-21 on Satellite-5.5.0-RHEL6-re20120904.0-x86_64.iso:

> #  mkdir /mnt/rhn-db
> #  ln -s /mnt/rhn-db /rhnsat
> # ./install.pl
> * Starting the Red Hat Network Satellite installer.
> * Performing pre-install checks.
> * Pre-install checks complete.  Beginning installation.
> * RHN Registration.
> ** Registration: System is already registered with RHN.  Not re-registering.
> * Checking for uninstalled prerequisites.
> * Applying updates.
> * Installing RHN packages.
> * Now running spacewalk-setup.
> * Setting up Oracle environment.
> * Setting up database.
> ** Database: Installing the database:
> ** Database: This is a long process that is logged in:
> ** Database:   /var/log/rhn/install_db.log
> *** Progress: #############################
> ** Database: Installation complete.
> ** Database: Setting up database connection for Oracle backend.
> ** Database: Testing database connection.
> ** Database: Populating database.
> *** Progress: #######################################################
> * Setting up users and groups.
> ** GPG: Initializing GPG and importing key.
> You must enter an email address.
> Admin Email Address?
...
> # ls -l /rhnsat
> lrwxrwxrwx. 1 root root 11 Sep 18 12:04 /rhnsat -> /mnt/rhn-db

Comment 12 Clifford Perry 2012-09-21 09:19:41 UTC
This issue is resolved with the release of RHN Satellite 5.5. 

As of September 20th 2012, RHN Satellite 5.5 has been generally available. 

Release Notes and other 5.5 documentation can be found here:

 https://access.redhat.com/knowledge/docs/Red_Hat_Network_Satellite/

The associated Errata for the 5.5 release are:

5.5 Satellite GA Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1296.html

5.5 Upgrade Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1298.html

5.5 RHN Proxy GA Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1297.html

5.5 RHN Tools GA Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1299.html

Regards,
Clifford
- Engineering Manager, Satellite