Bug 484950

Summary: clear-db flag does'nt do whats it says it does in the --help
Product: Red Hat Satellite 5 Reporter: Pradeep Kilambi <pkilambi>
Component: InstallerAssignee: Michael Mráka <mmraka>
Status: CLOSED CURRENTRELEASE QA Contact: Ales Dujicek <adujicek>
Severity: medium Docs Contact:
Priority: low    
Version: 530CC: adujicek, dyordano, mmraka, tlestach, tsanders
Target Milestone: ---Keywords: Patch, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-setup-2.3.0-11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-13 09:55:04 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: 1127641    
Attachments:
Description Flags
patch none

Description Pradeep Kilambi 2009-02-10 20:24:03 UTC
Description of problem:

In ./install.pl --help, clear-db flag says 

    --clear-db
            Clear any pre-existing database schema before installing. This
            will destroy any data in the Satellite database and re-create
            empty Satellite schema.

but when you try using it, it says:

# ./install.pl  --clear-db
* 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.
The embedded database appears to be already installed. Either rerun
this script with the --skip-db-install option, or use the
'/usr/share/spacewalk/setup/oracle/remove-db.sh' script to remove the embedded database and try
again.

First --skip-db-install is not the right suggestion as I already know that there is a db I want to wipe and hence trying to use --clear-db. I guess the --clear-db should call remove-db.sh and do the needful. Instead of asking the user to run another script.

Comment 1 Jan Pazdziora (Red Hat) 2009-02-12 15:15:59 UTC
Reassigning to Jesus, the new Installer component owner.

Comment 15 Dimitar Yordanov 2014-02-04 22:15:01 UTC
Created attachment 859392 [details]
patch

Comment 16 Michael Mráka 2014-03-03 12:29:05 UTC
Patch applied to spacewalk master as 
commit a3dd46b2b99ac90cdc0a8b434c50d0b8c596072b
    484950 - clear-db flag does not do what in --help

Also fixed man page
commit 7e0268fddbe973434d13da97fa1cdc17df24b6aa
    484950 - updated description for --clear-db

Comment 17 Clifford Perry 2014-11-11 11:17:45 UTC
Assumption we got this in rebase. Moving to ON_QA for 5.7.

Comment 22 Clifford Perry 2015-01-13 09:55:04 UTC
With the release of Red Hat Satellite 5.7 on January 12th 2015 this bug is
being moved to a Closed Current Release state. 

The Satellite 5.7 GA Errata:
 - https://rhn.redhat.com/errata/RHSA-2015-0033.html 

Satellite 5.7 Release Notes:
 -
https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html-single/Release_Notes/index.html

Satellite Customer Portal Blog announcement for release:
 - https://access.redhat.com/blogs/1169563/posts/1315743 

Cliff