Bug 589055 - spacewalk-setup should not try to overwrite /etc/tnsnames.ora in case it exists
Summary: spacewalk-setup should not try to overwrite /etc/tnsnames.ora in case it exists
Alias: None
Product: Spacewalk
Classification: Community
Component: Installation
Version: 1.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: Red Hat Satellite QA List
Depends On:
Blocks: space13
TreeView+ depends on / blocked
Reported: 2010-05-05 09:19 UTC by Milan Zázrivec
Modified: 2011-02-08 08:42 UTC (History)
1 user (show)

Fixed In Version: spacewalk-setup-1.3.7-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-02-08 08:42:03 UTC

Attachments (Terms of Use)

Description Milan Zázrivec 2010-05-05 09:19:19 UTC
Description of problem:
spacewalk-setup in oracle_setup_db_connection() overwrites /etc/tnsnames.ora
regardless of whether the file exists or not. This does not seem to
be necessary, since:
1. in Spacewalk installations, the file is created manually before
the user calls spacewalk-setup
2. during upgrades, the file exists before the upgrade and in certain
scenarios (umask set specifically) the overwritten file will have
incorrect permissions.

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

How reproducible:

Steps to Reproduce:
1. set umask to something funny
2. upgrade from previous spacewalk
Actual results:
Wrong permissions on /etc/tnsnames.ora

Expected results:
File won't be overwritten in case it exists.

Additional info:

Comment 1 Jan Pazdziora 2010-05-05 10:21:40 UTC
Michael, do we have any plans to get rid of tnsnames.ora completely?

Comment 2 Jan Pazdziora 2010-11-19 16:05:45 UTC
Mass-moving to space13.

Comment 3 Jan Pazdziora 2011-01-28 09:01:26 UTC
Addressed in Spacewalk master, 11df63a4baf949231d1fb52fabf41c64b0753c77. From the commit message:

    Refactored oracle_get_database_answers.
    We do not want to ask for username and password before we know
    what database we talk to.
    Also, we no longer create/change /etc/tnsnames.ora.
    The db-name in answer file can either refer to service name
    at db-host (//db-host(:db-port)/db-name) or to a service name
    specified in tnsnames.ora. This allows the user to set anything
    in their tnsnames.ora before running spacewalk-setup (think RAC
    and any advanced options) and just use it.
    For similar reason, db-protocol is no longer supported.

Comment 4 Tomas Lestach 2011-02-03 12:21:39 UTC
Moving ON_QA ...

Comment 5 Tomas Lestach 2011-02-08 08:42:03 UTC
This bug has been fixed in Spacewalk 1.3.

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