NethServer / dev

NethServer issue tracker
https://github.com/NethServer/dev/issues
63 stars 20 forks source link

A failed connection to OpenLDAP breaks the migration #6985

Closed DavidePrincipi closed 1 month ago

DavidePrincipi commented 1 month ago

The issue comes when we try to migrate a NS7 to NS8, the migration stops and display an error, to reproduce it you need to restrict to localhost the slapd services

Steps to reproduce

Expected behavior

I expect no error, the migration should work or a notice or log fragment should explain what is occuring, for example what is the error, here I cannot connect to the openldap server because it is restricted to the localhost

Actual behavior

the failure comes that the openldap server is not reachable from the NS8 even with the VPN enabled, the localhost restricted access stops the migration when the action cannot handle a remote ldap connexion.

this is what you can see in the UI

image

in the NS8 journald log we can find

Aug 02 12:16:59 R1-pve.rocky9-pve.org traefik[2628]: 192.168.13.210 - - [02/Aug/2024:10:16:59 +0000] "GET /cluster-admin/api/cluster/task/bedce06f-47f0-4598-adc8-d70f2d4ffa6f/context HTTP/2.0" 200 340 "-" "-" 1097 "ApiServer-https@file" "http://127.0.0.1:9311" 13ms
Aug 02 12:17:00 R1-pve.rocky9-pve.org agent@cluster[783]: LDAPSocketOpenError: socket connection error while opening: [Errno 111] Connection refused
Aug 02 12:17:00 R1-pve.rocky9-pve.org agent@cluster[783]: task/cluster/bedce06f-47f0-4598-adc8-d70f2d4ffa6f: action "add-external-domain" status is "validation-failed" (3) at step 10validate_ldap_provider

the NS7 log just explain the join to the cluster is done


[root@NS2 ~]# cat /var/log/ns8-migration.log 
=========== Join cluster Fri, 02 Aug 2024 12:16:57 +0200

So the join cluster action is already done but we have an error relevant to the remote LDAP connexion failure hence the failure of the mail migration that it will come later if you continue to migrate the server by reloading the page. Since the script has failed you will have more errors for the migration, at the end the only way is to leave the migration, write errors to logs and leave before to migrate anything

Components version 1.0.14

See also

Forum Thread https://community.nethserver.org/t/ns7-ns8-mail-migration-failed/24120/12?u=davidep

nethbot commented 1 month ago

in 7.9.2009/testing:

stephdl commented 1 month ago

QA

nethbot commented 1 month ago

in 7.9.2009/testing:

nethbot commented 1 month ago

in 7.9.2009/testing:

DavidePrincipi commented 1 month ago

VERIFIED

Both cases were verified. Furthermore with commit https://github.com/NethServer/nethserver-ns8-migration/commit/bd8ff96389a31e6abc9bd3c090560e53da0caa03 the join procedure UI reports the error detail.

nethbot commented 1 month ago

in 7.9.2009/updates: