NS7 to NS8 migration - sync data fails

So it is Roundcube which has lost the NS8 destination. Let’s verify it. Look at the module destination parameters.

grep MODULE_INSTANCE_ID /var/lib/nethserver/nethserver-ns8-migration/nethserver-roundcubemail/bind.env

Can you see that instance in NS8?

If not, remove the that bind.env file and run

MODULE_NODE_ID=1 ns8-bind-app nethserver-roundcubemail  

It selects node 1 as destination, which seems to fit your case.

Then :crossed_fingers: sync again from UI.

[root@neth nethserver-mail]# grep MODULE_INSTANCE_ID /var/lib/nethserver/nethserver-ns8-migration/nethserver-roundcubemail/bind.env
MODULE_INSTANCE_ID=roundcubemail2

image

I don’t recall having manually installed any instance of Roundcube on this system–should I just delete them both?

Most surely they come from failed migration attempts. But roundcubemail2 is the actual sync target.

Did you run a new sync?

I haven’t, nor have I changed anything as yet. Should I delete those two instances or do anything else first?

You replied:

I do not understand if you already did the above steps or not

I ran the grep, it returned MODULE_INSTANCE_ID=roundcubemail2, and the instance roundcubemail2 exists in NS8 (as does another instance named roundcubemail1). Because it does exist, I did not remove bind.env nor run the command that followed. And since I hadn’t made any changes, I haven’t retried the sync from the UI.

Ok, understood. Let’s see what is it doing. In NS8 run

runagent -m roundcubemail2 podman ps -a

Look at ps -f -u roundcubemail2, too

Curious:

root@ns8:~# runagent -m roundcube2 podman ps -a
runagent: [FATAL] Cannot find module roundcube2 in the local node
root@ns8:~# ps -f -u roundcubemail2
UID          PID    PPID  C STIME TTY          TIME CMD
roundcu+     925       1  0 Mar23 ?        00:00:00 /lib/systemd/systemd --user
roundcu+     946     925  0 Mar23 ?        00:00:00 (sd-pam)
roundcu+   59274     925  0 Mar23 ?        00:00:00 catatonit -P
roundcu+   59381     925  0 Mar23 ?        00:00:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd
roundcu+  268971     925  0 Mar28 ?        00:00:25 /usr/local/bin/agent --agentid=module/roundcubemail2 --actionsdir=/usr/local/age
root@ns8:~#

The runagent command doesn’t see roundcubemail2, but the Software Center thinks it’s there:
image

I’m sorry, it’s roundcubemail2

I should have noticed that myself.

root@ns8:~# runagent -m roundcubemail2 podman ps -a
CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES
root@ns8:~#
1 Like

For sure it is not running the rsync daemon!

To fix it,

The old instances can be removed. Some modules like Nextcloud, Mail or File Server may require a large amount of disk space and the time of data transfer. In those cases removing the instance and starting again is not really welcome. But for Roundcube and “small” modules it can be acceptable.

It is possible to copy files across volumes, with a low-level cp -a. However setting permissions to match the subuid/subgid ranges will be a nightmare!

Is it expected that this command would take over an hour to complete? Because it’s been running at least that long with no output or other indication that it’s doing anything.

No, it just installs a new instance of Roundcube and starts rsync daemon…

Images are quite big but it depends on your connection speed!

docker.io/library/mariadb          10.11.5           f3ccb05c76f7  5 months ago  410 MB
docker.io/roundcube/roundcubemail  1.6.6-apache      81bac075e575  2 months ago  715 MB

If you want to check what’s going on, try to run on NS8

ps -f -u roundcubemail3

I suppose the new instance is number 3.

Well, I’d removed the first two instances, so I’d assume it’d be number 1–but neither exists:

root@ns8:~# ps -f -u roundcubemail1
error: user name does not exist

Usage:
 ps [options]

 Try 'ps --help <simple|list|output|threads|misc|all>'
  or 'ps --help <s|l|o|t|m|a>'
 for additional help text.

