Univention Bugzilla – Bug 32194
Tool for removing s4 connector rejects via CLI
Last modified: 2014-09-11 14:51:14 CEST
Created attachment 5360 [details] Tool for removing entries from S4 connector reject list The attached script is able to remove rejects from S4 connector reject list. # ./univention-s4connector-manage-rejected -h Usage: univention-s4connector-manage-rejected --delete --ucstos4 <UCS-DN> univention-s4connector-manage-rejected --delete --s4toucs <S4-DN> Options: -h, --help show this help message and exit -d, --delete delete given reject --dryrun perform only a dry-run --ucstos4=UCSDN perform action in UCS-to-S4 queue --s4toucs=S4DN perform action in S4-to-UCS queue --nobackup disable automatic backup # Backup is written to /var/lib/univention-connector/s4.BACKUP/
*** Bug 31933 has been marked as a duplicate of this bug. ***
(In reply to Stefan Gohmann from comment #1) > *** Bug 31933 has been marked as a duplicate of this bug. *** Set Target Milestone from Bug #31933.
YAML: r51756 * Two tools for removing rejected objects have been added: /usr/share/univention-s4-connector/remove_ucs_rejected.py /usr/share/univention-s4-connector/remove_s4_rejected.py Code: r51754 + r51755
Hmm, strange? Maybe the connector needs to be stopped before running the tools? I purposley broke the s4connector to have rejects. With the s4-connector running I see two cases: A) Created one user via UDM -> two rejects -> use the tool once -> one left. Ok, maybe that's how the tool works. Then check case B) below the log output ======================================================================== root@master40:/usr/share/ucs-test/52_s4connector# univention-s4connector-list-rejected UCS rejected 1: UCS DN: uid=user2,cn=users,dc=ar320i1,dc=qa S4 DN: <not found> Filename: /var/lib/univention-connector/s4/1389123762.164250 2: UCS DN: uid=user2,cn=users,dc=ar320i1,dc=qa S4 DN: <not found> Filename: /var/lib/univention-connector/s4/1389123762.237911 S4 rejected last synced USN: 3875 root@master40:/usr/share/ucs-test/52_s4connector# /usr/share/univention-s4-connector/remove_ucs_rejected.py uid=user2,cn=users,dc=ar320i1,dc=qa The rejected UCS object uid=user2,cn=users,dc=ar320i1,dc=qa has been removed. root@master40:/usr/share/ucs-test/52_s4connector# univention-s4connector-list-rejected UCS rejected 1: UCS DN: uid=user2,cn=users,dc=ar320i1,dc=qa S4 DN: <not found> Filename: /var/lib/univention-connector/s4/1389123762.237911 S4 rejected last synced USN: 3875 ======================================================================== B) Create two users -> 4 rejects -> apply tool to second user DN -> two rejects gone. Apply tool to first user DN -> zombies.. ======================================================================== root@master40:/usr/share/ucs-test/52_s4connector# univention-s4connector-list-rejected UCS rejected 1: UCS DN: uid=user3,cn=users,dc=ar320i1,dc=qa S4 DN: <not found> Filename: /var/lib/univention-connector/s4/1389124017.622560 2: UCS DN: uid=user3,cn=users,dc=ar320i1,dc=qa S4 DN: <not found> Filename: /var/lib/univention-connector/s4/1389124017.677024 3: UCS DN: uid=user4,cn=users,dc=ar320i1,dc=qa S4 DN: <not found> Filename: /var/lib/univention-connector/s4/1389124021.696167 4: UCS DN: uid=user4,cn=users,dc=ar320i1,dc=qa S4 DN: <not found> Filename: /var/lib/univention-connector/s4/1389124021.753508 S4 rejected last synced USN: 3875 root@master40:/usr/share/ucs-test/52_s4connector# /usr/share/univention-s4-connector/remove_ucs_rejected.py uid=user4,cn=users,dc=ar320i1,dc=qa The rejected UCS object uid=user4,cn=users,dc=ar320i1,dc=qa has been removed. root@master40:/usr/share/ucs-test/52_s4connector# univention-s4connector-list-rejected UCS rejected 1: UCS DN: uid=user3,cn=users,dc=ar320i1,dc=qa S4 DN: <not found> Filename: /var/lib/univention-connector/s4/1389124017.622560 2: UCS DN: uid=user3,cn=users,dc=ar320i1,dc=qa S4 DN: <not found> Filename: /var/lib/univention-connector/s4/1389124017.677024 S4 rejected last synced USN: 3875 root@master40:/usr/share/ucs-test/52_s4connector# /usr/share/univention-s4-connector/remove_ucs_rejected.py uid=user3,cn=users,dc=ar320i1,dc=qa The rejected UCS object uid=user3,cn=users,dc=ar320i1,dc=qa has been removed. root@master40:/usr/share/ucs-test/52_s4connector# univention-s4connector-list-rejected UCS rejected 1: UCS DN: uid=user4,cn=users,dc=ar320i1,dc=qa S4 DN: <not found> Filename: /var/lib/univention-connector/s4/1389124021.753508 2: UCS DN: uid=user3,cn=users,dc=ar320i1,dc=qa S4 DN: <not found> Filename: /var/lib/univention-connector/s4/1389124017.677024 S4 rejected last synced USN: 3875 ========================================================================
Should be fixed with r51886
Works. Built version updated in advisory, Ok.
http://errata.univention.de/ucs/3.2/153.html