Bug 32194 - Tool for removing s4 connector rejects via CLI
Tool for removing s4 connector rejects via CLI
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 3.1
Other Linux
: P5 enhancement (vote)
: UCS 3.2-2-errata
Assigned To: Stefan Gohmann
Arvid Requate
:
: 31933 (view as bug list)
Depends on:
Blocks: 35904
  Show dependency treegraph
 
Reported: 2013-08-08 14:21 CEST by Sönke Schwardt-Krummrich
Modified: 2014-09-11 14:51 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
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
Tool for removing entries from S4 connector reject list (3.19 KB, text/plain)
2013-08-08 14:21 CEST, Sönke Schwardt-Krummrich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2013-08-08 14:21:46 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/
Comment 1 Stefan Gohmann univentionstaff 2013-08-13 09:11:50 CEST
*** Bug 31933 has been marked as a duplicate of this bug. ***
Comment 2 Stefan Gohmann univentionstaff 2013-08-13 09:12:16 CEST
(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.
Comment 3 Stefan Gohmann univentionstaff 2014-07-11 20:37:41 CEST
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
Comment 4 Arvid Requate univentionstaff 2014-07-16 16:52:50 CEST
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
========================================================================
Comment 5 Stefan Gohmann univentionstaff 2014-07-16 20:49:10 CEST
Should be fixed with r51886
Comment 6 Arvid Requate univentionstaff 2014-07-21 11:48:01 CEST
Works. Built version updated in advisory, Ok.
Comment 7 Janek Walkenhorst univentionstaff 2014-07-24 15:18:07 CEST
http://errata.univention.de/ucs/3.2/153.html