Bug 479826 - When osa-dispatcher is started, message about dbhome is shown
Summary: When osa-dispatcher is started, message about dbhome is shown
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.4
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space04
TreeView+ depends on / blocked
 
Reported: 2009-01-13 13:15 UTC by Jan Pazdziora (Red Hat)
Modified: 2009-01-22 16:31 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-01-22 16:31:39 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora (Red Hat) 2009-01-13 13:15:54 UTC
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 13:26:46 UTC
/usr/share/rhn/server/rhnSQL/driver_cx_Oracle.py is part of spacewalk-backend-sql

Comment 2 Jan Pazdziora (Red Hat) 2009-01-13 13:44:35 UTC
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 14:54:18 UTC
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 (Red Hat) 2009-01-15 11:10:14 UTC
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.