4.2 Preupgrade Tasks
Before starting the procedure to upgrade OCNWDAF, perform the following tasks:
Note:
While performing an upgrade, you must align the values.yaml file of the target release as per the helm-chart/values.yaml file of the source release or the older release. Do not enable any new feature during the upgrade. The parent or sub-charts values.yaml must not be changed while performing the upgrade, unless it is explicitly specified in this document.
- If previous installation was done with CNDB root user configuration, create a new user with root privileges.
- Follow the procedure Creating an Admin User in the Database and replace the Cndb values in the secrets section of the values.yaml file, see Installing OCNWDAF Package. Run the commands as displayed in the example below to create the version schema for the previous release:
DROP DATABASE IF EXISTS version_schema; CREATE DATABASE IF NOT EXISTS version_schema CHARACTER SET utf8; CREATE TABLE IF NOT EXISTS version_schema.VERSION_INFO(version_id int, service_name varchar(255), version varchar(255), updated_on datetime(6) , PRIMARY KEY (version_id)); INSERT INTO VERSION_INFO(version_id, service_name, version, updated_on) VALUES(1, 'NWDAF', '24.1.0', current_timestamp()); CREATE DATABASE IF NOT EXISTS `af`; USE `af`; drop table if exists `af_event_subscription`; CREATE TABLE af_event_subscription ( subscription_id varchar(36) NOT NULL, subscription json DEFAULT NULL, PRIMARY KEY (subscription_id) );Run the above command with the new user created in Cndb and with the root user in InnoDB.
For example:
kubectl -n nwdaf-deploy exec -it service/nwdaf-mysql-innodb-cluster -- mysql --user=root --host=nwdaf-mysql-innodb-cluster --password=password - During the upgrade process, ensure that the IP Family configuration in the target release matches with the IP configuration in the source release. Changing the IP Family while performing upgrade is not supported.
- To support future upgrade or rollback, enable the nwdaf-cap4c-backuprestore chart in the values.yaml file. This ensures a backup is available in case future upgrade or rollback fails.
Note:
In the current release only upgrade is supported.