Univention Bugzilla – Bug 43324
restore_data_before_setup restores slightly broken UCR variables
Last modified: 2017-01-18 13:58:25 CET
From the logs: ** Restore normal UCR layer: [..., 'domainname= nosamba.intranet', 'gateway= 172.17.42.1', ...] The script adds one leading space to each and every value. Interestingly, this is barely noticeable. Many services still work. When fixing this, I feel we should extend the BLACKLIST of UCRVs not copied by those set by the App Center itself (ldap/*, repository/app_center_server', ...).
(In reply to Dirk Wiesenthal from comment #0) > When fixing this, I feel we should extend the BLACKLIST of UCRVs not copied > by those set by the App Center itself (ldap/*, > repository/app_center_server', ...). This may not be a good idea as we then need to keep those lists in sync.
I don't understand the problem, can you explain again?
The problem is that when exchanging an appbox container, UCR is first dumped into a backup file and then restored. This second phase is buggy as it reads the backup base.conf and splits on ':' rather than ': '. Thus, the stored value gets an additional ' ' when restored, leading to ucr set 'domainname= nosamba.intranet'
Ah okay. Why do you parse UCR by yourself? That's not good, even if you know to split at ': ' (which was obviously not done :D) there can also be issues with encodings. Can't you ucr.load(); json.dumps(dict(ucr)) for the backup?
Fixed in univention-docker-container-mode 1.0.14-8.69.201701171421 (In reply to Florian Best from comment #4) > Ah okay. Why do you parse UCR by yourself? Using native UCR functions would be better, yes. But this fix is far less complicated when changing only the erroneous split().
OK - restore_data_before_setup in container OK - merged to 4.2-0 OK - YAML
<http://errata.software-univention.de/ucs/4.1/378.html>