MariaDB doesn't come up when an old volume is present

Description

MariaDB doesn't come up when an old volume is present, and Robot health check fails on Policy

Environment

Openstack HEAT installation in Intel lab

Activity

Show:

Former user October 23, 2017 at 7:01 PM

Destroy instructions should be declared in *_vm_init.sh and executed before every docker run or compose.
You can add them to policy_vm_init.sh, before new images are pulled.

Former user October 23, 2017 at 5:02 PM
Edited

Hi [~accountid:999854:8ef2b054-dfef-4891-845f-635c7b7d1264], there is an issue when policy mariadb is brought up after installing new images in the policy vm.  This has to do on how the old containers are stopped and released.  The database does not come up properly if the old volume from the previous image was not deleted as well with the container.  This brings the question, on how folks are stopping/removing the container when reusing the VM without rebooting for a new installation.

The problem is solved if the containers are stopped/removed following these 2 steps, documented here [https://wiki.onap.org/display/DW/Policy+Cookbook:]

docker kill $(docker ps -q)

docker rm -v $(docker ps -a -q)
 
previous to 
 
/opt/policy_vm_init.sh

So looking up to you Marco for guidance on how to integrate those 2 steps in the integration scripts, one easy change would be to just stick those 2 commands in the policy_vm_init script.   I don't see a "destroy" as I don't see a "destroy" script that I could put it in, if I wanted to be performed automatically.   Let me know your thoughts.

Done

Details

Assignee

Reporter

Sprint

Fix versions

Affects versions

Priority

Created October 23, 2017 at 3:43 PM
Updated August 12, 2023 at 3:39 AM
Resolved October 23, 2017 at 9:08 PM