Hi Lars,<br><br><blockquote style="margin:0 0 0 40px;border:none;padding:0px">It looks like the issue not always reproducible; but there seems to be a pattern which i could not yet identify. CSync2 has occasionally failed to replicate some files alternate locations.<br>
<br>Here is the test that i ran as per you suggestion:<br><font face="verdana, sans-serif"><br></font><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<font face="verdana, sans-serif">[root@master ~]# mkdir /opt/test-bet/net<br>[root@master ~]# touch /opt/test-bet/net/abc<br>[root@master ~]# csync2 -c<br>[root@master ~]# csync2 -x<br>[root@master ~]# csync2 -rf /opt/test-bet/net<br>
[root@master ~]# csync2 -x<br>[root@master ~]# csync2 -rf /opt/test-bet/net<br>[root@master ~]# ls /opt/test-bet/net<br>abc<br>[root@master ~]# rm -rf /opt/test-bet/net<br>[root@master ~]# csync2 -x<br>I/O Error 'No such file or directory' in rsync-check: /opt/test-bet/net/abc<br>
While syncing file %_opt_test-bet%/net:<br>ERROR from peer(%_opt_test-bet%/net): slave octet-stream 12<br>ERROR from peer(<no file>): slave rs6<br>Finished with 2 errors.</font></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><font face="verdana, sans-serif"><br><br>Here is my configuration file:<br><br></font><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<font face="verdana, sans-serif">group default<br>{<br> host master; #primary/master server<br> host (slave); #secondary/slave server<br> key /etc/csync2/csync2.key;<br> include %_opt_test-bet%;<br>
exclude *~ .*;<br> backup-directory /var/backups/csync2;<br> backup-generations 3;<br> auto left;<br>}<br>prefix _opt_test-bet {<br> on master: /opt/test-bet;<br> on *: /opt/best;<br>
}</font></blockquote><div><br><br></div></div></blockquote><br><br><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>unfortunately, we could not gather logs at that moment and hence are not in a position to confirm if the failure was also due to a deletion of an existing file on master; or there may be other cases also when it fails which we have not yet identified.<br>
<br></div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">It would be great if you can look into this issue and verify if the patch submitted by <i style>Dennis Schafroth </i> is good enough to fix this issue.<br>
<br>I will also test and verify that patch so as ensure that we do not introduce any other issues with it.<br><br></blockquote>Thanks and Regards,<br>Samba<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<br></blockquote></blockquote>=======================================================<br><br><br><div class="gmail_quote">On Thu, May 24, 2012 at 1:34 AM, Lars Ellenberg <span dir="ltr"><<a href="mailto:lars.ellenberg@linbit.com" target="_blank">lars.ellenberg@linbit.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, May 21, 2012 at 03:12:41PM +0530, Samba wrote:<br>
> Hi Lars,<br>
><br>
> I'm facing an issue with syncing files to alternate locations via prefix<br>
> mapping.<br>
><br>
> Here is my config:<br>
><br>
> group smgr_core<br>
> {<br>
> host master;<br>
> host (slave);<br>
> key /etc/csync2/csync2.key;<br>
> include %_var_net-snmp%;<br>
> backup-directory /var/backups/csync2;<br>
> backup-generations 3;<br>
> auto left;<br>
> }<br>
><br>
><br>
> prefix _var_net-snmp<br>
><br>
> {<br>
><br>
> on host[master]: /var/net-snmp;<br>
><br>
> on *: /opt/trap_listener;<br>
><br>
> }<br>
><br>
> Errors:<br>
><br>
> While syncing file %_var_net-snmp%/snmpd.conf:<br>
><br>
><br>
> ERROR from peer(%_var_net-snmp%/snmpd.conf): slave File is also marked<br>
> dirty here!<br>
><br>
><br>
> Auto-resolving conflict: Won 'master/slave' test. [but did not sync the<br>
> file]<br>
><br>
><br>
> I/O Error 'No such file or directory' in rsync-check:<br>
> /opt/trap_listener/mib_indexes/0<br>
><br>
><br>
> While syncing file %_var_net-snmp%/mib_indexes:<br>
><br>
><br>
> ERROR from peer(%_var_net-snmp%/mib_indexes): slave octet-stream 36<br>
<br>
<br>
</div></div>Can you give me a "mkdir ; touch; csync2 -c; rm -r ; csync2 -x"<br>
mini-reproducer?<br>
<br>
> These errors seems to be the same as those mentioned by *Dennis Schafroth *<br>
<div class="im">><br>
> in the mail thread given below:<br>
><br>
> <a href="http://lists.linbit.com/pipermail/csync2/2011-May/000758.html" target="_blank">http://lists.linbit.com/pipermail/csync2/2011-May/000758.html</a><br>
><br>
> which also contains a patch for the issue.<br>
><br>
> Can you confirm if the patch has been applied to the source on Git trunk?<br>
<br>
</div>Seems to have fallen through the cracks.<br>
Sorry about that.<br>
<div class="im"><br>
> If not, are there any plans to commit that patch or do you have a different<br>
> idea about the fix? I can test the patch verify if it works for me also but<br>
> it is better to build a stable rpm with the original source from trunk<br>
> rather than internal modifications, hence requesting you to commit the<br>
> patch if you agree with the fix<br>
<br>
</div>I don't know yet if I agree :-/<br>
May be some days until I can actually review/test things<br>
or even try to come up with a better solution, if any.<br>
<br>
But if it works for Dennis, and it works for you,<br>
and it does apparently not break anything else,<br>
I certainly won't refuse to commit it.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
: Lars Ellenberg<br>
: LINBIT | Your Way to High Availability<br>
: DRBD/HA support and consulting <a href="http://www.linbit.com" target="_blank">http://www.linbit.com</a><br>
_______________________________________________<br>
Csync2 mailing list<br>
<a href="mailto:Csync2@lists.linbit.com">Csync2@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/csync2" target="_blank">http://lists.linbit.com/mailman/listinfo/csync2</a><br>
</font></span></blockquote></div><br>