nspcc-dev / neofs-dev-env

NeoFS local Development and Testing environment
https://fs.neo.org
GNU General Public License v3.0
9 stars 25 forks source link

"make clean" ends with an error #300

Open tatiana-nspcc opened 9 months ago

tatiana-nspcc commented 9 months ago

Current Behavior

neofs-dev-env (master)$ make clean

storage_s01
storage_s02
storage_s03
storage_s04
Error: The target clean failed with exit code 1
make: *** [Makefile:212: clean] Error 1

Expected Behavior

Something without errors

Possible Solution

I don't know.

Steps to Reproduce

  1. I prepared and ran the environment for test cases according to README.md
  2. Run make clean
cthulhu-rider commented 6 months ago

@tatiana-nspcc on error encounter, try to rm storage volume manually:

$ docker volume rm storage_storage_s01

P.S. volume names may change over time, see

$ docker volume ls

u may see an error like this:

Error response from daemon: remove storage_storage_s01: volume is in use - [4dd0d96cd27765cef7c9d7944f13c8b0a6491146477677430e68db99480a2569, 4f8c5ee17272a8cb6fb3953f2b596cf4db1cdbe6821f03c3fbf1f3a8aa057bd3]

in this case u may clean these containers. I usually clean all via:

$ docker container prune

after this, volumes are no longer used, so:

$ make clean
storage_storage_s01
storage_storage_s02
storage_storage_s03
storage_storage_s04
The target 'clean' completed successfully

i noticed that this happens after running https://github.com/nspcc-dev/neofs-testcases above DevEnv. But I don’t exclude other reasons


for used volumes case i see two possible improvements:

  1. rm containers before volumes in make clean
  2. write clear error volume is in use instead of Error: The target clean failed with exit code 1 and add README tip how this could be healed
tatiana-nspcc commented 6 months ago

You're right. I should manually remove all storage_storage_* volumes. And I'd received an error that they are in use. But in my case docker container prune didn't work, I used:

docker ps --filter "volume=storage_storage_s01"
...
docker stop [container_id]
...
docker rm [container_id]
...
docker volume rm storage_storage_s01

After that, make clean completed successfully.

cthulhu-rider commented 6 months ago

in my case docker container prune didn't work

prune does not remove running containers, thats why u needed docker stop i guess