diff --git a/continuousintegration/docker/ctafrontend/cc7/config/init/purge_recyclebin.ext b/continuousintegration/docker/ctafrontend/cc7/config/init/purge_recyclebin.ext new file mode 100644 index 0000000000000000000000000000000000000000..a2b173c1c029f1c7d7ba1160908bab27c0954922 --- /dev/null +++ b/continuousintegration/docker/ctafrontend/cc7/config/init/purge_recyclebin.ext @@ -0,0 +1,5 @@ +select * from user_ts_quotas; +SELECT * FROM RECYCLEBIN; +SELECT * FROM USER_RECYCLEBIN; +purge recyclebin; +quit; diff --git a/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/init.sh b/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/init.sh index b184d4b99b054fb48aba942b951c5bd5a076c4da..12f40620a98b18768cbf2fd98aac7b639bc0c615 100755 --- a/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/init.sh +++ b/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/init.sh @@ -2,12 +2,15 @@ . /opt/run/bin/init_pod.sh +# oracle sqlplus client binary path +ORACLE_SQLPLUS="/usr/bin/sqlplus64" + # enable cta repository from previously built artifacts yum-config-manager --enable cta-artifacts yum-config-manager --enable ceph # install needed packages -yum -y install cta-objectstore-tools cta-doc mt-st mtx lsscsi sg3_utils cta-catalogueutils ceph-common +yum -y install cta-objectstore-tools cta-doc mt-st mtx lsscsi sg3_utils cta-catalogueutils ceph-common oracle-instantclient-sqlplus yum clean packages echo "Using this configuration for library:" @@ -54,6 +57,10 @@ if [ "$KEEP_DATABASE" == "0" ]; then cta-catalogue-schema-create /etc/cta/cta_catalogue_db.conf chmod -R 777 $(dirname $(echo ${DATABASEURL} | cut -d: -f2)) # needed? else + # Oracle DB + echo "Purging Oracle recycle bin" + test -f ${ORACLE_SQLPLUS} || echo "ERROR: ORACLE SQLPLUS client is not present, cannot purge recycle bin: ${ORACLE_SQLPLUS}" + LD_LIBRARY_PATH=$(readlink ${ORACLE_SQLPLUS} | sed -e 's;/bin/[^/]\+;/lib;') ${ORACLE_SQLPLUS} $(echo $DATABASEURL | sed -e 's/oracle://') @/opt/ci/init/purge_recyclebin.ext cta-catalogue-schema-create /etc/cta/cta_catalogue_db.conf fi else