On Fri, Sep 07, 2012 at 02:46:34PM +0200, Jan Pazdziora wrote:
> I'm not sure I correctly understand what you ask about but the
> oracle_get_database_answers
The /etc/rhn/rhn.conf has nothing to do with *Oracle* database at all.
It is *generic* config and database back-end can be even IBM DB2 one
day. The configuration keys in the rhn.conf belongs to the RHN
configuration, not to the Oracle database!
> just setup whatever you want in tnsnames.ora
"tnsnames.ora" is a part of Oracle database. Again, /etc/rhn/rhn.conf
has nothing to do with a particular database vendor. RHN configuration
is a place, where *generic* information about *any* database
connectivity is specified. A specific URI strings for specific drivers
on specific database vendors must be handled inside the particular
application. What if I am connecting my Windows Server .Net written
app over ODBC to Postgres? -- I am constructing my own URI inside.
And now I need specifically parse the URI? Why so?..
> Right. We just leave them empty.
> [...]
> We need to support them for PostgreSQL.
I can spot here severe logical problem: "We just leave them empty"
vs "We need them to support $FOO database". This only proves than
/etc/rhn/rhn.conf file is *generic* place for *varius* and different
components. That directly means that hard-coding specific URI over
"db_name" variable that belongs to RHN configuration syntax is just a
very bad idea.
As a result, other components need to parse this URI, remove all the
host:port information and extract only a database name. Why?
The bottom line is that now these keys are not unified and can mean
anything. I would understand if RHN config would do something like:
db_host = foo.bar.com
db_port = 5432
db_name = blahblah
db_uri = //$db_host:$db_port/$db_name
...by acquiring the values. But even that, putting URI inside in only
one particular syntax is more like hard-coded ad-hoc because somebody
had a personal problem somewhere. In some cases it can be a different
syntax, like:
user/password@//host:port/database
or:
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host)
(PORT=port)))(CONNECT_DATA=(SERVER=DEDICATED)
(SERVICE_NAME=database)));User Id=user;Password=password;
or:
user/password@host/service:dedicated/database;
or:
//$host/$database?user=$user&password=$password&ssl=true
etc.
--
Bo Maryniuk
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
We are experiencing system trouble -- do not adjust your terminal!
_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel