Error while setting up DB2 for Manage
On the role suite_db2_setup_for_manage, a db2 script is generated, copied to the db2u pod and executed.
When looking at the logs, it looks like the script is interrupted and some of the queries are not executed.
This cause the maxinst to fail because the tablespaces and the maximo schema doesn't exist.
The line 48 of ansible-devops/ibm/mas_devops/roles/suite_db2_setup_for_manage/templates/setupdb.sh.j2 is throwing a warning that stops the script. I guess the line should be encaptulated between set +e and set _e so the script continues.
setupdb.log
Database Connection Information
Database server = DB2/LINUXX8664 11.5.7.0
SQL authorization ID = DB2INST1
Local database alias = BLUDB
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
SQL1363W One or more of the parameters submitted for immediate modification
were not changed dynamically. For these configuration parameters, the database
must be shutdown and reactivated before the configuration parameter changes
become effective.
Hi @csschen I see you self-assigned this one, any progress or updates on this?
We need involve DBA to help fix the script issue, it seem he is busy not respond yet, currently is pending on that.
@csschen any update on this issue?
@whitfiea The DBA Glenn is on vacationing, will be back on May 29th. I will ask him after the vacation.
@QDespeisse @csschen any updates on this issue? If not we'll close it for now as there's no much movement on this.
@andrercm I'm working with DBA [email protected] to fix this issue. Will update once there is progress.
From [email protected]'s request, script setupdb should not do any db2 cfg settings, as those should belong into the db2u cluster CR.
DBA [email protected] help reviewed the DB2 setup script, the suggestion is that all the db2 config, db2 dbm config, db2 set command should not execute on DB2 instance directly, instead of changing the DB2uCluster CR. Those contents should removed from the script. He also help refined and fixed the marker file missing issue, will query the results from DB2 instance per time before create the DB2 objects.
The new script tested successfully by Ansible role suite_db2_setup_for_manage, below are the db2 setup script test logs:
"stderr": "Defaulted container \"db2u\" out of: db2u, init-labels (init), init-kernel (init)",
"stderr_lines": [
"Defaulted container \"db2u\" out of: db2u, init-labels (init), init-kernel (init)"
],
"stdout": "\n Database Connection Information\n\n Database server = DB2/LINUXX8664 11.5.8.0\n SQL authorization ID = DB2INST1\n Local database alias = BLUDB\n\nCREATE BUFFERPOOL MAXBUFPOOL SIZE 8192 AUTOMATIC PAGESIZE 32 K\nDB20000I The SQL command completed successfully.\n\nCREATE BUFFERPOOL MAXBUFPOOLINDX SIZE 8192 AUTOMATIC PAGESIZE 32 K\nDB20000I The SQL command completed successfully.\n\nCREATE BUFFERPOOL MAXTEMPBP SIZE 8192 AUTOMATIC PAGESIZE 32 K\nDB20000I The SQL command completed successfully.\n\nCREATE TABLESPACE MAXDATA PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL MAXBUFPOOL\nDB20000I The SQL command completed successfully.\n\nCREATE TABLESPACE MAXINDEX PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL MAXBUFPOOLINDX\nDB20000I The SQL command completed successfully.\n\nCREATE TEMPORARY TABLESPACE MAXTEMP PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL MAXTEMPBP\nDB20000I The SQL command completed successfully.",
"stdout_lines": [
"",
" Database Connection Information",
"",
" Database server = DB2/LINUXX8664 11.5.8.0",
" SQL authorization ID = DB2INST1",
" Local database alias = BLUDB",
"",
"CREATE BUFFERPOOL MAXBUFPOOL SIZE 8192 AUTOMATIC PAGESIZE 32 K",
"DB20000I The SQL command completed successfully.",
"",
"CREATE BUFFERPOOL MAXBUFPOOLINDX SIZE 8192 AUTOMATIC PAGESIZE 32 K",
"DB20000I The SQL command completed successfully.",
"",
"CREATE BUFFERPOOL MAXTEMPBP SIZE 8192 AUTOMATIC PAGESIZE 32 K",
"DB20000I The SQL command completed successfully.",
"",
"CREATE TABLESPACE MAXDATA PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL MAXBUFPOOL",
"DB20000I The SQL command completed successfully.",
"",
"CREATE TABLESPACE MAXINDEX PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL MAXBUFPOOLINDX",
"DB20000I The SQL command completed successfully.",
"",
"CREATE TEMPORARY TABLESPACE MAXTEMP PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL MAXTEMPBP",
"DB20000I The SQL command completed successfully."
]
The DBA [email protected] help confirmed above log is working as expected. The script tested on both ROKS and ROSA. Below are the Ansible role test logs.
The fix has been merged into master branch. Can we close this issue? @QDespeisse
Closing issue, looks like this was fixed back in August 2023, but the issue was not closed.