Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

Config not saved when shutting down #18

Open
frankgrimes97 opened this issue Feb 6, 2020 · 1 comment
Open

Config not saved when shutting down #18

frankgrimes97 opened this issue Feb 6, 2020 · 1 comment

Comments

@frankgrimes97
Copy link

Hi, I'm running docker run -p 5433:5433 -d -v ~/vertica_data:/home/dbadmin/docker jbfavre/vertica:9.2.0-7_centos-7 but when shutting down the following lines are not executed:

https://github.com/jbfavre/docker-vertica/blob/master/docker-entrypoint.sh#L15-L19

As a consequence of this trying to start against a previously created persistent store tries to re-create the DB again and fails.

By re-ordering the commands like so it works correctly (i.e. saving the configuration prior to invoke the shutdown of Vertica):

 # Vertica should be shut down properly
 function shut_down() {
-  echo "Shutting Down"
-  vertica_proper_shutdown
   echo 'Saving configuration'
   mkdir -p ${VERTICADATA}/config
   /bin/cp /opt/vertica/config/admintools.conf ${VERTICADATA}/config/admintools.conf
+  echo "Shutting Down"
+  vertica_proper_shutdown
   echo 'Stopping loop'
   STOP_LOOP="true"
 }
@MrBudy01
Copy link

Hello!
Sorry if I bother but I have the same problem and I couldn't make it work.
I installed Docker Desktop on Windows 10 and I used this command in CMD:
docker run -p 5433:5433 -d --mount type=bind,source=path,destination=/home/dbadmin/docker --name vertica jbfavre/vertica

and when I looked in Docker Desktop I see it running and I can use dbeaver to make a connection.
But the next time I try to start the image is running for just a second and then it's stopped. This is in the log:
Starting up
Fixing filesystem permissions
Creating database
Info: no password specified, using none
A database with this name (docker) already exists.

How can I modify the file docker-entrypoint.sh before the first shut down? Where can I find it? I tried looking for it in the image using the CLI but I failed.

Best regards!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants