Univention Bugzilla – Bug 44286
apps systemd status broken after docker app is removed (until reboot)
Last modified: 2017-05-03 15:16:16 CEST
If one installs a docker app at some point the container is started with /etc/init.d/docker-app-tecart start now something bad happens (join fails etc) and the app is removed, but the init script is not called with "STOP", so systemd still thinks docker-app-tecart is started. -> systemctl status docker-app-tecart ● docker-app-tecart.service Loaded: not-found (Reason: No such file or directory) Active: active (exited) since Di 2017-04-04 15:17:34 CEST; 20min ago -> univention-app info UCS: 4.2-0 errata0 App Center compatibility: 4 Installed: 4.1/digitec-suitecrm=7.6.3-2 4.1/dudle=1.1.0-1 4.1/etherpad-lite=1.6.0 Upgradable: digitec-suitecrm dudle etherpad-lite Now the second installation of the app fails because /etc/init.d/docker-app-tecart start is called but systemd does not actually start the container (because it still thinks everything is ok) Only after a restart i can try again to install the app.
Part of the "Join Problems"?
--- python/appcenter-docker/actions/docker_remove.py (Revision 78743) +++ python/appcenter-docker/actions/docker_remove.py (Arbeitskopie) @@ -37,6 +37,7 @@ from univention.appcenter.actions import Abort from univention.appcenter.actions.remove import Remove from univention.appcenter.actions.docker_base import DockerActionMixin +from univention.appcenter.actions.service import Stop class Remove(Remove, DockerActionMixin): @@ -72,5 +73,6 @@ raise Abort('Could not backup container!') docker = self._get_docker(app) if docker.container: + Stop.call(app=app) docker.stop() docker.rm() best solution so far, stop container in _remove_docker_container() so that the systemd status after revert is correct
(In reply to Felix Botner from comment #2) > --- python/appcenter-docker/actions/docker_remove.py (Revision 78743) > +++ python/appcenter-docker/actions/docker_remove.py (Arbeitskopie) > @@ -37,6 +37,7 @@ > from univention.appcenter.actions import Abort > from univention.appcenter.actions.remove import Remove > from univention.appcenter.actions.docker_base import DockerActionMixin > +from univention.appcenter.actions.service import Stop > > > class Remove(Remove, DockerActionMixin): > @@ -72,5 +73,6 @@ > raise Abort('Could not backup container!') > docker = self._get_docker(app) > if docker.container: > + Stop.call(app=app) > docker.stop() > docker.rm() > > best solution so far, stop container in _remove_docker_container() so that > the systemd status after revert is correct univention-appcenter r78989 errata4.2-0
OK, works
<http://errata.software-univention.de/ucs/4.2/6.html>