Bug 50713 - Multiple ad-connector prepare-new-instance script no longer working
Multiple ad-connector prepare-new-instance script no longer working
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: AD Connector
UCS 4.4
Other All
: P5 major (vote)
: UCS 4.4-3-errata
Assigned To: Jürn Brodersen
Johannes Keiser
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-13 16:55 CET by Yoan GUILLOT
Modified: 2020-01-29 14:07 CET (History)
4 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?: 4: A User would return the product
User Pain: 0.091
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Regression
Max CVSS v3 score:
damrose: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yoan GUILLOT 2020-01-13 16:55:04 CET
Hello,

With a previous UCS update, it seem that the script prepare-new-instance no longer working.

the main.py in /usr/share/pyshared/univention/connector/ does not exist !

I fixed this with this code but i'don't know if it's the good way :

<CODE>

  echo "-- copy startup script"
    cp /usr/sbin/univention-ad-connector /usr/sbin/univention-ad-"$CONFIGBASENAME"
    sed -i "s|/usr/share/pyshared/univention/connector/ad/main.py.*|/usr/share/pyshared/univention/connector/ad/main.py --configbase \"$CONFIGBASENAME\"|" /usr/sbin/univention-ad-"$CONFIGBASENAME"
    sed -i "s|/etc/univention/connector/ad/mapping|/etc/univention/$CONFIGBASENAME/ad/mapping|g" /usr/sbin/univention-ad-"$CONFIGBASENAME"

</CODE>

Replace with :
<CODE>
echo "-- copy startup script"
    cp /usr/sbin/univention-ad-connector /usr/sbin/univention-ad-"$CONFIGBASENAME"
sed -i "s|/usr/bin/python2.7 -W ignore -m univention.connector.ad.main \"$@\"|/usr/bin/python2.7 -W ignore -m univention.connector.ad.main \"$@\" --configbase \"$CONFIGBASENAME\"|" /usr/sbin/univention-ad-"$CONFIGBASENAME"
 sed -i "s|/etc/univention/connector/ad/mapping|/etc/univention/$CONFIGBASENAME/ad/mapping|g" /usr/sbin/univention-ad-"$CONFIGBASENAME"


</CODE>
Comment 1 Erik Damrose univentionstaff 2020-01-13 17:14:38 CET
Thank you for the bug report, it seems this is a regression which was introduced during the dh_python migration (Bug 49168).
Comment 2 Jürn Brodersen univentionstaff 2020-01-28 13:57:31 CET
[4.4-3 1cf59612e4] Bug #50674: fix ad-connector prepare-new-instance

Package: univention-ad-connector
Version: 13.0.0-28A~4.4.0.202001281356
Branch: ucs_4.4-0
Scope: errata4.4-3

Sorry I got the wrong bug number for the commit :(
Comment 3 Jürn Brodersen univentionstaff 2020-01-29 10:44:15 CET
[4.4-3 61b6984dca] Bug #50713: add "$@" to prepare-new-instance
[4.4-3 a3b636c8c7] Bug #50713: yaml

Package: univention-ad-connector
Version: 13.0.0-29A~4.4.0.202001291041
Branch: ucs_4.4-0
Scope: errata4.4-3
Comment 4 Johannes Keiser univentionstaff 2020-01-29 12:00:37 CET
OK: code replacement from /usr/sbin/univention-ad-connector
OK: yaml
-> verified
Comment 5 Erik Damrose univentionstaff 2020-01-29 14:07:05 CET
<http://errata.software-univention.de/ucs/4.4/429.html>