well, looks like someone or something is stopping your slapd process, it
does not shutdown by itself. Could it be a "watchdog", checking for
resource consumption on your machine and if memopry or cpu usage is too
high stopping it ?
If you just want to workaround, pipe the result of your ldasearch into
an ldif file generating the mods and then use this file as input for
ldapmodify, you could then, if it stops again continue where it had stopped.
And you don't need two ldapmodify commands for each update, you could do
somthing like
ldapmodify ....
dn: <your dn>
changetype: modify
add: objectclass
objectclass: mailRecipient
-
add: mailquota
mailquota: 200
if you have this in a file, you could also just run ldapmodify ... -f <file>
On 02/20/2018 03:04 PM, Alex M via FreeIPA-users wrote:
Hello all!
I'm trying to update users of my ldap (with more than 100k users), adding to them new
objectclass and new attribute with value. After updating about 31K users (31124 from the
script's log), the script fails without any errors. Last modification date of the
script's log file is 20/Feb/2018:15:37:19.
ipa user-find | grep "Number of entries returned"
Returns correct value (>100k) without any errors
FreeIPA, version: 4.5.4
My script:
kinit admin
Then
updateUsers() {
baseDn="$(ipa config-show --raw --all |grep -e '^[[:space:]]*dn:' |sed -e
's#^[[:space:]]*dn: cn=ipaConfig,cn=etc,##g')"
ldapsearch -Y GSSAPI -b "cn=users,cn=accounts,${baseDn}" -s one -LLL dn |
while read line ; do
if [ -n "$line" ] ; then
echo -e "${line}\nchangetype: modify\nadd: objectclass\nobjectclass:
mailRecipient\n\n" | ldapmodify -Y GSSAPI
echo -e "${line}\nchangetype: modify\nadd: mailQuota\nmailQuota: 200\n\n" |
ldapmodify -Y GSSAPI
fi
done
}
From /var/log/dirsrv/slapd-MYDOMAIN/errors
~
[20/Feb/2018:15:37:24.869634835 +0300] slapd shutting down - signaling operation threads
- op stack size 10 max work q size 6 max work q stack size 6
[20/Feb/2018:15:37:24.877085174 +0300] slapd shutting down - waiting for 24 threads to
terminate
[20/Feb/2018:15:37:24.880513622 +0300] slapd shutting down - closing down internal
subsystems and plugins
[20/Feb/2018:15:37:32.388250081 +0300] Waiting for 4 database threads to stop
[20/Feb/2018:15:37:33.075482198 +0300] All database threads now stopped
[20/Feb/2018:15:37:34.102540783 +0300] slapd shutting down - freed 6 work q stack objects
- freed 10 op stack objects
[20/Feb/2018:15:37:34.694797131 +0300] slapd stopped.
~
I've tried twice. On the first attempt succesfully updated about 32k users.
Any suggestions what is going on and how to prevent this?
_______________________________________________
FreeIPA-users mailing list -- freeipa-users(a)lists.fedorahosted.org
To unsubscribe send an email to freeipa-users-leave(a)lists.fedorahosted.org
--
Red Hat GmbH,
http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric
Shander