Univention Bugzilla – Bug 49517
run ucr filter on docker-compose file before using the file
Last modified: 2019-06-05 15:55:59 CEST
Curretly we can not use @!@ in the docker-compose file. It is used before applying UCR (before @!@ is executed) but various tools/steps have problems with our UCR notation File "/usr/lib/python2.7/dist-packages/univention/appcenter/app.py", line 989, in get_docker_image_name content = yaml.load(open(yml_file), yaml.RoundTripLoader, preserve_quotes=True) % utf8(ch), self.get_mark()) ScannerError: while scanning for the next token found character '@' that cannot start any token in "/var/cache/univention-appcenter/appcenter-test.software-univention.de/4.4/wekan_20190520122559.compose", line 71, column 9 Traceback (most recent call last): or Running command: docker-compose -p wekan pull yaml.scanner.ScannerError: while scanning for the next token found character '@' that cannot start any token in "./docker-compose.yml", line 71, column 1 Command docker-compose -p wekan pull failed with: yaml.scanner.ScannerError: while scanning for the next token found character '@' that cannot start any token in "./docker-compose.yml", line 71, column 1 (1) Downloading Docker image quay.io/wekan/wekan:v2.74 failed: yaml.scanner.ScannerError: while scanning for the next token found character '@' that cannot start any token in "./docker-compose.yml", line 71, column 1 Aborting... so, the first thing we have to do for compose apps is to (ucr) convert the compose file.
Created attachment 10038 [details] appcenter.patch naive patch
0541404346b97b72352fc833f4359a131d8a2e0b univention-appcenter 9e9575a64aa9895de3d375cfca99f726f3afbe34 yaml changed three things actually, (1) "ucr commit" docker compose file before yaml.load use self._setup_yml in MultiDocker.pull, so that we always work on the committed yaml file (2) respect order of env variables in MultiDocker._setup_yml, so that we are able to overwrite our default settings in the future (3) check docker-compose in MultiDocker.create and raise DockerCouldNotStartContainer with actual error message + limit status_details to 500 char for _send_information
Looks good.
<http://errata.software-univention.de/ucs/4.4/141.html>