Bug 52934 - Docker container must have synchronized UCRV of the host
Docker container must have synchronized UCRV of the host
Status: NEW
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
UCS@school 5.0
Other Linux
: P5 normal with 2 votes (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-17 11:00 CET by Dirk Schnick
Modified: 2023-10-26 11:59 CEST (History)
9 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.257
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support: Yes
Flags outvoted (downgraded) after PO Review: Yes
Ticket number: 2021031521000389, 2021122821000338, 2023061321000212, 2023062121000144, 2023081621000123
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 Dirk Schnick univentionstaff 2021-03-17 11:00:02 CET
The last update of the Kelvin API causes a disfunctional import at the customer environment. The reason was, that the UCRV of the host are not in the container. Especially in the kelvin api app/container this problem will cause many support tickets the more the API will be used.

If we will dockerize more and more apps and services, we need a mechanism to synchronize our heart of configuration to these docker container.

There are already ideas and also a PoC created.
Comment 2 Dirk Ahrnke univentionstaff 2021-05-11 15:41:14 CEST
Another customer wanted to override the max length for the username which is set to 20 by default using UCRV ucsschool/username/max_length and tried to define it on the host. 
This did not work for obvious reasons. The definition of the UCRV inside the container will not survive the next update of the Kelvin-API unless there is a generic solution.
Comment 3 Erik Damrose univentionstaff 2021-05-11 15:47:34 CEST
To comment 2: Workaround is to write a custom hook script: https://docs.software-univention.de/manual-4.4.html#computers:Installation_and_Remove_hooks

The workaround does not reduce the importance of this bug report.
Comment 5 Dirk Schnick univentionstaff 2022-01-04 12:07:01 CET
And again. A customer missed the entries "Windows home drive" and "Windows logon script" after creating new users via kelvin. This was caused by empty values of these UCR in the docker. Why these UCR where lost I could not check as we do not write the logfile config-reistry-replog in the docker.

We still need a mechanism to ensure the UCR we need in a docker are set and not get lost.
Comment 6 Ingo Steuwer univentionstaff 2022-09-30 10:32:16 CEST
The long term approach for the configuration of container based implementations will be the newly released "Distributed Configuration Database" (DCD) Ap, which provides a redundant configuration store from which configuration settings can be retrieved using an API. This should fix this problem (as the Kelvin API can retrieve configuration changes automatically) and also the challenge to configure all Kelvin API deployments identically (as all Kelvin API deployments can request the configuration from the same DCD cluster).
Comment 7 Cornelius Hald 2023-05-09 10:54:11 CEST
Will there be a solution based on the current UCR or do we have to wait for DCD to get introduced?
Comment 8 Jan-Luca Kiok univentionstaff 2023-06-15 13:20:58 CEST
Happened again with the variable ucsschool/import/roleshare for a customer.
Comment 9 Christina Scheinig univentionstaff 2023-06-22 11:39:38 CEST
The customer has to change the proxy Variables, which are also not synced into the docker containers.
Comment 11 Cornelius Hald 2023-08-16 13:18:52 CEST
We have created an import hook that runs once a user gets created through Kelvin. This hook needs configuration stored in UCR.

Now if we do not have the host variables available inside the container, is there at least a way to define a set of UCR variables that are always set inside the container and that survive container restarts and updates?

Something like a "start script" for the container?
Comment 12 Ingo Steuwer univentionstaff 2023-08-17 18:16:23 CEST
(In reply to Cornelius Hald from comment #11)
> We have created an import hook that runs once a user gets created through
> Kelvin. This hook needs configuration stored in UCR.
> 
> Now if we do not have the host variables available inside the container, is
> there at least a way to define a set of UCR variables that are always set
> inside the container and that survive container restarts and updates?
> 
> Something like a "start script" for the container?

There is a hook directory for such scripts which at least covers the upgrade scenario:
https://docs.software-univention.de/manual/5.0/en/software/further-software.html#hook-scripts-for-administrators