Automatic restore of the OpenSDN databases fails
If the automatic restore of the OpenSDN databases fails, the data is not fully
imported. MOSK leaves dbRestoreMode enabled and does not start the OpenSDN
configuration services on the databases that the restore did not finish.
In this case, you can observe the following:
status.healthset toFailedin thetf-dbrestoreobjectDBRestoreJobFailedinstatus.eventListof thetf-dbrestoreobject and noDBRestoreFinishedspec.features.dbRestoreMode.enabledstill set totruein theTFOperatorcustom resourceMissing
tf-configandtf-config-dbDaemonSets
Warning
After a failed restore, do not set dbRestoreMode to false manually.
This starts the OpenSDN configuration services on partial or empty
databases.
To resolve the issue:
Inspect the logs of the
tf-dbrestore-jobjob:kubectl -n tf logs job/tf-dbrestore-job
Inspect the
tf-dbrestoreobject:kubectl -n tf describe tfdbrestores.tf.mirantis.com tf-dbrestore
Optional. Specify the name of another backup in the
dbDumpNameparameter of theTFOperatorcustom resource:spec: features: dbRestoreMode: enabled: true dbDumpName: db-dump-20220111-110138.json
To retry the restore, delete the
tf-dbrestoreobject whiledbRestoreModeis still enabled:kubectl -n tf delete tfdbrestores.tf.mirantis.com tf-dbrestore
The operator creates the
tf-dbrestoreobject again and repeats the restore: it recreates the databases, verifies Cassandra and ZooKeeper, and creates a new restore job.Continue the restoration as described in Automatically restore the data, starting from step 4.