Remove TNS in CI for oracle database configs
Problem to solve
TNS has been causing several issues in the past 2 months and is still causing trouble in Alma9.
Stakeholders
CI runners and Continuous integration environment should not have a complicated CERN only rpm on the critical path.
Oracle config should be complete from a single kubernetes configmap, like postgres.
This will allow us to have a site independent oracle configuration and remove CERN specific or site specific /etc/tnsnames.ora
entirely from CI.
Proposal
Implemented in 3 steps:
- remove tnsname from
database.oracle.database
key in database-config configmap on all our runners that use oracle - remove all TNS related rpms and tricks from CI
- put in place a refresh mechanism on runners for the new value in configmap, as it need to be extracted regularly from the runner pulled local tnsname.
1. Remove tnsname from database-config
We use the following entry in configmap:
castorint=(
DESCRIPTION=
(ADDRESS= (PROTOCOL=TCP) (HOST=devdbs2-rac16-scan.cern.ch) (PORT=10121) )
(LOAD_BALANCE=on)
(ENABLE=BROKEN)
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=castorint.cern.ch)
)
)
For this configmap key:
database.oracle.database: castorint
We can remove the tnsnames indirection just with the following string:
database.oracle.database: //devdbs2-rac16-scan.cern.ch:10121/castorint.cern.ch
This is going to be deployed on our runners so that we can go to step 2.