Changeset 8476


Ignore:
Timestamp:
Mar 5, 2019, 4:46:20 PM (3 months ago)
Author:
hectorgh
Message:

increased ldap mdb size

Location:
n4d-ldap/trunk/fuentes
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • n4d-ldap/trunk/fuentes/debian/changelog

    r8411 r8476  
     1n4d-ldap (0.48) xenial; urgency=high
     2
     3  * LDAP mdb size increased
     4
     5 -- Hector Garcia Huerta <hectorgh@gmail.com>  Tue, 05 Mar 2019 16:45:48 +0100
     6
    17n4d-ldap (0.47.13) xenial; urgency=high
    28
  • n4d-ldap/trunk/fuentes/debian/postinst

    r3968 r8476  
    6969       
    7070
     71        if dpkg --compare-versions "$2" lt 0.48; then
     72                if [ -e '/var/lib/n4d/variables-dir/SRV_IP' ]; then
     73                        echo "Increasing LDAP DB size..."
     74                        cp /usr/share/n4d-ldap/one-shots/fix_db_size.sh /etc/n4d/one-shot/
     75                        deb-systemd-invoke restart n4d || true
     76                fi
     77        fi
     78
     79
    7180        if [ -e "$ORIGINAL_FILE" ]; then
    7281
  • n4d-ldap/trunk/fuentes/install/usr/share/n4d/python-plugins/SlapdManager.py

    r4940 r8476  
    423423                password_file.close()
    424424                os.chmod(self.LDAP_SECRET2,0600)
     425               
     426               
     427                #set bigger db size
     428               
     429                modify_list = [(ldap.MOD_DELETE, 'olcDbMaxSize', None)]
     430                try:
     431                        self.connect_ldapi.modify_s('olcDatabase={1}mdb,cn=config',modify_list)
     432                except Exception as e:
     433                        # ignore this exception.
     434                        pass
     435                       
     436                modify_list = [(ldap.MOD_ADD, 'olcDbMaxSize', "209715200")]
     437                try:
     438                        self.connect_ldapi.modify_s('olcDatabase={1}mdb,cn=config',modify_list)
     439                except Exception as e:
     440                        return {"status":False,"msg":e[0]["desc"]}
     441               
     442               
    425443                return {"status":True,"msg":"OpenLdap is configured as simple ldap. Admin password is inside " + self.LDAP_SECRET2}
    426444
Note: See TracChangeset for help on using the changeset viewer.