Hi Christian,
It seems you are not creating a user, but to modify an existing user's group, right? Could you help to create an ticket on github, and give clear scenario there.
And from your temp fix, it seems the issue maybe be related to https://github.com/xcat2/xcat-core/pull/4328
xcat team will try to give a fix to cover both the cases when we understand well on how you use it.
Regards,
Bin Xu
HPC Software Development
Software Defined Infrastructure, IBM Systems
Software Defined Infrastructure, IBM Systems
Phone: 86-010-82454067
E-mail: bx...@cn.ibm.com
----- Original message -----
From: Christian Leitold <christian.leit...@gmail.com>
To: xcat-user@lists.sourceforge.net
Cc:
Subject: Re: [xcat-user] syncfiles: merge for passwd / shadow / group has stopped working after update
Date: Sat, Mar 24, 2018 4:19 AM
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.orig89c89< 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.nodupsI 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,ChristianOn 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------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! https://urldefense.proofpoint.com/v2/url?u=http-3A__sdm.link_slashdot&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=JP4OHmOJev8UEJM5XxIlRA&m=R-otWqUCm8TLr6aeTrPFbBF-foyxIjGOD1d18ZKj2KA&s=FBP0ixBpkkawsGJf96E7_xSH3JF3ScYaZMGHsHr50Oc&e=_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_xcat-2Duser&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=JP4OHmOJev8UEJM5XxIlRA&m=R-otWqUCm8TLr6aeTrPFbBF-foyxIjGOD1d18ZKj2KA&s=_s_F-7jKqKPBnXwStw1Bfv1Ih0B8Mo4aDel4xvO-lNk&e=
------------------------------------------------------------------------------ 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