Bug 49605 - docker-compose: left overs prevent re-installation of app
docker-compose: left overs prevent re-installation of app
Status: NEW
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: App Center maintainers
App Center maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-06-06 15:13 CEST by Felix Botner
Modified: 2019-06-24 13:49 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.086
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2019-06-06 15:13:29 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...

---------------------------------------
Comment 1 Felix Botner univentionstaff 2019-06-06 15:21:02 CEST
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())
Comment 2 Nico Gulden univentionstaff 2019-06-24 13:49:20 CEST
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.