Bug 39196 - Docker App join
Docker App join
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1
Assigned To: Dirk Wiesenthal
Stefan Gohmann
: interim-1
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-17 09:45 CEST by Stefan Gohmann
Modified: 2015-11-17 12:12 CET (History)
0 users

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

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:45:21 CEST
During the App installation, the Docker App joins into the UCS domain. Therefore, an account for the Docker container is created in the UCS management system. The account type can be chosen by the App. By default a member server is used but also a domain controller slave account is possible.

A setup script will be executed during the domain join. The script gets the credentials of the user who is logged in. The script is executed inside the container via docker exec.
Comment 1 Dirk Wiesenthal univentionstaff 2015-09-25 10:46:55 CEST
Works. In the ini file:

DockerServerRole=[memberserver]/domaincontroller_slave
DockerScriptSetup=[/usr/share/univention-docker-container-mode/setup]

See univention-docker-container-mode for the default setup script
Comment 2 Stefan Gohmann univentionstaff 2015-09-29 07:04:35 CEST
I've added a test case for the variable DockerServerRole: 80_docker/52_app_install_dc_slave. Currently, it doesn't work:

-----------------------------------------------------------------------------
Setting up sxyv4jm60f (5.5.4) ...
Calling app join scripts...
Search LDAP binddn 

**************************************************************************
* Running join scripts failed!                                           *
**************************************************************************
* Message:  Invalid credentials
**************************************************************************
Something went wrong while installing the app
Something went wrong while installing the app

Setup script failed!
Aborting...
Going to remove xm0e9639pd (2.0.5)
-----------------------------------------------------------------------------

Do I need to define a different container or a different setup script?
Comment 3 Stefan Gohmann univentionstaff 2015-09-29 07:59:51 CEST
The ldap/server/name is set to the local container:

root@sqhcogtadn-1443485649167907:/# ucr search --brief ldap/server/name
ldap/server/name: sqhcogtadn-1443485649167907.deadlock41.intranet

The memberserver container doesn't contain an LDAP server.
Comment 4 Dirk Wiesenthal univentionstaff 2015-10-01 17:22:03 CEST
Setting DockerServerRole=domaincontroller_slave should be carefully. If you do this but do not adjust DockerImage to a slave image, you need to be aware of the fact that univention-join sets some variables according to the server/role domaincontroller_slave.

One way out could be to install an LDAP server like a real Slave does. This done by overwriting the setup script and calling univention-install in it.
Comment 5 Stefan Gohmann univentionstaff 2015-10-02 07:28:18 CEST
It works and I've added test scripts for this:
 51_app_install
 52_app_install_dc_slave

For the DC Slave installation, I've added a simple setup script:

univention-install --yes --no-install-recommends univention-server-slave univention-server-member-
/usr/share/univention-docker-container-mode/setup "$@"
Comment 6 Stefan Gohmann univentionstaff 2015-11-17 12:12:14 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".