How to clean Ldap Tree

Hi,

i have many old entries of not installed Apps in my Ldap. I tried to delete the Containers, but after i did this, the Server crashes and dont run again. I needed to restore it.

How i can savely Clean the Ldap Tree?

For example this:
grafik

Thanks

Just leave them there. Those entries don’t hurt. It’s just a few bytes in a database. You also don’t need to delete man pages that you don’t read. They are just a few bytes on your hard disk.
And if the system crashes after deleting them - they are required bits.
Generally Univention packages will cleanup their data on disk very well. But in LDAP they often cannot, because it is extremely difficult to safely say, that no other software will use that data anymore. Generally software does not delete user-generated data.
In the above case, the data is part of the Univention Appcenter. The Appcenter keeps track of previously installed software, so that restored backups can be more useful. If LDAP nodes are not used, they don’t hurt the performance. But as you have experienced (with the crash): the data is actually used. So please leave it be.

Greetings
Daniel

I agree to leaving them there for the reasons you mentioned.

I disagree to the comparison to man pages, though. With man pages you generally don’t look at the index of man pages. Here you even have a LDAP tree viewer integrated into UCS. Having many old items increases confusion when solving problems - this is not only a problem with LDAP.

1 Like

The Problem is, if i install a new Server with Portal, i ever have Rocketchat Links and some more, but the apps are not installed.

grafik

Nextcloud, Element, Wekan and Rocket.chat are not installes on any Server:
grafik

Its very annoying and confusing user, they come on the portal via load balancer and every time other links are there

Thanks

1 Like

@Andreas_T you are right - stale data is annoying, when searching.

@Corin that’s bad. Please try the following: install rocketchat on some system and uninstall it. See if it fixes the entry. You can install a specific version on the command line. First list available version:

univention-app list rocketchat
univention-app install rocketchat=3.15.1
univention-app remove rocketchat
2 Likes

Installation

root@central:~# univention-app install rocketchat=3.15.1
Resolving dependencies for rocketchat
Going to install Rocket.Chat (3.15.1)
(shall_have_enough_ram) 
Do you want to install anyway [y/N]? y
Password for Administrator: 
Showing License agreement for 4.4/rocketchat=3.15.1
Showing README for 4.4/rocketchat=3.15.1
Configuring 4.4/rocketchat=3.15.1
Creating data directories for rocketchat...
Registering UCR for rocketchat
Marking 4.4/rocketchat=3.15.1 as installed
File: /etc/univention/service.info/services/univention-appcenter.cfg
Multifile: /etc/postgresql/11/main/pg_hba.conf
Setting ports for apache proxy
Multifile: /etc/apache2/sites-available/default-ssl.conf
Multifile: /etc/apache2/sites-available/000-default.conf
Adding localhost to LDAP object
Setting overview variables
Module: create_portal_entries
Reloading apache2 configuration (via systemctl): apache2.service.
Registering schema /usr/share/univention-appcenter/apps/rocketchat/rocketchat.schema
Object modified: cn=rocketchat,cn=ldapschema,cn=univention,dc=elo,dc=one

WARNING: cannot append rocketchat to appidentifier, value exists
No modification: cn=rocketchat,cn=ldapschema,cn=univention,dc=elo,dc=one

Waiting for activation of the extension object rocketchat: ......OK
Registering attribute rocketchatActivated
Registering the container host rocke-10601325 for rocketchat
Downloading app images
Running command: docker-compose -p rocketchat pull
Pulling mongo              ... done
Pulling rocketchat         ... done
Pulling mongo-init-replica ... done

Initializing app image
Running command: docker-compose -p rocketchat up -d --no-build --no-recreate
Creating network "rocketchat_appcenter_net" with the default driver
Creating rocketchat_mongo_1 ... done
Creating rocketchat_rocketchat_1         ... done
Creating rocketchat_mongo-init-replica_1 ... done

Preconfiguring container bca4327c6a6ec2ff4c69197bcd8785c3a79381cb6a320aa897990f9eaca797f9
Starting mongo              ... 
Starting rocketchat         ... 
Starting mongo-init-replica ... 
 tarting mongo-init-replica ...  done 
Configuring 4.4/rocketchat=3.15.1
Module: autostart
ucr cannot be found, falling back to changing the database file directly
Executing interface restore_data_before_setup for rocketchat
No interface defined
Executing interface restore_data_after_setup for rocketchat
No interface defined
Configuring 4.4/rocketchat=3.15.1
Waiting for Rocket.Chat to start (max. 5 minutes): ............ Rocket.Chat has started.
Retrieve LDAP password for Rocket.Chat LDAP connection from app container.
Set configuration parameter "LDAP_Authentication_Password" in Rocket.Chat: OK
Set require password change for user "admin": OK
Executing interface configure for rocketchat
No interface defined
updating certificates for 4.4/rocketchat=3.15.1
Installing join script /var/cache/univention-appcenter/appcenter.software-univention.de/4.4/rocketchat_20210622114148.inst
univention-run-join-scripts: runs all join scripts existing on local computer.
copyright (c) 2001-2022 Univention GmbH, Germany

