db2index requires an attribute to be provided, else it will not run. Improve the support to work with python3 and missing perl.
<img alt="0001-Ticket-49461-Improve-db2index-handling-for-test-4929.patch" src="/389-ds-base/issue/raw/files/8b194168b695b4097996fa590a000d6c4e1540bcc772d1eeb71a768e09480dd0-0001-Ticket-49461-Improve-db2index-handling-for-test-4929.patch" />
Metadata Update from @firstyear: - Custom field component adjusted to None - Custom field origin adjusted to None - Custom field reviewstatus adjusted to review - Custom field type adjusted to None - Custom field version adjusted to None
Metadata Update from @spichugi: - Custom field reviewstatus adjusted to ack (was: review)
well if you don't supply attrs to index then db2index is supposed to reindex all attributes. That's how the current tool works so lib389 should allow "no attributes"
What's the call to ns-slapd that indexes all attributes? I couldn't make it work ....
Hmm I get usage errors, but it says in the usage that its supposed to index all attributes. And I recall adding that feature, so I think we have a bug in the script itself
echo "Usage: db2index [-Z serverID] [-n backend | {-s includesuffix}* -t attribute[:indextypes[:matchingrules]]" echo " -T vlvTag] [-v] [-h]" echo "Options:" echo " -Z serverID - Server instance identifier" echo " -n backend - Backend database name. Example: userRoot" echo " -s includeSuffix - The suffix to index" echo " -t attribute[:indextypes[:matchingrules]]" echo " - attributeName: name of the attribute to be indexed"; echo " If omitted, all the indexes defined for that instance are generated." echo " - indextypes: comma separated index types" echo " - matchingrules: comma separated matrules" echo " Example: -t foo:eq,pres" echo " -T vlvTag - VLV index name" echo " -v - Display version" echo " -h - Display usage"
Yeah its a bug in the script's usage check. If I add "-Z" it works and I can see all indexes getting indexed:
db2index -Z localhost -n userroot
Yes, but ns-slapd requires -t as well. What's the ns-slapd command?
ns-slapd db2index -D /etc.... -n userRoot
does not work :(
Check the db2index script ;-)
Actually the script calls this for complete reindex:
bak_dir=/var/lib/dirsrv/slapd-$servid/bak/reindex_`date +%Y_%m_%d_%H_%M_%S` /usr/sbin/ns-slapd upgradedb -D $CONFIG_DIR -a "$bak_dir"
So it basically does a reimport - not a reindex of each attr, db2index.pl actually reindexes each attribute. So they behave differently to get the desired results.
I did check the script, it made no sense.
Whaaaaaaa upgradedb? Whaaaaaa????????
I did check the script, it made no sense. Whaaaaaaa upgradedb? Whaaaaaa????????
Yeah, crazy, but it works. The whole process should be redone some day, because "upgradedb" also makes unexpected backups.
<img alt="0001-Ticket-49461-Improve-db2index-handling-for-test-4929.patch" src="/389-ds-base/issue/raw/files/e46eef0cc5751a46ff10f746c70f9d25e5d3113873c61aedc5e04190fbcbdfa0-0001-Ticket-49461-Improve-db2index-handling-for-test-4929.patch" />
Okay, this now supports the changes to db2index for all db and attrs. As well added a test case to basic to prove it works, and fixed an issue exposed in this in db2index.
LGTM, ack.
commit 8a7bee6 To ssh://git@pagure.io/389-ds-base.git 938dfb7..8a7bee6 master -> master
Metadata Update from @firstyear: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/2520
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: fixed)
Log in to comment on this ticket.