Replication fails

Sytem Information: Cloudmin 6.1 / Debian Squeeze AMD64

I wanted to replicate cloudmin to another host. I did the following

1) Install cloudmin on host2 and configured it as replication slave

2) on host 1 (master) i tried replicating the configuration

After confirming step 2 on host 1 the following error message appears:

Replicating Cloudmin configuration to selected systems ..

<host2-name> : Failed to copy : usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2
Status: 
Closed (fixed)

Comments

That certainly looks like a bug ..

Would it be possible for you to attach a screenshot of the settings you have on the replication setup page?

Find the screenshots attached.

Screen 3 shows an error that is not related to my problem. This error showed up when i attached the images.

BTW: I use non standard ssh ports. Perhaps this is relevant.

Can you use Cloudmin to upload a single file to the remote system?

You can test this with a command on the master system like :

cloudmin upload-file --host host2-name --source /etc/hosts --dest /tmp/hosts

or if that works, try :

cloudmin upload-multiple-files --host host2-name --source /etc/{hosts,resolv.conf} --dest /tmp

I tried it with 5 different hosts. It worked with physical host systems as target. It did not work with openvz containers as target

vz6001:/# cloudmin upload-multiple-files --host #host-system# --source /etc/{hosts,resolv.conf} --dest /tmp
Uploading 2 files to 1 systems ..
omikron.speak2us.net: OK
vz6001:/# cloudmin upload-multiple-files --host #openvz-container-system# --source /etc/{hosts,resolv.conf} --dest /tmp
Uploading 2 files to 1 systems ..
#openvz-container-system#: ERROR: usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-o ssh_option] [-P port] [-S program]
           [[user@]host1:]file1 ... [[user@]host2:]file2

Ok, I see the bug here ... this is triggered when the replication target system is running under OpenVZ or a similar virtualization type. I will include a fix for this in the next Cloudmin release.

Using an OpenVZ container as a replication target for Cloudmin probably isn't a good idea though, as in the case of a failover Cloudmin would end up managing (and being able to shut down) it's own VM host.

Thanks for the update.

Having cloudmin on a virtualized system works fine for me, but I agree that this makes it possible to shut down its own host.

Knowing that cloudmin is not meant to be installed on a virtual container now also explains, why on the "list server overview" cloudmin is not correctly placed under its host. Is this "as designed" or can I propose to change this behavior?

Best regards,

Nicolas

That layout is expected, as Cloudmin considers its own system to be "special" in the hierarchy of machines. Normally it is run on a physical system anyway, so wouldn't need to be categorized under a host system..

I just applied the latest update and now am getting a new error message:

Failed to copy 33495 files : Exec failed : Argument list too long

Any ideas?

That looks like a separate issue - replication is trying to copy so many files that it is exceeding the command line limit for scp.

How many virtual machines are you managing with Cloudmin on your system?

some additional debugging information

i have 49000+ files in my /etc/webmin directory

a very large amount of files is in the

./server-manager/history/

directory. perhaps this information helps

A quick hack fix would be to copy /etc/webmin/server-manager/history to the replica system manually. Future replications won't re-copy all those files, so won't hit this limit.

The next Cloudmin release will include a code change that won't run scp with a command line so long that the shell can't handle it.

i rsynced the files to the target system

rsync -av

when trying to replicate the system now still tries copying the files over and it exits with the same error message

Failed to copy 33495 files : Exec failed : Argument list too long

Did you rsync with the -t flag to preserve modification times?

Sorry, this was my fault. I tried replicating to the wrong system (a test system). I now tried replicating to the correct slave system (where the data was copied manually) and it now works.

Thanks for your help.

Great - I will include a proper fix for this issue in Cloudmin 6.3.

Automatically closed -- issue fixed for 2 weeks with no activity.