Unable to upgrade API Portal from 5.2 to 5.2.2 due to OTK db upgrade errror
search cancel

Unable to upgrade API Portal from 5.2 to 5.2.2 due to OTK db upgrade errror

book

Article ID: 280061

calendar_today

Updated On:

Products

CA API Developer Portal

Issue/Introduction

Unable to upgrade API Portal from 5.2 to 5.2.2 due to OTK db upgrade error in the portal database upgrade container .

Unexpected error running Liquibase: Migration failed for change set opt/docker/db/liquibase/otk-changelogs/otk_upgrade_4.5.0.xml::oauth_token-add-mixed-pkey::gateway:

Reason: liquibase.exception.DatabaseException: InnoDB : A partitioned table is not allowed in a shared tablespace. [Failed SQL: (1478) ALTER TABLE apim_otk_db.oauth_token ADD PRIMARY KEY (otk_token_id, expiration) PARTITION BY HASH (expiration div (15 * 60)) PARTITIONS 5 ]

ingress: ERROR - could not provision apim_otk_db database

: ERROR - Failed executing the script: /opt/docker/rc.d/init-otk.sh

Cause

In older MySQL server version the default setting  was to store the database in a shared tablespace .

You can set this in my.cnf but this is only effective for new create databases.

Resolution

The own tablespace for each table is only effective for new tables existing tables will stay in the old format.

We have to drop and restore the apim_otk_db to get the tables in there own table space.

Please raise a support case to discuss the steps needed to resolve this issue .