Running pre-joinscripts hook(s):  done
Running 01univention-ldap-server-init.inst skipped (already executed)
Running 02univention-directory-notifier.inst skipped (already executed)
Running 03univention-directory-listener.inst skipped (already executed)
Running 04univention-ldap-client.inst skipped (already executed)
Running 05univention-bind.inst skipped (already executed)
Running 08univention-apache.inst skipped (already executed)
Running 10univention-ldap-server.inst skipped (already executed)
Running 11univention-heimdal-init.inst skipped (already executed)
Running 11univention-pam.inst skipped (already executed)
Running 15univention-directory-notifier-post.inst skipped (already executed)
Running 15univention-heimdal-kdc.inst skipped (already executed)
Running 18python-univention-directory-manager.inst skipped (already executed)
Running 20univention-directory-policy.inst skipped (already executed)
Running 20univention-join.inst skipped (already executed)
Running 20univention-ldap-config-master.inst skipped (already executed)
Running 22univention-directory-manager-rest.inst skipped (already executed)
Running 26univention-nagios-common.inst skipped (already executed)
Running 30univention-appcenter.inst skipped (already executed)
Running 30univention-nagios-client.inst skipped (already executed)
Running 31univention-nagios-s4-connector.inst skipped (already executed)
Running 31univention-nagios-samba.inst skipped (already executed)
Running 33univention-portal.inst skipped (already executed)
Running 34univention-self-service.inst skipped (already executed)
Running 35univention-appcenter-docker.inst skipped (already executed)
Running 35univention-management-console-module-appcenter.inst skipped (already executed)
Running 35univention-management-console-module-diagnostic.inst skipped (already executed)
Running 35univention-management-console-module-ipchange.inst skipped (already executed)
Running 35univention-management-console-module-join.inst skipped (already executed)
Running 35univention-management-console-module-lib.inst skipped (already executed)
Running 35univention-management-console-module-quota.inst skipped (already executed)
Running 35univention-management-console-module-reboot.inst skipped (already executed)
Running 35univention-management-console-module-services.inst skipped (already executed)
Running 35univention-management-console-module-setup.inst skipped (already executed)
Running 35univention-management-console-module-sysinfo.inst skipped (already executed)
Running 35univention-management-console-module-top.inst skipped (already executed)
Running 35univention-management-console-module-ucr.inst skipped (already executed)
Running 35univention-management-console-module-udm.inst skipped (already executed)
Running 35univention-management-console-module-updater.inst skipped (already executed)
Running 35univention-management-console-module-welcome.inst skipped (already executed)
Running 35univention-self-service-master.inst skipped (already executed)
Running 35univention-self-service-passwordreset-umc.inst skipped (already executed)
Running 35univention-server-overview.inst skipped (already executed)
Running 36univention-management-console-module-apps.inst skipped (already executed)
Running 40univention-postgresql.inst skipped (already executed)
Running 50rocketchat.inst done
Running 81univention-nfs-server.inst skipped (already executed)
Running 90univention-bind-post.inst skipped (already executed)
Running 91univention-saml.inst skipped (already executed)
Running 92univention-management-console-web-server.inst skipped (already executed)
Running 96univention-samba4.inst skipped (already executed)
Running 97univention-s4-connector.inst skipped (already executed)
Running 98univention-pkgdb-tools.inst skipped (already executed)
Running 98univention-samba4-dns.inst skipped (already executed)
Running 98univention-samba4-saml-kerberos.inst skipped (already executed)
Running post-joinscripts hook(s):  done
Potential script hook folder is unused: /var/lib/univention-appcenter/apps/rocketchat/local/hooks/post-install.d
File: /usr/share/univention-management-console/modules/apps.xml

File: /usr/share/univention-management-console/i18n/de/apps.mo

File: /etc/apt/apt.conf.d/55user_agent

Executing interface update_available for rocketchat
No interface defined

Uninstall

root@central:~# univention-app remove rocketchat
Resolving dependencies for rocketchat
Going to remove Rocket.Chat (3.15.1)
Showing README for 4.4/rocketchat=3.15.1
Configuring 4.4/rocketchat=3.15.1
Configuring 4.4/rocketchat=3.15.1
Executing interface configure for rocketchat
No interface defined
Starting mongo              ... 
Starting rocketchat         ... 
Starting mongo-init-replica ... 
 tarting mongo-init-replica ...  done 
Stopping rocketchat_rocketchat_1 ... 
Stopping rocketchat_mongo_1      ... 
 topping rocketchat_mongo_1      ...  done 
Removing rocketchat_rocketchat_1         ... 
Removing rocketchat_mongo-init-replica_1 ... 
Removing rocketchat_mongo_1              ... 
 Removing network rocketchat_appcenter_net..  done 
