5.4 KiB
Pre-upgrade-task-of-AC-when-upgrade-from-24.2-to-24.3_688996364
Introduction:
The exeuction of sql scripts is required when AC is enbaled for a Tenant on the ESM tenant in ESM 24.2 release, before upgrade of ESM chart to 24.3
It updates the existing 'Owner' of schema tables created in 24.2 to the tenant schema owner.
1. Pre-condition:
Download the below DB scripts onto the Bastion Node.
2. Run the sql scripts:
We need to connect to a bastion node having access to the RDS of SMAX setup.
2.1. Data Sync service:
1. Check the Tenant schema details before running the sql sciprts:
1. Connect to the acdatasyncdb.
2.Check the schema details
acdatasyncdb=# \dn
3. Pre-SQL scripts execution validation (check the 'Owner' of the schema table)
acdatasyncdb=# \dt syncservice_<tenantId>.*
2. Run the Sql script from the Bastion host.
Usage: Script iterates over the schemas of the DataSync DB named LIKE 'syncservice_%', get the schema owner and set it as owner of the tables.
To get password of user acdatasyncdbuser:
→ Get the secret key for db password
kubectl get cm itom-ac-database-configmap -n -o yaml
The result is like:
DB_PASSWORD_KEY: itom_itsma_db_password_secret_key
You may find the DB_PASSWORD_KEY value from the itom-ac-database-configmap
→ Get the acdatasyncdbuser db password.
kubectl get pod -n | grep "itom-ac-data-sync" | head -1 | awk '{print $1}'
kubectl exec -n -c itom-ac-data-sync -- get_secret
For example:
kubectl exec $(kubectl get pod -n itsma-eks | grep "itom-ac-data-sync" | head -1 | awk '{print $1}') -n itsma-eks -c itom-ac-data-sync -- get_secret itom_itsma_db_password_secret_key
Command: PGPASSWORD='' psql -h < postgres_hostname> -p 5432 -d acdatasyncdb -U acdatasyncdbuser -a -f ds_change_table_ownership.sql
* PGPASSWORD - acdatasyncdbuser database user password
3. Post SQL scripts execution validation (Here 'Owner' of the tables is changed post the sql script execution):
acdatasyncdb=# \dt syncservice_<tenantId>.*
2.2. Vulnerability & Patching service:
1. Check the Tenant schema details before running the sql sciprts:
1. Connect to the acpatchdb
2. Check the schema details
acpatchdb=# \dn
3. Pre-SQL script execution validation: (check 'Owner' of the schema tables)
acpatchdb=# \dt vps_schema_<tenantId>.*
2. Run the Sql script from the Bastion host.
Uasage: Script iterates over the schemas of the VPS DB named LIKE 'vps_schema_%', get the schema owner and sets it as owner of the tables.
To get password of user acpatchdbuser:
→ Get the secret key for db password
kubectl get cm itom-ac-database-configmap -n -o yaml
The result is like:
DB_PASSWORD_KEY: itom_itsma_db_password_secret_key
You may find the DB_PASSWORD_KEY value from the itom-ac-database-configmap
→ Get the acpatchdbuser db password.
kubectl get pod -n | grep "itom-ac-data-sync" | head -1 | awk '{print $1}'
kubectl exec -n -c itom-ac-data-sync -- get_secret
For example:
kubectl exec $(kubectl get pod -n itsma-eks | grep "itom-ac-data-sync" | head -1 | awk '{print $1}') -n itsma-eks -c itom-ac-data-sync -- get_secret itom_itsma_db_password_secret_key
Command: PGPASSWORD='' psql -h <postgres_hostname> -p 5432 -d acpatchdb -U acpatchdbuser -a -f vps_change_table_ownership.sql
* PGPASSWORD - acpatchdbuser database user password
3. Post SQL scripts execution (Here 'Owner' of the table is changed post the sql script execution):
acpatchdb=# \dt vps_schema_<tenantId>.*
Related pages
- Page: ESM Cloud Farm Version Tracking
- Page: How to get an Opentext Confluence account
- Page: ITOM APM AppPluse Cloud Farm Information
- Page: ITOM Cloud Service Ops Doc Management Process
- Page: ITOM ESM Cloud Service Catalog
- Page: ITOM OpsB NOM Cloud Service Catalog
- Page: OpsB and NOM Cloud Deployments Version Tracking