For more details see ps(1).
root@ns8:~# ps -f -u roundcubemail2
error: user name does not exist

Usage:
 ps [options]

 Try 'ps --help <simple|list|output|threads|misc|all>'
  or 'ps --help <s|l|o|t|m|a>'
 for additional help text.

For more details see ps(1).
root@ns8:~# ps -f -u roundcubemail3
error: user name does not exist

Usage:
 ps [options]

 Try 'ps --help <simple|list|output|threads|misc|all>'
  or 'ps --help <s|l|o|t|m|a>'
 for additional help text.

For more details see ps(1).
root@ns8:~#

It looks odd… Just to be sure:

grep ^roundcube /etc/passwd
root@ns8:~# grep ^roundcube /etc/passwd
root@ns8:~#

Let’s try to install Roundcube in NS8, in node 1:

time add-module roundcubemail 1

Adding time to have an idea of the installation speed.

1 Like
root@ns8:~# time add-module roundcubemail 1
<7>podman-pull-missing ghcr.io/nethserver/roundcubemail:2.0.1
Trying to pull ghcr.io/nethserver/roundcubemail:2.0.1...
Getting image source signatures
Copying blob sha256:f7ee773a577a987ecbd31d195449afcdbc8617fee28146c71567edfbf0011b78
Copying config sha256:9e411d4e317cf6668ac96ddcfaa82e5a1b2ec2a7430ffff51e8314698e7db377
Writing manifest to image destination
Storing signatures
9e411d4e317cf6668ac96ddcfaa82e5a1b2ec2a7430ffff51e8314698e7db377
<7>extract-ui ghcr.io/nethserver/roundcubemail:2.0.1
Extracting container filesystem ui to /var/lib/nethserver/cluster/ui/apps/roundcubemail3
ui/css/
ui/css/about~31ecd969.621932db.css
ui/css/app~748942c6.65e859ce.css
ui/i18n/
ui/i18n/de/
ui/i18n/de/translation.json
ui/i18n/en/
ui/i18n/en/translation.json
ui/i18n/es/
ui/i18n/es/translation.json
ui/i18n/eu/
ui/i18n/eu/translation.json
ui/i18n/it/
ui/i18n/it/translation.json
ui/i18n/pt/
ui/i18n/pt/translation.json
ui/i18n/pt_BR/
ui/i18n/pt_BR/translation.json
ui/img/
ui/img/module_default_logo.63a7380d.png
ui/index.html
ui/js/
ui/js/about~31ecd969.8d7e885e.js
ui/js/about~31ecd969.8d7e885e.js.map
ui/js/app~748942c6.591267a6.js
ui/js/app~748942c6.591267a6.js.map
ui/js/chunk-vendors~02576867.44c88c8d.js
ui/js/chunk-vendors~02576867.44c88c8d.js.map
ui/js/chunk-vendors~0605657e.7f254d6a.js
ui/js/chunk-vendors~0605657e.7f254d6a.js.map
ui/js/chunk-vendors~0f485567.baceb456.js
ui/js/chunk-vendors~0f485567.baceb456.js.map
ui/js/chunk-vendors~17faf02d.7f68aab6.js
ui/js/chunk-vendors~17faf02d.7f68aab6.js.map
ui/js/chunk-vendors~1d97ff09.290bda9d.js
ui/js/chunk-vendors~1d97ff09.290bda9d.js.map
ui/js/chunk-vendors~2a42e354.0df57e14.js
ui/js/chunk-vendors~2a42e354.0df57e14.js.map
ui/js/chunk-vendors~2aa62147.38204dba.js
ui/js/chunk-vendors~2aa62147.38204dba.js.map
ui/js/chunk-vendors~41d44f25.e7779fa1.js
ui/js/chunk-vendors~41d44f25.e7779fa1.js.map
ui/js/chunk-vendors~46852254.0b6d19c2.js
ui/js/chunk-vendors~46852254.0b6d19c2.js.map
ui/js/chunk-vendors~57473a66.f586d2ed.js
ui/js/chunk-vendors~57473a66.f586d2ed.js.map
ui/js/chunk-vendors~5bb1f863.3efba861.js
ui/js/chunk-vendors~5bb1f863.3efba861.js.map
ui/js/chunk-vendors~5eba3806.b8428291.js
ui/js/chunk-vendors~5eba3806.b8428291.js.map
ui/js/chunk-vendors~690b702c.fd888ae3.js
ui/js/chunk-vendors~690b702c.fd888ae3.js.map
ui/js/chunk-vendors~7274e1de.dc9fe008.js
ui/js/chunk-vendors~7274e1de.dc9fe008.js.map
ui/js/chunk-vendors~86f6b1bc.cd957566.js
ui/js/chunk-vendors~86f6b1bc.cd957566.js.map
ui/js/chunk-vendors~b5906859.deff14e4.js
ui/js/chunk-vendors~b5906859.deff14e4.js.map
ui/js/chunk-vendors~bc21d4b3.68b10b46.js
ui/js/chunk-vendors~bc21d4b3.68b10b46.js.map
ui/js/chunk-vendors~c8728516.dd1ccc58.js
ui/js/chunk-vendors~c8728516.dd1ccc58.js.map
ui/js/chunk-vendors~d2305125.6a99a4ff.js
ui/js/chunk-vendors~d2305125.6a99a4ff.js.map
ui/js/chunk-vendors~d9886323.1a1a66f6.js
ui/js/chunk-vendors~d9886323.1a1a66f6.js.map
ui/js/chunk-vendors~db300d2f.ddb8641c.js
ui/js/chunk-vendors~db300d2f.ddb8641c.js.map
ui/js/chunk-vendors~ec8c427e.5c1734c3.js
ui/js/chunk-vendors~ec8c427e.5c1734c3.js.map
ui/js/chunk-vendors~fdc6512a.81c5c86c.js
ui/js/chunk-vendors~fdc6512a.81c5c86c.js.map
ui/js/lang-de-translation-json~3c620948.c72dd75f.js
ui/js/lang-de-translation-json~3c620948.c72dd75f.js.map
ui/js/lang-en-translation-json~9b60384d.a038ee89.js
ui/js/lang-en-translation-json~9b60384d.a038ee89.js.map
ui/js/lang-es-translation-json~f7c30340.fba019c1.js
ui/js/lang-es-translation-json~f7c30340.fba019c1.js.map
ui/js/lang-eu-translation-json~8ed4c5c2.1539f90d.js
ui/js/lang-eu-translation-json~8ed4c5c2.1539f90d.js.map
ui/js/lang-it-translation-json~e043826f.e33459c7.js
ui/js/lang-it-translation-json~e043826f.e33459c7.js.map
ui/js/lang-pt-translation-json~45d767f3.e8823e7a.js
ui/js/lang-pt-translation-json~45d767f3.e8823e7a.js.map
ui/js/lang-pt_BR-translation-json~eef7148a.8fbaf25a.js
ui/js/lang-pt_BR-translation-json~eef7148a.8fbaf25a.js.map
ui/metadata.json
ui/shortcuts.json
5d24cc1bda063dc8fae4c337e09e71cc1534c2fac9b5d05f52ea28c7ceca5fe3
{'module_id': 'roundcubemail3', 'image_name': 'roundcubemail', 'image_url': 'ghcr.io/nethserver/roundcubemail:2.0.1'}

real	1m55.191s
user	0m0.507s
sys	0m0.064s
root@ns8:~#

Partially off topic but…

Numbering only increments (n+1). Probably because it is also used to set a unix user and devs prefer to not re-use them (security reasons, leftovers, complexity determining numeration jumps…). I guess it is stored in Redis.
This also has some downsides when restoring apps from backup, the need to reconfigure related apps…