Bug 48730 - call_joinscript calls joinscripts even if system is unjoined (if used e.g. in .postinst)
call_joinscript calls joinscripts even if system is unjoined (if used e.g. in...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Join (univention-join)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Philipp Hahn
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-21 23:19 CET by Sönke Schwardt-Krummrich
Modified: 2021-05-25 16:02 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.017
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 Sönke Schwardt-Krummrich univentionstaff 2019-02-21 23:19:09 CET
call_joinscript of base.sh of shell-univention-lib always calls the specified joinscript on DC master and DC backup systems even if e.g. the DC backup system has not even joined yet.
This causes some unneccessary errors and delays if software is installed before first join (→ e.g. via UCS@school join hook).
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2019-02-28 15:04:49 CET
Idea: 
call_joinscript does not call any joinscript if /var/univention-join/status does not exist or its size is 0 bytes. univention-join truncates the status file after the computer account has been created and before any "join/pre-joinscripts" hook is called.
Comment 2 Philipp Hahn univentionstaff 2020-10-15 13:07:11 CEST
I stumbled over this mis-behaviour while working on Bug #52211.

(In reply to Sönke Schwardt-Krummrich from comment #1)
> Idea: 
> call_joinscript does not call any joinscript if /var/univention-join/status ... size is 0 bytes. 

That would prevent calling ANY script as the file is empty on start.



call_joinscript now checks that "/var/univention-join/status" exists:

[5.0-0] 967f0c84dd Bug #48730 join: Only call join scripts on joined system
 doc/changelog/changelog-5.0-0.xml           | 3 +++
 management/univention-join/debian/changelog | 1 +
 management/univention-join/join.sh          | 2 ++
 3 files changed, 6 insertions(+)

Package: univention-join
Version: 12.0.0-7A~5.0.0.202010151156
Branch: ucs_5.0-0
Comment 3 Florian Best univentionstaff 2021-02-19 21:19:38 CET
Seems legit. I could not find any trouble.
This most likely won't fix the use case from comment 1 but the behavior is better than before.
The silent exit code 0 hopefully won't make any trouble.

OK: changelog entry
Comment 4 Florian Best univentionstaff 2021-05-25 16:02:14 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".