Removing localhost from LDAP object
File: /etc/univention/service.info/services/univention-appcenter.cfg
Multifile: /etc/postgresql/11/main/pg_hba.conf
Multifile: /etc/apache2/sites-available/000-default.conf
Module: create_portal_entries
Multifile: /etc/apache2/sites-available/default-ssl.conf
Reloading apache2 configuration (via systemctl): apache2.service.
Uninstalling /usr/lib/univention-install/50rocketchat.inst
Installing join script /var/cache/univention-appcenter/appcenter.software-univention.de/4.4/rocketchat_20210622114148.uinst
univention-run-join-scripts: runs all join scripts existing on local computer.
copyright (c) 2001-2022 Univention GmbH, Germany

Running pre-joinscripts hook(s):  done
Running 01univention-ldap-server-init.inst skipped (already executed)
Running 02univention-directory-notifier.inst skipped (already executed)
Running 03univention-directory-listener.inst skipped (already executed)
Running 04univention-ldap-client.inst skipped (already executed)
Running 05univention-bind.inst skipped (already executed)
Running 08univention-apache.inst skipped (already executed)
Running 10univention-ldap-server.inst skipped (already executed)
Running 11univention-heimdal-init.inst skipped (already executed)
Running 11univention-pam.inst skipped (already executed)
Running 15univention-directory-notifier-post.inst skipped (already executed)
Running 15univention-heimdal-kdc.inst skipped (already executed)
Running 18python-univention-directory-manager.inst skipped (already executed)
Running 20univention-directory-policy.inst skipped (already executed)
Running 20univention-join.inst skipped (already executed)
Running 20univention-ldap-config-master.inst skipped (already executed)
Running 22univention-directory-manager-rest.inst skipped (already executed)
Running 26univention-nagios-common.inst skipped (already executed)
Running 30univention-appcenter.inst skipped (already executed)
Running 30univention-nagios-client.inst skipped (already executed)
Running 31univention-nagios-s4-connector.inst skipped (already executed)
Running 31univention-nagios-samba.inst skipped (already executed)
Running 33univention-portal.inst skipped (already executed)
Running 34univention-self-service.inst skipped (already executed)
Running 35univention-appcenter-docker.inst skipped (already executed)
Running 35univention-management-console-module-appcenter.inst skipped (already executed)
Running 35univention-management-console-module-diagnostic.inst skipped (already executed)
Running 35univention-management-console-module-ipchange.inst skipped (already executed)
Running 35univention-management-console-module-join.inst skipped (already executed)
Running 35univention-management-console-module-lib.inst skipped (already executed)
Running 35univention-management-console-module-quota.inst skipped (already executed)
Running 35univention-management-console-module-reboot.inst skipped (already executed)
Running 35univention-management-console-module-services.inst skipped (already executed)
Running 35univention-management-console-module-setup.inst skipped (already executed)
Running 35univention-management-console-module-sysinfo.inst skipped (already executed)
Running 35univention-management-console-module-top.inst skipped (already executed)
Running 35univention-management-console-module-ucr.inst skipped (already executed)
Running 35univention-management-console-module-udm.inst skipped (already executed)
Running 35univention-management-console-module-updater.inst skipped (already executed)
Running 35univention-management-console-module-welcome.inst skipped (already executed)
Running 35univention-self-service-master.inst skipped (already executed)
Running 35univention-self-service-passwordreset-umc.inst skipped (already executed)
Running 35univention-server-overview.inst skipped (already executed)
Running 36univention-management-console-module-apps.inst skipped (already executed)
Running 40univention-postgresql.inst skipped (already executed)
Running 81univention-nfs-server.inst skipped (already executed)
Running 90univention-bind-post.inst skipped (already executed)
Running 91univention-saml.inst skipped (already executed)
Running 92univention-management-console-web-server.inst skipped (already executed)
Running 96univention-samba4.inst skipped (already executed)
Running 97univention-s4-connector.inst skipped (already executed)
Running 98univention-pkgdb-tools.inst skipped (already executed)
Running 98univention-samba4-dns.inst skipped (already executed)
Running 98univention-samba4-saml-kerberos.inst skipped (already executed)
Running 51rocketchat-uninstall.uinst done
Running post-joinscripts hook(s):  done
Potential script hook folder is unused: /var/lib/univention-appcenter/apps/rocketchat/local/hooks/post-remove.d
File: /usr/share/univention-management-console/i18n/de/apps.mo

File: /usr/share/univention-management-console/modules/apps.xml

File: /etc/apt/apt.conf.d/55user_agent

It works. Now the ldap is free of Rocketchat Data. May i do this with all old Apps? Wekan, Etherpad, Nextcloud?

Thanks

Btw: what is shown, when you execute univention-app info ?

May i do this with all old Apps?

Well… it’s not elegant, but it works…

Mastodon