Bug 1011625 - Installer needlessly asks for Oracle db hostname and port
Summary: Installer needlessly asks for Oracle db hostname and port
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Spacewalk
Classification: Community
Component: Installation
Version: 2.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space27
TreeView+ depends on / blocked
 
Reported: 2013-09-24 16:23 UTC by Lukas Pramuk
Modified: 2017-09-28 18:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1011646 (view as bug list)
Environment:
Last Closed: 2013-09-25 11:38:43 UTC
Embargoed:


Attachments (Terms of Use)

Description Lukas Pramuk 2013-09-24 16:23:15 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Install oracle db listening on <hostname> nic
2. Create /etc/tnsnames.ora and define an oracle service name
# vim /etc/tnsnames.ora 
the_oracle =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = <fqdn>)(PORT = 1522))
    )
    (CONNECT_DATA =
      (SID = xrhnsatx)
    )
  )

3. Run installer a provide db connect info either as service name or as db name + host + port
# ./install.pl --external-oracle
* Starting the Spacewalk 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.
* Installing RHN packages.
* Now running spacewalk-setup.
* Setting up Selinux..
* Setting up Oracle environment.
* Setting up database.
** Database: Setting up database connection for Oracle backend.
'' is not a valid response
Database hostname [localhost]? 
'' is not a valid response
Database (listener) port [1521]? 
*** Database connection error: ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach)
Database service name (SID)? the_oracle
*** Database connection error: ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin)
Username? spaceuser
Password? 
** Database: Testing database connection.
** Database: Populating database.

>>> though installer allows you to specify service name and credentials, still needlessly asks for a hostname and a port before  (not needed when using service name)


# ./install.pl --external-oracle
* Starting the Spacewalk 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.
* Installing RHN packages.
* Now running spacewalk-setup.
* Setting up Selinux..
* Setting up Oracle environment.
* Setting up database.
** Database: Setting up database connection for Oracle backend.
'' is not a valid response
Database hostname [localhost]? <fqdn>
'' is not a valid response
Database (listener) port [1521]? 1522
*** Database connection error: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (DBD ERROR: OCIServerAttach)
Database service name (SID)? xrhnsatx.world
Database hostname [localhost]? <fqdn>
Database (listener) port [1521]? 1522
*** Database connection error: ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin)
Username? spaceuser
Password? 
** Database: Testing database connection.
** Database: Populating database.

>>> when you specify db name, installer correctly asks also for hostname and port, resulting in user being asked twice for the same input. 

Actual results:
- too early and needlesly asking for hostname and port before the decisive input is provided by user (service name vs. db name)
- complaints "'' is not a valid response" are displayed
- errors from conection trials are displayed

Expected results:
- asks for service name or db name prior any other input about db connection details 
- no mess displayed


Additional info:

Comment 1 Lukas Pramuk 2013-09-25 11:38:43 UTC
All described misbehavior in previous comment are not valid. Please disregard this BZ. 

It was caused by presence of spacewalk-config package that I didn't remove between different installation tries.

Comment 2 Eric Herget 2017-09-28 18:10:49 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.


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