Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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
Modified: 2009-01-22 16:31 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-22 16:31:39 UTC


Attachments (Terms of Use)

Description Jan Pazdziora 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 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 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.