Univention Bugzilla – Bug 49605
docker-compose: left overs prevent re-installation of app
Last modified: 2019-06-24 13:49:20 CEST
Seen in the owncloud app: For some reason the App installation failed (ok so far, that is not the issue here). Now the AppCenter want to remove the app, but this was not complete. --------------------------------------- ERROR: for owncloud_owncloud_1 Driver overlay failed to remove root filesystem a0d6cb2437664d5a4662bd5aec085077911a4e86218c743b795786dead23ae27: remove /var/lib/docker/overlay/71ef3bc8accca6e3dc3edbcd8780a0398fb9d72c8be9dcf261c7189696fb38d8/merged/lib64: directory not empty --------------------------------------- --------------------------------------- docker ps -a a0d6cb243766 docker.software-univention.de/owncloud-owncloud:10.1.1-2019-04-23 "/usr/bin/entrypoi..." 12 minutes ago Dead owncloud_owncloud_1 --------------------------------------- I now have a dead container owncloud_owncloud_1 and this prevents the re-installation of the app. --------------------------------------- Command docker-compose -p owncloud up -d --no-build --no-recreate failed with: Creating owncloud_redis_1 Starting owncloud_owncloud_1 ERROR: for owncloud Cannot start service owncloud: Container is marked for removal and cannot be started. Encountered errors while bringing up the project. (1) Creating owncloud_redis_1 Starting owncloud_owncloud_1 ERROR: for owncloud Cannot start service owncloud: Container is marked for removal and cannot be started. Encountered errors while bringing up the project. Aborting... --------------------------------------- first idea was to remove the "--no-recreate" from the docker-compose up, but no, we get another error --------------------------------------- Command docker-compose -p owncloud up -d --no-build failed with: owncloud_redis_1 is up-to-date Recreating owncloud_owncloud_1 ERROR: for owncloud open /var/lib/docker/containers/a0d6cb2437664d5a4662bd5aec085077911a4e86218c743b795786dead23ae27/.tmp-config.v2.json471853240: no such file or directory Encountered errors while bringing up the project. (1) owncloud_redis_1 is up-to-date Recreating owncloud_owncloud_1 ERROR: for owncloud open /var/lib/docker/containers/a0d6cb2437664d5a4662bd5aec085077911a4e86218c743b795786dead23ae27/.tmp-config.v2.json471853240: no such file or directory Encountered errors while bringing up the project. Aborting... --------------------------------------- and even with --force-recreate, it fails --------------------------------------- Command docker-compose -p owncloud up -d --no-build --force-recreate failed with: Recreating owncloud_redis_1 Recreating owncloud_owncloud_1 ERROR: for owncloud open /var/lib/docker/containers/a0d6cb2437664d5a4662bd5aec085077911a4e86218c743b795786dead23ae27/.tmp-config.v2.json867766650: no such file or directory Encountered errors while bringing up the project. (1) Recreating owncloud_redis_1 Recreating owncloud_owncloud_1 ERROR: for owncloud open /var/lib/docker/containers/a0d6cb2437664d5a4662bd5aec085077911a4e86218c743b795786dead23ae27/.tmp-config.v2.json867766650: no such file or directory Encountered errors while bringing up the project. Aborting... ---------------------------------------
docker-compose -p owncloud down (cwd var/lib/univention-appcenter/apps/owncloud/compose) did the trick (removed all containers) we should add this to docker.rm() (or replace docker-compose rm with docker-compose down in docker.rm())
As discussed during the estimation workshop last week, we know of the error only once. The App Center already takes care of removing the containers of a multi container app. In the described situation something went wrong with the removal of those containers. They were therefore still present on the UCS system. Since docker compose uses the same names for creating containers there will be conflict with a new docker compose up command. I reduce the affection of this bug.