Bug 41335 - Multiple AD-Connector instances
Multiple AD-Connector instances
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: AD Connector
UCS 3.3
Other Linux
: P5 normal (vote)
: UCS 4.2-2-errata
Assigned To: Florian Best
Arvid Requate
:
Depends on: 34410
Blocks: 42524
  Show dependency treegraph
 
Reported: 2016-05-24 19:59 CEST by Arvid Requate
Modified: 2017-11-01 13:49 CET (History)
3 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?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.046
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional): Troubleshooting
Max CVSS v3 score:
oyen: Patch_Available+


Attachments
Patch: prevent multiple ad-connector instances (1.86 KB, patch)
2017-01-31 15:18 CET, Lukas Oyen
Details | Diff
Patch: prevent multiple ad-connector instances (1.86 KB, patch)
2017-01-31 15:28 CET, Lukas Oyen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2016-05-24 19:59:56 CEST
Same for AD-Connector: I just type "univention-ad-connector" as root and hit return and then I have another AD-Connector running. Even worse:

root@master:~# univention-ad-connector --help

And you started yet another one.


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

Ticket#: 2014031921010642

We have seen three customer systems running multiple (two) instances of the s4-connector. There sould be some logic to prevent this.
Comment 1 Lukas Oyen univentionstaff 2017-01-31 15:18:57 CET
Created attachment 8389 [details]
Patch: prevent multiple ad-connector instances

The attached is a port of what was implemented in bug #34410 for the s4-connector.

This prevents multiple ad-connector instances from running.
Comment 2 Florian Best univentionstaff 2017-01-31 15:22:16 CET
(In reply to Lukas Oyen from comment #1)
> Created attachment 8389 [details]
> Patch: prevent multiple ad-connector instances
> 
> The attached is a port of what was implemented in bug #34410 for the
> s4-connector.
> 
> This prevents multiple ad-connector instances from running.

The patch contains multiple references to the S4-Connector. The error messages should say "AD-Connector" and the lockfile path should not be /var/lock/univention-s4-connector.
Comment 3 Lukas Oyen univentionstaff 2017-01-31 15:28:51 CET
Created attachment 8390 [details]
Patch: prevent multiple ad-connector instances

(In reply to Florian Best from comment #2)
> The patch contains multiple references to the S4-Connector. The error
> messages should say "AD-Connector" and the lockfile path should not be
> /var/lock/univention-s4-connector.

Sorry, right. It seemed so simple, that I overlooked that.

Thank you!
Comment 4 Florian Best univentionstaff 2017-07-25 18:42:59 CEST
The patch has been applied.

univention-ad-connector (11.0.6-15):
r81375 | Bug #41335: prevent starting multiple AD connector instances

univention-ad-connector.yaml:
r81376 | YAML Bug #41335
Comment 5 Arvid Requate univentionstaff 2017-08-30 15:40:16 CEST
After the package update "univention-ad-connector --help" still starts a second process. I think a "/etc/init.d/univention-ad-connector start" is required in postinst for update situations.

===========================================================================
root@master10:~# univention-upgrade 

Starting univention-upgrade. Current UCS version is 4.2-1 errata144

Checking for local repository:                          none
Checking for package updates:                           found

The following packages will be installed:
 python-pexpect
The following packages will be upgraded:
 libpq5,shell-univention-lib,python-univention-lib,univention-base-packages,univention-base-files,univention-apache,univention-web-js,univention-web-style,univention-management-console-login,univention-management-console-frontend,univention-management-console-web-server,univention-management-console-module-updater,univention-updater,univention-management-console-module-join,univention-join,univention-management-console,univention-management-console-server,python-univention-management-console,univention-management-console-module-setup,univention-system-setup,univention-management-console-module-apps,univention-appcenter,univention-appcenter-docker,univention-management-console-module-appcenter,python-univention-appcenter,univention-management-console-module-diagnostic,univention-ad-connector,univention-management-console-module-adconnector,python-univention-connector-ad,python-univention-connector,univention-ldap-acl-master,univention-ldap-server,univention-ldap-config,postgresql-client-9.1,postgresql-client-9.4,univention-samba4,univention-samba4-sysvol-sync,univention-s4-connector,python-univention-connector-s4,python-univention-directory-reports,univention-directory-reports,univention-firewall,univention-ldap-client

Do you want to continue [Y|n]? 

Starting package upgrade                                done

Starting univention-upgrade. Current UCS version is 4.2-1 errata144

Checking for local repository:                          none
Checking for package updates:                           none
Checking for app updates:                               none
Checking for release updates:                           none
Setting update/available

root@master10:~# ps ax | grep conn
 8723 ?        S      0:01 /usr/bin/python2.7 -W ignore /usr/share/pyshared/univention/connector/ad/main.py
17471 ?        S      0:00 /usr/bin/python2.7 -W ignore /usr/lib/pymodules/python2.7/univention/s4connector/s4/main.py
21214 pts/0    S+     0:00 grep conn

root@master10:~# univention-ad-connector --help

root@master10:~# ps ax | grep conn
 8723 ?        S      0:01 /usr/bin/python2.7 -W ignore /usr/share/pyshared/univention/connector/ad/main.py
17471 ?        S      0:00 /usr/bin/python2.7 -W ignore /usr/lib/pymodules/python2.7/univention/s4connector/s4/main.py
21250 ?        S      0:00 /usr/bin/python2.7 -W ignore /usr/share/pyshared/univention/connector/ad/main.py
21252 pts/0    S+     0:00 grep conn

root@master10:~# dpkg -l univention-ad-connector | tail -1
ii  univention-ad-connector 11.0.6-25A~4.2.0.201708231431 all          UCS - Modules for sync UCS and Active Directory
Comment 6 Florian Best univentionstaff 2017-08-30 17:43:31 CEST
Strange, I added a crestart to the python-univention-connector-ad postinst. There is already one in univention-ad-connector.

univention-ad-connector (11.0.6-26):
r82558 | Bug #41335: restart AD Connector in postinst
Comment 7 Arvid Requate univentionstaff 2017-08-31 10:37:52 CEST
python-univention-connector-ad (11.0.6-26A~4.2.0.201708301735) wird eingerichtet ...
/var/lib/dpkg/info/python-univention-connector-ad.postinst: 40: /var/lib/dpkg/info/python-univention-connector-ad.postinst: Syntax error: ";;" unexpected (expecting "then")
dpkg: Fehler beim Bearbeiten des Paketes python-univention-connector-ad (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 2 zurück
univention-management-console-module-adconnector (11.0.6-26A~4.2.0.201708301735) wird eingerichtet ...
Calling joinscript 35univention-management-console-module-adconnector.inst ...
2017-08-30 23:23:43.802457915+02:00 (in joinscript_init)
Joinscript 35univention-management-console-module-adconnector.inst finished with exitcode 1
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von univention-ad-connector:
 univention-ad-connector hängt ab von python-univention-connector-ad (= 11.0.6-26A~4.2.0.201708301735); aber:
  Paket python-univention-connector-ad ist noch nicht konfiguriert.
Comment 8 Florian Best univentionstaff 2017-08-31 10:48:57 CEST
New package is building.

univention-ad-connector (11.0.6-27):
r82560 | Bug #41335: fix typo
Comment 9 Arvid Requate univentionstaff 2017-09-04 15:16:34 CEST
Ok, works.
Comment 10 Arvid Requate univentionstaff 2017-11-01 13:49:21 CET
<http://errata.software-univention.de/ucs/4.2/205.html>