Thinlinc HA Synchronization does not keeps permissions

Hello,

I’ve suceeded to implement synchronization between my two thinlinc nodes.

The problem is that the /home/directory of my users does not keep the permission.

Everything is owned by root user after the sync to the secondary nodes…

I tried with the -p argument like with rsync command but did not worked.

Do you have a solution ?

Thanks !

@s0p4L1n which command are you running exactly?

I ran:

tl-rsync-all /home/

But I figured out that the thinlinc session data is in /var/lib/vsm/session and not /home

/home is only the user session when logged, not the data user session so I don’t need to sync this.

As the documentation does not precise if the synchronization between all nodes is automatic or not, I have setup a crontab that launch tl-rsync-all /var/lib/vsm every minute.

Thanks,

Also, I just found that, it ask me the root password for tl-rsync-all so It does not work in the crontab

image

How can I pass the command without the password asking ?

@s0p4L1n tl-rsync-all is essentially just a convenience wrapper around rsync, to avoid having to sync to each host manually. Apart from that it should behave in exactly the same way as normal rsync. Perhaps the flag you’re looking for with regards to directory ownership is -a, which will preserve user and group (among other things).

You can set up public key authentication to achieve this. You can find some tips under the tl-ssh-all section in Chapter 13.  Commands on the ThinLinc Server (same principles apply for tl-rsync-all).

Note that this tool isn’t normally used for syncing /home. Generally the /home directory in a ThinLinc cluster will be located on a remote fileserver, and mounted on each host (via NFS, for example).

Correct, but you shouldn’t need to sync it manually. This data will by synced across two ThinLinc masters (circled in red below) automatically if you have them set up in a high-availability configuration, however the session data does not need to reside on the agents.

HTH!

Thanks for the clarification, I already setted the pubkey authentication and it is working well.
But when I execute the tl-rsync-all, it still ask the password.
It sync, then ask the password as shown below.

image

What/where is the data(folders/files) that synced automatically across the two ThinLinc masters ?
And how to verify that the sync is working between two-HA masters ?

Is it /var/lib/vsm/session synced automatically ? Because I tried last time, and one user that was connecting to the primary, setted his Google Chrome preferences, and then the second times, it connect to the secondary and the preferences was gone (not synced).

And for the agent I did not know that this was not a requirement to sync session data, so it is always the VSMServer that is manage the data session and the agent is only here to open the session ?

I’m not sure where that prompt might be coming from then sorry, does it help to increase verbosity?

Yes, it is synced between two master servers as long as HA is set up and configured properly. See 6.2.  Configuration of ThinLinc for HA Operations

These preferences will be stored in the user’s home directory, so it is important that the home directories are consistent across agents. This is normally done by mounting the /home directories from a central file server.

Yes, that’s right. A ThinLinc cluster will always have exactly one active master server, and one or more agent servers where the sessions themselves are run. In a HA configuration, there will be two masters, one active and one failover.

I will do like you said, because even with -a argument, the /home is copied but some files are not copied in a good way, and there is some Chrome errors if you log again, and it used another agent to host the session:

The profile appears to be in use by another Google Chrome process (3412) on another computer (“previous name of the computer”). Chrome has locked the profile so that it doesn’t get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chrome.

And it is because of the tl-rsync-all -a /home, it sync the /home of master node to all cluster nodes.

So yeah, all /home mounted on the same NFS share, no problem after this.

Thanks for all the infos and the help you provided !

2 Likes