Hello, I could finally find the time to dig into this issue a bit deeper, and it turns out that I had simply misinterpreted how the merge feature is supposed to work. It all comes down to xdcpmerge.sh, which is executed on the nodes to be sync'd and takes care of the passwd / shadow / group files. Specifically, the script first checks if any user / group in the MERGE file is already present in the CURRENT one. Any such user / group is excluded. Then, all the remaining users / groups are appended to the current file. Now, a problem with that approach occurs as soon as you have added a user to an (existing) group, which is what I did. In that case, the script will also simply skip the line in the group file, as the group is already present in the current file. The result is that on the nodes, the user is still not part of the group. So, what if one does it the other way round? I. e., remove all the users present in the merge file from the current one, and then append the whole merge file to the current file. A possible solution would look like this:
diff xdcpmerge.sh xdcpmerge.sh.orig 89c89 < grepcmd="$grepcmd $curfile > $curfile.nodups" --- > grepcmd="$grepcmd $mergefile > $mergefile.nodups" 97,99c97,98 < cp -a $curfile.nodups $curfile < cat $mergefile >> $curfile < rm $curfile.nodups --- > cat $mergefile.nodups >> $curfile > rm $mergefile.nodups I have also attached my version of the script to the message. So, what do you think? This will fix my problem, but it might introduce some others. Maybe one could also add an option so one can select the desired behavior? Best, Christian On 20 February 2018 at 15:20, Christian Leitold <christian.leit...@gmail.com > wrote: > Hello, > > I have here a small Ubuntu cluster with one head node and a couple of > compute nodes. So far, I have used the "merge" feature for passwd / shadow > / group to keep the users synchronized between the head and the compute > nodes. However, at some point, probably after an update, this feature has > stopped working. The regular files _do_ get sync'd though, and oddly > enough, also the merge partially works, as I have found out after some > digging. In particular, the files to merge still get transferred to > > /var/xcat/node/syncfiles/merge/mergefiles > > on the compute nodes. However, it seems that nothing happens after that. > The way I understand is, then the script xdcpmerge.sh should get executed, > which takes care of the actual merging process for the three files. But for > some reason, this either does not happen on the nodes and / or does > happen, but does not work. > > Any hints on where to look next would be greatly appreciated! > > My xCAT version (Ubuntu package) is 2.13.10-snap201801260010. > > Thanks, > Christian >
xdcpmerge.sh
Description: application/shellscript
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ xCAT-user mailing list xCAT-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xcat-user