Bug 1449124 - spacewalk-debug (on external Oracle) output contains: /sbin/runuser: warning: cannot change directory to /opt/apps/oracle: No such file or directory
Summary: spacewalk-debug (on external Oracle) output contains: /sbin/runuser: warning:...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Jan Hutař
URL:
Whiteboard:
Depends On:
Blocks: sat58-errata
TreeView+ depends on / blocked
 
Reported: 2017-05-09 09:23 UTC by Jan Hutař
Modified: 2017-10-19 11:57 UTC (History)
3 users (show)

Fixed In Version: spacewalk-backend-2.5.3-152-sat spacewalk-web-2.5.2-12-sat spacewalk-2.5.0-12-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-19 11:57:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2915 0 normal SHIPPED_LIVE Red Hat Satellite 5.8.0 bug fix update 2017-10-19 15:56:50 UTC

Description Jan Hutař 2017-05-09 09:23:42 UTC
Description of problem:
spacewalk-debug output contains: /sbin/runuser: warning: cannot change directory to /opt/apps/oracle: No such file or directory


Version-Release number of selected component (if applicable):
spacewalk-backend-tools-2.5.3-121.el6sat.noarch


How reproducible:
always


Steps to Reproduce:
1. Have satellite on external Oracle
2. # spacewalk-debug


Actual results:
# spacewalk-debug
Collecting and packaging relevant diagnostic information.
Warning: this may take some time...
    * copying configuration information
    * copying logs
    * copying config-defaults files
    * copying cobbler files
    * copying ssl-build
    * copying /etc/sudoers*
    * copying apache, postgres, tomcat entries from /etc/passwd
    * copying apache, postgres, tomcat entries from /etc/group
    * querying RPM database (versioning of Spacewalk, etc.)
    * querying schema version, database charactersets and database
/sbin/runuser: warning: cannot change directory to /opt/apps/oracle: No such file or directory
    * querying users timezone and localization preferences
    * get diskspace available
    * get database statistics
    * get schema statistics
    * copying audit.log
    * copying tasko/sat
    * timestamping
    * creating tarball (may take some time): /tmp/spacewalk-debug.tar.bz2
    * removing temporary debug tree

Debug dump created, stored in /tmp/spacewalk-debug.tar.bz2


Expected results:
There should be no "No such file or directory" in the tool's output


Additional info:
rhn.conf contains:

db_backend = oracle
db_user = rhnsat
db_password = rhnsat
db_name = //guest:1522/rhnsat.world
db_host = guest
db_port = 1522
db_ssl_enabled =

Comment 2 Tomáš Kašpárek 2017-08-02 07:56:12 UTC
I've managed to reproduce this issue - in fact there's even simpler reproducer than running spacewalk-debug.

if [ -f /usr/bin/db-control ] ; then
    /usr/bin/db-control report > $DIR/db-control-report
fi

The issue is actually in db-control which should not be present on machines with Oracle - this may be possible for satellites upgraded from 5.5 and earlier versions.

There's actually issue with db-control report not working with Oracle at all:
# /usr/bin/db-control report
/sbin/runuser: warning: cannot change directory to /opt/apps/oracle: No such file or directory
Error: The database must be running to get a space report.

As part of fix I am going to change: run db-control report only with PG database in spacewalk-debug.

Shall I also add obsolete for spacewalk-dobby into spacewalk-oracle package? Or is there any reason why we should keep it? (I am not aware of any)

Comment 3 Tomáš Kašpárek 2017-08-02 08:27:59 UTC
spacewalk.git(master): cccd8324a8d09ad98a3bafc51621f811b6428c8c
4d5a5c95333283f4d186dd49068a6d666da467ae

Comment 12 errata-xmlrpc 2017-10-19 11:57:19 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.

https://access.redhat.com/errata/RHBA-2017:2915


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