Bug 927753 - [RHS-C] "rhsc-setup" fails if run for the second time without doing "rhsc-cleanup"
Summary: [RHS-C] "rhsc-setup" fails if run for the second time without doing "rhsc-cle...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhsc
Version: 2.0
Hardware: x86_64
OS: All
medium
medium
Target Milestone: ---
: RHGS 2.1.2
Assignee: Aravinda VK
QA Contact: Prasanth
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-26 11:56 UTC by Prasanth
Modified: 2015-05-15 18:20 UTC (History)
9 users (show)

Fixed In Version: 2.1.2.0 cb5
Doc Type: Bug Fix
Doc Text:
Previously, the rhsc-setup command was failing to get engine database password when run for the second time without running rhsc-cleanup command. Now, with this update, no error is displayed when the command is run second time.
Clone Of:
Environment:
Last Closed: 2014-02-25 07:27:32 UTC
Embargoed:


Attachments (Terms of Use)
ovirt-engine logs (36.61 KB, application/x-tar)
2013-03-26 11:58 UTC, Prasanth
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:0208 0 normal SHIPPED_LIVE Red Hat Storage 2.1 enhancement and bug fix update #2 2014-02-25 12:20:30 UTC
oVirt gerrit 15380 0 None None None Never

Description Prasanth 2013-03-26 11:56:13 UTC
Description of problem:

"rhsc-setup" fails if run for the second time without doing "rhsc-cleanup"


Version-Release number of selected component (if applicable): rhsc-2.0.techpreview1-3.el6rhs.noarch


How reproducible: Always


Steps to Reproduce:
1. Install rhsc and run "rhsc-setup"
2. After successful installation, run "rhsc-setup" again
3.
  
Actual results: 

It allows the users to continue with the setup and prompts for "Password for user engine", but it won't accepts/rejects the password and finally the setup fails. See below:

-----------------------------------
# rhsc-setup 
Welcome to Red Hat Storage Console setup utility

WARNING: Red Hat Storage Console setup has already been run on this host.
To remove all configuration and reset Red Hat Storage Console please run engine-cleanup.
Please be advised that executing engine-setup without cleanup is not supported.
Would you like to proceed? (yes|no): yes

In order to proceed the installer must stop the JBoss service
Would you like to stop the JBoss service? (yes|no): yes
Stopping JBoss... ovirt uses httpd to proxy requests to the application server.
It looks like the httpd installed locally is being actively used.
The installer can override current configuration .
Alternately you can use JBoss directly (on ports higher than 1024)
Do you wish to override current httpd configuration and restart the service? ['yes'| 'no']  [yes] : 
HTTP Port  [80] : 
HTTPS Port  [443] : 
Host fully qualified domain name, note that this name should be fully resolvable  [qa-vm04.lab.eng.blr.redhat.com] : 
Password for Administrator (admin@internal) :
Warning: Weak Password.
Confirm password :
Organization Name for the Certificate: redhat
The default storage type you will be using  ['NFS'| 'FC'| 'ISCSI']  [NFS] : 
Enter DB type for installation ['remote'| 'local']  [local] : 
Local database password :
Warning: Weak Password.
Confirm password :
Should the installer configure NFS share on this server to be used as an ISO Domain? ['yes'| 'no']  [yes] : no
Firewall ports need to be opened.
You can let the installer configure iptables automatically overriding the current configuration. The old configuration will be backed up.
Alternately you can configure the firewall later using an example iptables file found under /usr/share/ovirt-engine/conf/iptables.example
Configure iptables ? ['yes'| 'no']: yes

Red Hat Storage Console will be installed using the following configuration:
============================================================================
override-httpd-config:         yes
http-port:                     80
https-port:                    443
host-fqdn:                     qa-vm04.lab.eng.blr.redhat.com
auth-pass:                     ********
org-name:                      redhat
default-dc-type:               NFS
db-remote-install:             local
db-local-pass:                 ********
config-nfs:                    no
override-iptables:             yes
Proceed with the configuration listed above? (yes|no): yes

Installing:
Configuring Red Hat Storage Console...                   [ DONE ]
Creating CA...                                           [ DONE ]
Editing JBoss Configuration...                           [ DONE ]
Setting Database Configuration...                        [ DONE ]
Upgrading Database Schema...Password for user engine: 
Password for user engine: 
Password for user engine: 
Password for user engine: 
Password for user engine: 
Password for user engine: 
Password for user engine: 
Password for user engine: Password for user engine: 
^C                          [ ERROR ]

Please check log file /var/log/ovirt-engine/engine-setup_2013_03_26_16_27_18.log for more information
-----------------------------------


Expected results: If 2nd time rhsc-setup is NOT supported/allowed without running rhsc-cleanup, we shouldn't allow the users to proceed further by entering "Yes". It should fail after the following message itself:

"Please be advised that executing engine-setup without cleanup is not supported."



Additional info: Logs will be attached.

Comment 1 Prasanth 2013-03-26 11:58:25 UTC
Created attachment 716462 [details]
ovirt-engine logs

Comment 3 Prasanth 2013-03-26 12:19:29 UTC
engine-db-install.log says the following:


[engine-db-install] verifying postgres service exists.
[engine-db-install] init postgres db.
[engine-db-install] psgql db already been initialized.
[engine-db-install] changing authentication scheme from peer to ident.
[engine-db-install] changing authentication scheme from ident to trust.
[engine-db-install] stop postgres service.
Stopping postgresql service: [  OK  ]^M
[engine-db-install] starting postgres service.
Starting postgresql service: [  OK  ]^M
[engine-db-install] validating that postgres service is running...retry 1
 ?column?
----------
        1
(1 row)

[engine-db-install] checking if engine db exists already..
psql: FATAL:  database "engine" does not exist
[engine-db-install] engine not installed.
[engine-db-install] updating db admin credentials
ERROR:  role "engine" cannot be dropped because some objects depend on it
DETAIL:  owner of database engine_2013_03_26_16_28_58
748 objects in database engine_2013_03_26_16_28_58

Comment 4 Aravinda VK 2013-06-05 10:29:14 UTC
Upstream patch sent and is under review.
http://gerrit.ovirt.org/#/c/15380/

Comment 5 Sahina Bose 2013-06-11 08:32:29 UTC
Engine-setup being rewritten, will be available for Corbett

Comment 6 Aravinda VK 2013-10-23 06:11:15 UTC
engine-setup in upstream is rewritten, so abandoning my patch in upstream.

Fixed in version: 2.1.2.0 cb5

new rhsc-setup will not fail when run second time.

Comment 7 Dustin Tsang 2013-10-28 17:41:50 UTC
verified in rhsc-cb5. rhsc-setup does not prompt for passwords the second time rhsc-setup is run.

Comment 8 Shalaka 2014-01-06 11:22:49 UTC
Please review the edited DocText and confirm.

Comment 9 Aravinda VK 2014-01-06 11:27:03 UTC
doctext looks good to me.

Comment 11 errata-xmlrpc 2014-02-25 07:27:32 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-2014-0208.html


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