Bug 45129 - join script 33univention-portal.inst hangs if "nc" is provided by "netcat-traditional"
join script 33univention-portal.inst hangs if "nc" is provided by "netcat-tra...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Portal
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.3
Assigned To: Stefan Gohmann
Jürn Brodersen
: interim-4
Depends on: 44601
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-03 14:18 CEST by Janek Walkenhorst
Modified: 2018-03-14 14:38 CET (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 5: Will affect all installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.057
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup, UCS Performance
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janek Walkenhorst univentionstaff 2017-08-03 14:18:26 CEST
The code should be
  if ! nc -z "$ldap_master" "${ldap_master_port:-7389}"; then
instead of
  if ! nc -w 10 "$ldap_master" "${ldap_master_port:-7389}"; then
because the "-z" function does what is intended with this code and it works with both netcat versions and it is faster.

+++ This bug was initially created as a clone of Bug #44601 +++

This is an upgrade from 4.1 to 4.2. On all our servers the "nc" binary is provided by the "netcat-traditional" package. The package "netcat-openbsd" is not installed.

In such a setup the join script hangs in the following line:

if ! nc -w 10 "$ldap_master" "${ldap_master_port:-7389}"; then
Comment 1 Stefan Gohmann univentionstaff 2018-03-10 11:54:59 CET
This slows down the UCS 4.3 join performance tests.
Comment 2 Stefan Gohmann univentionstaff 2018-03-10 12:00:46 CET
Fix:
[4.3-0 ff35061e46] * Use nc -z instead of nc -w 10 to check the LDAP server (Bug #45129)

Changelog:
[4.3-0 9637403330] Changelog Bug #45129
Comment 3 Jürn Brodersen univentionstaff 2018-03-12 13:55:16 CET
By removing the w option completely nc hangs until the TCP handshake is done which might take some time on really slow systems.

But I think that is ok.

What I tested:
Installation works -> OK

Verified
Comment 4 Stefan Gohmann univentionstaff 2018-03-14 14:38:09 CET
UCS 4.3 has been released:
 https://docs.software-univention.de/release-notes-4.3-0-en.html
 https://docs.software-univention.de/release-notes-4.3-0-de.html

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