Bug 40886 - printerModel not indexed
printerModel not indexed
Status: CLOSED DUPLICATE of bug 40575
Product: UCS
Classification: Unclassified
Component: LDAP
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1-1-errata
Assigned To: Philipp Hahn
Felix Botner
:
: 40610 (view as bug list)
Depends on: 39884
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-11 11:03 CET by Florian Best
Modified: 2016-04-28 16:58 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): External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2016-03-11 11:03:44 CET
slapindex has not been called after/during this upgrade. This causes that substring searches for printerModel for existing attributes doesn't work anymore.

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

mdb_substring_candidates: (printerModel) not indexed
Comment 1 Florian Best univentionstaff 2016-03-11 11:04:46 CET
Ticket#2016022621000272

A side effect is that shares/printer:open() doesn't detect the 'product' which causes that opening the object in UMC resets the values for product and model.
Comment 2 Florian Best univentionstaff 2016-03-11 11:10:56 CET
*** Bug 40610 has been marked as a duplicate of this bug. ***
Comment 3 Philipp Hahn univentionstaff 2016-04-26 09:48:07 CEST
The problem arises from the fact,
1. that attributes are added to UCRV ldap/index/*,
2. then `slapd` is restarted,
3. before `slapindex` is run.

# univention-ldapsearch -LLL loginShell=/bin/bash dn | grep -c ^dn
12
# ucr set ldap/index/eq="$(ucr get ldap/index/eq),loginShell
# /etc/init.d/slapd restart
# univention-ldapsearch -LLL loginShell=/bin/bash dn | grep -c ^dn
0
# /etc/init.d/slapd stop
# slapindex loginShell
# /etc/init.d/slapd start
# univention-ldapsearch -LLL loginShell=/bin/bash dn | grep -c ^dn
12

Unfortunately that fix r67289 to stop slapd during the upgrade was reverted by r67336 and only later fixed again r67514. So everything between 4.1-x+e84 and 4.1-x+e119 is broken.

Currently there is nothing to due other then upgrade to at least erratum119.

We could add code `ldap_setup_index` to forcefully stop and start `slapd` each time, but running `slapindex` takes a long time while the LDAP service is unavailable.

*** This bug has been marked as a duplicate of bug 40575 ***
Comment 4 Felix Botner univentionstaff 2016-04-28 15:44:52 CEST
(In reply to Philipp Hahn from comment #3)
> The problem arises from the fact,
> 1. that attributes are added to UCRV ldap/index/*,
> 2. then `slapd` is restarted,
> 3. before `slapindex` is run.
> 
> # univention-ldapsearch -LLL loginShell=/bin/bash dn | grep -c ^dn
> 12
> # ucr set ldap/index/eq="$(ucr get ldap/index/eq),loginShell
> # /etc/init.d/slapd restart
> # univention-ldapsearch -LLL loginShell=/bin/bash dn | grep -c ^dn
> 0
> # /etc/init.d/slapd stop
> # slapindex loginShell
> # /etc/init.d/slapd start
> # univention-ldapsearch -LLL loginShell=/bin/bash dn | grep -c ^dn
> 12
> 
> Unfortunately that fix r67289 to stop slapd during the upgrade was reverted
> by r67336 and only later fixed again r67514. So everything between 4.1-x+e84
> and 4.1-x+e119 is broken.
> 
> Currently there is nothing to due other then upgrade to at least erratum119.
> 
> We could add code `ldap_setup_index` to forcefully stop and start `slapd`
> each time, but running `slapindex` takes a long time while the LDAP service
> is unavailable.
> 
> *** This bug has been marked as a duplicate of bug 40575 ***

OK, slapd is stopped in the postinst before calling ldap_setup_index