Skip to content

Cloning a containers with conflicting port creates zombie #5

@eschrock

Description

@eschrock

Expected Behavior

If you clone a database while there is already one running with a conflicting port, you should get a clear error message indicating such, and you should be able to shut down that container and re-try the clone operation.

Actual Behavior

First, the clone fails in an obscure way:

$ titan clone s3://titan-data-cto/engdemo demo
Creating repository demo
Creating docker volume demo/v0 with path /var/lib/postgresql/data
Exception in thread "main" io.titandata.titan.exceptions.CommandException: Command failed: [docker, run, --label, io.titandata.titan, --mount, type=volume,src=demo/v0,dst=/var/lib/postgresql/data,volume-driver=titan, --name, demo, -d, --label, io.titandata.titan, -p, 5432:5432, postgres@sha256:473c72d4eff3e2d30857a4f7fe55319add123ddee7aedeef86538b81a03488df]

As outlined in #4, this also leaves a stale repository, but it's in a stranger stage that seems to keep it being from being deleted:

$ titan rm -f demo
Removing container demo
Deleting volume demo/v0
Exception in thread "main" io.titandata.titan.exceptions.CommandException: Command failed: [docker, volume, rm, demo/v0]

Steps to Reproduce the Problem

Run a postgres container with -p 5432:5432. Then try to clone one with the same port configuration.

Version

0.3.0

Metadata

Metadata

Assignees

Labels

Type: BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions