Open harrybiddle opened 3 years ago
You can also delete the data volumes by passing -v/--with-volumes
to sgr engine delete
(https://www.splitgraph.com/docs/sgr/engine-management/engine-delete). It's not done by default since you can use sgr engine delete
to switch the Docker image or recreate the engine on a different port.
That's really useful, thanks :). My intention on this ticket was more just to communicate my confusion, rather than a bug or any kind. I was basically trying to do a clean re-install of the engine but this volume thing really tripped me up!
By the way, I actually got the rm -f
line from a message in Splitgraph: does it make sense to put a -v
there?
Is there perhaps a way for sgr engine add
to detect when it is about to pick up an existing volume and make that clear? Or, would it make sense for the sgr
CLI to manage volumes too: perhaps listing volumes in use and "dangling" volumes that aren't in use?
I was having some issues with my Splitgraph engine, so I decided to re-install it.
docker rm -f $(docker ps -aq)
docker volume prune --force
Re-add the default engine:
sgr engine add
is different. So I remove the failed engine and try to add again with the right defaults:Now it finally works!
Mitigation
I think we can mitigate this by using the following:
sgr engine add
should use the same defaults as the install scriptsgr engine add
should use the settings for what it has just installed; not what is in the sgconfig (which may be different)sgr engine delete
should also delete the Docker volume / data directory for postgres