Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invoke stop removes more than expected #36

Closed
DistantVoyager opened this issue Oct 23, 2023 · 0 comments
Closed

invoke stop removes more than expected #36

DistantVoyager opened this issue Oct 23, 2023 · 0 comments

Comments

@DistantVoyager
Copy link

Environment

  • Python version: 3.11
  • cookiecutter-nautobot-app template version: 1.2

Currently, invoke stop without any specified services produces the command docker compose down --remove-orphans. This removes all containers.

The invoke commands probably shouldn't deviate from what they're actually doing (like defined here https://docs.docker.com/engine/reference/commandline/compose_stop/), otherwise it could cause unexpected outcomes from what the user intended.

Observed Behavior

(nautobot-data-validation-engine-py3.10) steven@NTC-LAT7320:~/coding/nautobot-plugin-data-validation-engine$ docker container list -a
CONTAINER ID   IMAGE                                                   COMMAND                  CREATED              STATUS                          PORTS                    NAMES
220bdc828075   nautobot-data-validation-engine/nautobot:2.0.0-py3.11   "sh -c 'watchmedo au…"   About a minute ago   Up About a minute (healthy)     8080/tcp                 nautobot-data-validation-engine-worker-1
cfd7614dc1c7   nautobot-data-validation-engine/nautobot:2.0.0-py3.11   "sh -c 'nautobot-ser…"   About a minute ago   Exited (1) About a minute ago                            nautobot-data-validation-engine-beat-1
24bdac6e9868   nautobot-data-validation-engine/nautobot:2.0.0-py3.11   "/docker-entrypoint.…"   About a minute ago   Up About a minute (healthy)     0.0.0.0:8080->8080/tcp   nautobot-data-validation-engine-nautobot-1
ad45d01d95fc   nautobot-data-validation-engine/nautobot:2.0.0-py3.11   "mkdocs serve -v -a …"   About a minute ago   Up About a minute               0.0.0.0:8001->8080/tcp   nautobot-data-validation-engine-docs-1
0033dfa12953   postgres:13-alpine                                      "docker-entrypoint.s…"   About a minute ago   Up About a minute (healthy)     5432/tcp                 nautobot-data-validation-engine-db-1
65f086f1bb22   redis:6-alpine                                          "docker-entrypoint.s…"   About a minute ago   Up About a minute               6379/tcp                 nautobot-data-validation-engine-redis-1
(nautobot-data-validation-engine-py3.10) steven@NTC-LAT7320:~/coding/nautobot-plugin-data-validation-engine$ invoke stop
Stopping Nautobot...
Running docker compose command "down --remove-orphans"
 Container nautobot-data-validation-engine-beat-1  Stopping
 Container nautobot-data-validation-engine-worker-1  Stopping
 Container nautobot-data-validation-engine-docs-1  Stopping
 Container nautobot-data-validation-engine-beat-1  Stopped
 Container nautobot-data-validation-engine-beat-1  Removing
 Container nautobot-data-validation-engine-beat-1  Removed
 Container nautobot-data-validation-engine-docs-1  Stopped
 Container nautobot-data-validation-engine-docs-1  Removing
 Container nautobot-data-validation-engine-docs-1  Removed
 Container nautobot-data-validation-engine-worker-1  Stopped
 Container nautobot-data-validation-engine-worker-1  Removing
 Container nautobot-data-validation-engine-worker-1  Removed
 Container nautobot-data-validation-engine-nautobot-1  Stopping
 Container nautobot-data-validation-engine-nautobot-1  Stopped
 Container nautobot-data-validation-engine-nautobot-1  Removing
 Container nautobot-data-validation-engine-nautobot-1  Removed
 Container nautobot-data-validation-engine-redis-1  Stopping
 Container nautobot-data-validation-engine-db-1  Stopping
 Container nautobot-data-validation-engine-redis-1  Stopped
 Container nautobot-data-validation-engine-redis-1  Removing
 Container nautobot-data-validation-engine-redis-1  Removed
 Container nautobot-data-validation-engine-db-1  Stopped
 Container nautobot-data-validation-engine-db-1  Removing
 Container nautobot-data-validation-engine-db-1  Removed
 Network nautobot-data-validation-engine_default  Removing
 Network nautobot-data-validation-engine_default  Removed
(nautobot-data-validation-engine-py3.10) steven@NTC-LAT7320:~/coding/nautobot-plugin-data-validation-engine$ docker container list -all
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
(nautobot-data-validation-engine-py3.10) steven@NTC-LAT7320:~/coding/nautobot-plugin-data-validation-engine$ 

Expected Behavior

The invoke stop command only stops the running containers, not removes them.

Steps to Reproduce

  1. invoke build start
  2. invoke stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant