Bug 39190 - Start and stop Docker App on detail page
Start and stop Docker App on detail page
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1
Assigned To: Dirk Wiesenthal
Stefan Gohmann
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-17 09:23 CEST by Stefan Gohmann
Modified: 2015-11-17 12:12 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
fix_update_rc_d.patch (1.75 KB, patch)
2015-10-28 17:43 CET, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2015-08-17 09:23:10 CEST
It should be possible to start and stop the Docker App on the App detail page.
Comment 1 Dirk Wiesenthal univentionstaff 2015-10-26 17:03:49 CET
Added in
  univention-appcenter 5.0.8-2.19.201510261642

But not from the App Detail Page, but the Configuration Page accessible from the Detail Page.
Comment 2 Stefan Gohmann univentionstaff 2015-10-27 07:56:09 CET
(In reply to Dirk Wiesenthal from comment #1)
> But not from the App Detail Page, but the Configuration Page accessible from
> the Detail Page.

I've installed the dudle docker App but I don't find the Configuration Page.
Comment 3 Dirk Wiesenthal univentionstaff 2015-10-27 21:00:26 CET
Configuration page can be accessed by right clicking the local installation in the grid.

owncloud8-docker has some example variables. Can also be seen just before installation.

I'll talk to Alex tomorrow to find a more appealing place for the configuration button.
Comment 4 Stefan Gohmann univentionstaff 2015-10-28 17:21:06 CET
I found it now. :)

I'm able to start and to stop Docker container. That's nice.

If I change the Autostart behavior and click on apply, the old value is shown after reopening the dialog.
Comment 5 Arvid Requate univentionstaff 2015-10-28 17:43:17 CET
Created attachment 7231 [details]
fix_update_rc_d.patch

One more thing: Felix discovered that the /etc/rc*.d links are note created for the /etc/init.d/docker-app-* scripts. I guess the attached patch would fix this.
Comment 6 Dirk Wiesenthal univentionstaff 2015-10-29 00:12:30 CET
(In reply to Arvid Requate from comment #5)
> Created attachment 7231 [details]
> fix_update_rc_d.patch
> 
> One more thing: Felix discovered that the /etc/rc*.d links are note created
> for the /etc/init.d/docker-app-* scripts. I guess the attached patch would
> fix this.

Isn't that Bug#39429? At least the update-rc code is not from this bug.

Furthermore I do not see what your patch fixes. The problem was an absolute path? But it is needed when symlinking. And update-rc.d is called with os.path.basename().
Comment 7 Dirk Wiesenthal univentionstaff 2015-10-29 00:48:14 CET
(In reply to Stefan Gohmann from comment #4)
> I found it now. :)
> 
> I'm able to start and to stop Docker container. That's nice.
> 
> If I change the Autostart behavior and click on apply, the old value is
> shown after reopening the dialog.

Fixed in
  univention-appcenter 5.0.10-1.29.201510290045
Comment 8 Stefan Gohmann univentionstaff 2015-10-29 07:14:57 CET
(In reply to Stefan Gohmann from comment #4)
> If I change the Autostart behavior and click on apply, the old value is
> shown after reopening the dialog.

Now, I'm able to change the drop down and the changed value is shown after reopening the App settings. The UCR variable is set correctly.

But I don't see a link in /etc/rc*.d for the App init script. Thus, after setting the App to do an automatic start, stop the container and reboot the system, the App is not started after the reboot.

I see this message in the appcenter.log:
 24330 actions.install                  15-10-28 20:17:57 [    INFO]: Marking dudle-docker=1.0.0-2 as installed
 24330 actions.install                  15-10-28 20:17:59 [    INFO]: Creating /etc/init.d/docker-app-dudle-docker
 24330 actions.install                  15-10-28 20:17:59 [   DEBUG]: update-rc.d does not exist
Comment 9 Dirk Wiesenthal univentionstaff 2015-10-29 09:35:01 CET
Fixed in
  univention-appcenter 5.0.10-2.30.201510290929
Comment 10 Stefan Gohmann univentionstaff 2015-10-30 07:13:15 CET
It looks better now.

One small thing, I've stopped the dudle app and tried to configure that the start will be prevented. I received the following traceback:

Execution of command 'appcenter/configure' has failed:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 283, in execute
    function(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 190, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/__init__.py", line 231, in configure
    configure.call(app=app, set_vars=values, autostart=autostart)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/__init__.py", line 176, in call
    return obj.call_with_namespace(namespace)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/__init__.py", line 182, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/configure.py", line 89, in main
    self._set_timezone(args.app)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/configure.py", line 215, in _set_timezone
    with open(cont_tz_file, 'wb') as f:
IOError: [Errno 2] No such file or directory: '/var/lib/docker/overlay/7beaab5e5dd7caa1ea908380b6d899da3ec2aebb10173859203612b07aacb4b7/merged/etc/timezone'
Comment 11 Dirk Wiesenthal univentionstaff 2015-10-30 12:27:30 CET
OK, this is Bug#39483, I will fix it there. When I have to change the _set_timezone method, I want to get a dedicated QA.
Comment 12 Stefan Gohmann univentionstaff 2015-10-31 10:05:23 CET
OK, it works now. I've checked the debug log and I was wondering how often the Apps are loaded and unloaded. I've created a new bug for it: Bug #39693.
Comment 13 Stefan Gohmann univentionstaff 2015-11-17 12:12:36 CET
UCS 4.1 has been released:
 https://docs.software-univention.de/release-notes-4.1-0-en.html
 https://docs.software-univention.de/release-notes-4.1-0-de.html

If this error occurs again, please use "Clone This Bug".