Bug 43434 - univention-app dev-use-test-appcenter should update containers too
univention-app dev-use-test-appcenter should update containers too
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.3-0-errata
Assigned To: Dirk Wiesenthal
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-27 12:22 CET by Felix Botner
Modified: 2018-06-06 16:16 CEST (History)
0 users

See Also:
What kind of report is it?: Development Internal
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:
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 2017-01-27 12:22:05 CET
univention-app dev-use-test-appcenter changes to the test App Center. But this is rather pointless unless i do the same in the container (e.g. update test, the host has to know the new version but the container too)

So it would be nice if dev-use-test-appcenter would update all (appbox) containers to make them use the test App Center too.
Comment 1 Dirk Wiesenthal univentionstaff 2018-05-16 21:14:01 CEST
Fixed in
  univention-appcenter 7.0.1-44A~4.3.0.201805162111

If Non-Docker:
  update repository/online/component/$component_id/server
  (in fact, do "univention-app register $app --component)
If Docker, run inside container (if appbox):
  univention-install univention-appcenter-dev
  univention-app dev-use-test-appcenter
This works because of recursion. Requires appbox:4.3-0 with updated packages though.
Comment 2 Felix Botner univentionstaff 2018-05-18 11:08:41 CEST
my opinion is we should set the appcenter ucr variables and component in the container and not use univention-appcenter-dev to be more independent from the appbox version
Comment 3 Dirk Wiesenthal univentionstaff 2018-05-24 21:38:54 CEST
OK, done. I am now setting 4 variables directly inside the container.

repository/online/component/%s/server
repository/app_center/server
update/secure_apt
appcenter/index/verify

This is pretty much what univention-app dev-use-test-appcenter does.
Comment 4 Felix Botner univentionstaff 2018-05-25 16:02:03 CEST
please run univention-app update in container (univention-app exists)
Comment 5 Dirk Wiesenthal univentionstaff 2018-05-29 10:53:04 CEST
I changed it back to using
  univention-app dev-use-test-appcenter
inside the appbox container. This calls univention-app update by itself.

Other Apps will not be changed.
Comment 6 Felix Botner univentionstaff 2018-05-30 11:15:17 CEST
nope,

i get 

  DEBUG]: Using container.4348 for container 43482f76d1866f50651768f04b39537ba59343a1d591da44680f7b151ba89f98
 26803 actions.upgrade-search.container.4348 18-05-30 11:08:35 [   DEBUG]: Calling docker exec 43482f76d1866f50651768f04b39537ba59343a1d591da44680f7b151ba89f98 /usr/share/univention-docker-container-mode/update_available --app tine20 --app-version 2017.11.8-ucs1 --error-file /var/univention/tmp/tmpHkkVVv
 26803 actions.upgrade-search.container.4348 18-05-30 11:08:35 [    INFO]: release: 4.2-3
 26803 actions.upgrade-search.container.4348 18-05-30 11:08:35 [    INFO]: 4.2/tine20=2017.11.8-ucs1: Update available: release: 4.2-3
 26803 actions.upgrade-search.progress  18-05-30 11:08:35 [   DEBUG]: 100
 24289 actions.dev-use-test-appcenter.container.f5b5 18-05-30 11:13:20 [    INFO]: Do you want to continue? [Y/n] ^[[B
 24289 actions.dev-use-test-appcenter.container.f5b5 18-05-30 11:13:20 [    INFO]: Abort.
 24289 actions.dev-use-test-appcenter.container.f5b5 18-05-30 11:13:20 [   DEBUG]: Using container.f5b5 for container f5b5c3c2fee97665a50f583cf5a24f6e03cb55cdcac5ff6c2b9c4bb742920563
 24289 actions.dev-use-test-appcenter.container.f5b5 18-05-30 11:13:20 [   DEBUG]: Calling docker exec -it f5b5c3c2fee97665a50f583cf5a24f6e03cb55cdcac5ff6c2b9c4bb742920563 univention-app dev-use-test-appcenter --appcenter-host appcenter-test.software-univention.de
 24289 actions.dev-use-test-appcenter.container.f5b5 18-05-30 11:13:20 [    INFO]: 
 24289 actions.dev-use-test-appcenter.container.f5b5 18-05-30 11:13:20 [    INFO]: 
 24289 actions.dev-use-test-appcenter.container.f5b5 18-05-30 11:13:20 [    INFO]: 
 24289 actions.dev-use-test-appcenter.container.f5b5 18-05-30 11:13:20 [    INFO]: 
 24289 actions.dev-use-test-appcenter.container.f5b5 18-05-30 11:13:20 [    INFO]: usage: univention-app
 24289 actions.dev-use-test-appcenter.container.f5b5 18-05-30 11:13:20 [    INFO]: univention-app: error: argument action: invalid choice: 'dev-use-test-appcenter' (choose from 'configure', 'domain', 'get', 'info', 'install', 'list', 'register', 'remove', 'stall', 'update', 'upgrade', 'upgrade-search')
 24289 actions.dev-use-test-appcenter   18-05-30 11:13:21 [    INFO]: Updating samba-memberserver=4.7
 24289 actions.register                 18-05-30 11:13:21 [   DEBUG]: Calling register
 24289 actions.register.progress        18-05-30 11:13:21 [   DEBUG]: 0
 24289 actions.register                 18-05-30 11:13:21 [    INFO]: No repository to register
 24289 actions.register.progress        18-05-30 11:13:22 [   DEBUG]: 100
 24289 actions.dev-use-test-appcenter   18-05-30 11:13:22 [    INFO]: Updating 4.2/tine20=2017.11.8-ucs1
 24289 actions.register                 18-05-30 11:13:22 [   DEBUG]: Calling register
 24289 actions.register.progress        18-05-30 11:13:22 [   DEBUG]: 0
 24289 actions.register                 18-05-30 11:13:22 [    INFO]: Component needs to be registered in the container
 24289 actions.register.progress        18-05-30 11:13:23 [   DEBUG]: 100
 24289 actions.start                    18-05-30 11:13:23 [   DEBUG]: Calling start
 24289 actions.start.progress           18-05-30 11:13:23 [   DEBUG]: 0
 24289 actions.start                    18-05-30 11:13:23 [   DEBUG]: Calling /etc/init.d/docker-app-tine20 start
 24289 actions.start                    18-05-30 11:13:23 [    INFO]: Starting docker-app-tine20 (via systemctl): docker-app-tine20.service.
 24289 actions.start                    18-05-30 11:13:23 [   DEBUG]: /etc/init.d/docker-app-tine20 returned with 0
 24289 actions.start.progress           18-05-30 11:13:23 [   DEBUG]: 100
 24289 actions.dev-use-test-appcenter   18-05-30 11:13:23 [    INFO]: Updating container... (checking for appbox)
 24289 actions.dev-use-test-appcenter.container.4348 18-05-30 11:13:23 [   DEBUG]: Using container.4348 for container 43482f76d1866f50651768f04b39537ba59343a1d591da44680f7b151ba89f98
 24289 actions.dev-use-test-appcenter.container.4348 18-05-30 11:13:23 [   DEBUG]: Calling docker exec -it 43482f76d1866f50651768f04b39537ba59343a1d591da44680f7b151ba89f98 which univention-app
 24289 actions.dev-use-test-appcenter.container.4348 18-05-30 11:13:23 [    INFO]: /usr/bin/univention-app
 24289 actions.dev-use-test-appcenter   18-05-30 11:13:23 [    INFO]: ... setting the new App Center inside the container
 24289 actions.dev-use-test-appcenter.container.4348 18-05-30 11:13:23 [   DEBUG]: Using container.4348 for container 43482f76d1866f50651768f04b39537ba59343a1d591da44680f7b151ba89f98
 24289 actions.dev-use-test-appcenter.container.4348 18-05-30 11:13:23 [   DEBUG]: Calling docker exec -it 43482f76d1866f50651768f04b39537ba59343a1d591da44680f7b151ba89f98 univention-install univention-appcenter-dev
 24289 actions.dev-use-test-appcenter.container.4348 18-05-30 11:13:47 [    INFO]: 
 24289 actions.dev-use-test-appcenter.container.4348 18-05-30 11:13:49 [    INFO]: Get:1 https://appcenter.softw

and had to press enter several times to get the command going (on the host, maybe --non-interactive for the install command in the container?)
Comment 7 Dirk Wiesenthal univentionstaff 2018-05-30 14:01:50 CEST
You are right. Fixed for 4.3 appbox images by adding
 -y
to univention-install.
Comment 8 Felix Botner univentionstaff 2018-05-30 16:13:55 CEST
Setting up apt-utils (1.4.8A~4.3.0.201711271936) ...
Setting up univention-appcenter-dev (7.0.1-37A~4.3.0.201804161750) ...
Processing triggers for python-support (1.0.15.18.201403132013) ...
Traceback (most recent call last):
  File "/usr/bin/univention-app", line 91, in <module>
    main()
  File "/usr/bin/univention-app", line 73, in main
    add_action(subparsers, action())
  File "/usr/bin/univention-app", line 54, in add_action
    action.setup_parser(subparser)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/local_appcenter.py", line 636, in setup_parser
    parser.add_argument('--appcenter-host', default=ip_address.ip, help='The hostname of the new App Center. Default: %(default)s')
AttributeError: 'NoneType' object has no attribute 'ip'
Comment 9 Dirk Wiesenthal univentionstaff 2018-05-30 17:24:07 CEST
Fixed in
  univention-appcenter 7.0.1-58A~4.3.0.201805301718
Comment 10 Felix Botner univentionstaff 2018-05-31 10:50:58 CEST
OK
Comment 11 Erik Damrose univentionstaff 2018-06-06 16:16:19 CEST
<http://errata.software-univention.de/ucs/4.3/91.html>