Bug 479826 - When osa-dispatcher is started, message about dbhome is shown
When osa-dispatcher is started, message about dbhome is shown
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
0.4
All Linux
low Severity low
: ---
: ---
Assigned To: Michael Mráka
Red Hat Satellite QA List
:
Depends On:
Blocks: space04
  Show dependency treegraph
 
Reported: 2009-01-13 08:15 EST by Jan Pazdziora
Modified: 2009-01-22 11:31 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-22 11:31:39 EST
Type: ---
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 Jan Pazdziora 2009-01-13 08:15:54 EST
Description of problem:

When osa0dispatcher is started the following message appears:

sh: dbhome: command not found

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

# rpm -q cx_Oracle
cx_Oracle-4.2.1-5.el5

How reproducible:

Deterministic.

Steps to Reproduce:
1. Unset ORACLE_HOME, as Spacewalk installation no longer sets ORACLE_HOME for root.
2. Run service osa-dispatcher start or any other Python program which connects to the database.
  
Actual results:

# service osa-dispatcher start
Starting osa-dispatcher: sh: dbhome: command not found
                                                           [  OK  ]
#

Expected results:

# service osa-dispatcher start
Starting osa-dispatcher:                                   [  OK  ]
#

Additional info:

The code which calls dbhome is in

/usr/share/rhn/server/rhnSQL/driver_cx_Oracle.py:

        if not os.environ.has_key("ORACLE_HOME"):
            os.environ["ORACLE_HOME"] = os.popen("dbhome '*'").read()

It probably should not be there, or it should check that /usr/bin/dbhome (?) exists before trying, or it should redirect stderr, or something.
Comment 1 Michael Mráka 2009-01-13 08:26:46 EST
/usr/share/rhn/server/rhnSQL/driver_cx_Oracle.py is part of spacewalk-backend-sql
Comment 2 Jan Pazdziora 2009-01-13 08:44:35 EST
Mean culpa. I'm sorry. Yes, the package and version which causes problems is indeed

# rpm -qf /usr/share/rhn/server/rhnSQL/driver_cx_Oracle.py
spacewalk-backend-sql-0.4.10-1.el5
Comment 3 Michael Mráka 2009-01-13 09:54:18 EST
Fixed in git
commit 1bc6f9bdb32408d90ebccad32f2cbb8f5aa93296
    Automatic commit of package [spacewalk-backend] release [0.4.13-1].
commit 3d89afc195a75346c78ce9657c0d0ab2fb0af84c
    479826 - removed dbhome (no need for ORACLE_HOME in instantclient)
Comment 4 Jan Pazdziora 2009-01-15 06:10:14 EST
Verified:

# rpm -q spacewalk-backend-sql
spacewalk-backend-sql-0.4.15-1.el5
# service osa-dispatcher start
Starting osa-dispatcher:                                   [  OK  ]

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