Hi @midhuhk,
“[…] When db pod is deleted in a running instance […]”
Was this env PoC deployed with an ephemeral db pod or was the database volume also deleted?
If so, after deleting the postgres pod/volume, all of its data is also lost.
In this case, to recreate the database schema you can run the django migrations through:
- get the name of a content or api pod, for example:
$ oc get pod -l app=pulp-content -oname
pod/pulp-content-58787cdc8f-p8znk
- open a remote shell session into the init container and run the migrations:
$ oc rsh -cinit-container pod/pulp-content-58787cdc8f-p8znk
- run the migration
sh-5.1$ pulpcore-manager migrate
error: Failed to initialize NSS library <----- you can ignore this error message
Operations to perform:
Apply all migrations: ansible, auth, certguard, container, contenttypes, core, deb, file, maven, ostree, python, rpm, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying core.0001_initial... OK
Applying core.0002_increase_artifact_size_field... OK
Applying core.0003_remove_upload_completed... OK
Applying core.0004_add_duplicated_reserved_resources... OK
...
Access policy for distributions/file/file created.
Access policy for publications/file/file created.
Access policy for remotes/file/file created.
Access policy for repositories/file/file/versions created.
Access policy for repositories/file/file created.
After that, check if all pods are in a Running state again:
$ oc get pods
NAME READY STATUS RESTARTS AGE
pulp-api-84d8fcffbf-lj72p 1/1 Running 7 (56s ago) 12d
pulp-content-58787cdc8f-p8znk 1/1 Running 0 15m
pulp-database-0 1/1 Running 0 15m
pulp-operator-controller-manager-56d994b744-vjlk9 2/2 Running 2 (11d ago) 12d
pulp-worker-795ddc6569-q4zxx 1/1 Running 3 (15m ago) 12d