Bug 43155 - ucs-school-join-secondary-samba4 failed
ucs-school-join-secondary-samba4 failed
Status: CLOSED WONTFIX
Product: UCS@school
Classification: Unclassified
Component: General
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.x
Assigned To: UCS@school maintainers
:
Depends on: 46006
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-12 07:13 CET by Stefan Gohmann
Modified: 2023-06-12 15:39 CEST (History)
9 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.114
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
workaround (1.13 KB, patch)
2016-12-21 17:08 CET, Daniel Tröder
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2016-12-12 07:13:02 CET
The Jenkins setup NoImportTests,s4-with-slave failed:

Execute: /root/ucs-school-join-secondary-samba4 --dcaccount Administrator --dcpwd /tmp/univention --rootpassword /tmp/univention 10.210.108.237
[...]
Traceback (most recent call last):
  File "/usr/sbin/univention-add-app", line 152, in <module>
    requested_app.unregister_all_and_register(previously_registered)
TypeError: unregister_all_and_register() takes at least 4 arguments (2 given)
*** Failed 1: /root/ucs-school-join-secondary-samba4 --dcaccount Administrator --dcpwd /tmp/univention --rootpassword /tmp/univention 10.210.108.237

http://jenkins.knut.univention.de:8080/job/UCSschool%204.1/job/UCSschool%204.1%20(R2)%20Singleserver/ImportTests=NoImportTests,SambaVersion=s4-with-slave/321/
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2016-12-12 10:35:12 CET
According to the manual: "Auf diesem sekundären Domänencontroller wird nicht die UCS@school App installiert."

Since UCS 4.1 libunivention-ldb-modules is part of UCS (instead of UCS@school), therefore it should be sufficient to replace

univention-add-app ucsschool -l libunivention-ldb-modules || exit 1

with

univention-install -y libunivention-ldb-modules || exit 1
Comment 2 Dirk Wiesenthal univentionstaff 2016-12-12 10:42:16 CET
But yes, univention-add-app is broken when doing the legacy call.

univention-add-app ucsschool -l libunivention-ldb-modules

->

univention-add-app ucsschool -l && univention-install libunivention-ldb-modules

univention-add-app itself is soon to become a legacy call, too, though.
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2016-12-12 11:55:17 CET
(In reply to Dirk Wiesenthal from comment #2)
> univention-add-app ucsschool -l

Does "univention-add-app ucsschool -l" install the default packages of the specified app?
Comment 4 Dirk Wiesenthal univentionstaff 2016-12-12 12:11:44 CET
No, it just adds the repository
Comment 5 Daniel Tröder univentionstaff 2016-12-21 17:08:23 CET
Created attachment 8321 [details]
workaround

workaround
Comment 6 Arvid Requate univentionstaff 2017-01-18 16:36:09 CET
Running ucs-school-join-secondary-samba4 against a ucs-school-singlemaster is expected to lead to undefined behavior. See bug 43311 Comment 1.
Comment 7 Felix Botner univentionstaff 2017-11-07 16:21:35 CET
The secondary slave setup fails also in"normal" setup

UCS Master + school (without samba)
School Slave 
Secondary School Slave

The documentation states "Auf diesem sekundären Domänencontroller wird nicht die UCS@school App installiert." so i did not install school on my second slave.

But the univention-samba4 join script checks exit_on_slave_if_no_s4_connector_on_master_or_backup
and if don't have s4 on my master. The Join scripts aborts and the installation of my second slave fails.

exit_on_slave_if_no_s4_connector_on_master_or_backup actually ignores ucs@school slaves (return if samba4/provision/secondary is true). But samba4/provision/secondary is only set in the school meta packages and as described in the documentation i did not install school.

So there is more work to do here.
Comment 8 Felix Botner univentionstaff 2017-11-07 17:26:52 CET
Now i also tested the secondary school slave with samba in the central department.

And now univention-samba4 join script fails here too

File: /etc/samba/base.conf
Multifile: /etc/samba/smb.conf
ERROR: We are joining to an UCS@school domain but shell-ucs-school is not installed
ERROR: Make sure that UCS@school metapackages are installed properly

So ucs-school-join-secondary-samba4 does not work at the moment.
Comment 9 Felix Botner univentionstaff 2017-11-07 17:36:11 CET
(In reply to Felix Botner from comment #8)
> Now i also tested the secondary school slave with samba in the central
> department.
> 
> And now univention-samba4 join script fails here too
> 
> File: /etc/samba/base.conf
> Multifile: /etc/samba/smb.conf
> ERROR: We are joining to an UCS@school domain but shell-ucs-school is not
> installed
> ERROR: Make sure that UCS@school metapackages are installed properly
> 
> So ucs-school-join-secondary-samba4 does not work at the moment.

we should either drop ucs-school-join-secondary-samba4 or we should integrate it in univention-samba4/s4connector

In the univention-samba4 join script we already have helper to determine if we are in an ucs@school domain, a helper to get the school OU (empty if the server is in the central department) and helper to get the existing s4 connector dc.

With that we can easily figure out if we are the first school slave, the second school slave or if this is a slave in the central department and do the necessary steps.
Comment 10 Sönke Schwardt-Krummrich univentionstaff 2018-07-05 09:47:49 CEST
Deferred until the new samba installation concept is implemented.
Comment 11 Michel Smidt 2020-07-09 14:28:46 CEST
This issue has been filed against UCS@school 4.1.
We have discontinued support for this scenario since UCS@school 4.4.

Furthermore UCS@school 4.1 is out of maintenance and many UCS@school components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS@school versions, please reopen it and update the UCS@school version. In this case please provide detailed information on how this issue is affecting you.