Here is the debugging output for the problematic file (the one that is modified on master), /opt/test/db.c, when the command &quot;csync2 -xvvv&quot; is run.<br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">

SQL: SELECT peername FROM dirty GROUP BY peername<br><br>SQL Query finished.<br><br>SQL: SELECT filename, myname, forced FROM dirty WHERE peername = &#39;<a href="http://pdev22vm2.platform.avaya.com">pdev22vm2.platform.avaya.com</a>&#39; ORDER by filename ASC<br>

<br>SQL Query finished.<br><br>Connecting to host <a href="http://pdev22vm2.platform.avaya.com">pdev22vm2.platform.avaya.com</a> (PLAIN) ...<br><br>Local&gt; CONFIG \n<br>Peer&gt; OK (cmd_finished).\n<br> check: /opt/test/db.c 10, /opt/test/ 10, 10.<br>

<br>Dirty item /opt/test/db.c <a href="http://pdev22vm1.platform.avaya.com">pdev22vm1.platform.avaya.com</a> 1<br>Local&gt; HELLO <a href="http://pdev22vm1.platform.avaya.com">pdev22vm1.platform.avaya.com</a>\n<br>Peer&gt; OK (cmd_finished).\n<br>

Match (+): /opt/test on /opt/test/db.c<br><br>Updating /opt/test/db.c on <a href="http://pdev22vm2.platform.avaya.com">pdev22vm2.platform.avaya.com</a> ...<br><br>Local&gt; FLUSH s5XgBkj_4nlkSAUZZ6pjNT0klWL3d0m4wI0hV3hMir93GFl68iYVKYct1qKEM9ff /opt/test/db.c\n<br>

Peer&gt; OK (cmd_finished).\n<br>Local&gt; PATCH s5XgBkj_4nlkSAUZZ6pjNT0klWL3d0m4wI0hV3hMir93GFl68iYVKYct1qKEM9ff /opt/test/db.c\n<br>Peer&gt; Stating original file /opt rc: 0 mode: 40755\n<br>While syncing file /opt/test/db.c:<br>

<br>ERROR from peer(/opt/test/db.c): <a href="http://pdev22vm2.platform.avaya.com">pdev22vm2.platform.avaya.com</a> Stating original file /opt rc: 0 mode: 40755<br><br>Match (+): /opt/test on /opt/test/db.c<br><br>Auto-resolving conflict: Won &#39;master/slave&#39; test.<br>

<br>Updating /opt/test/db.c on <a href="http://pdev22vm2.platform.avaya.com">pdev22vm2.platform.avaya.com</a> ...<br><br>Local&gt; FLUSH s5XgBkj_4nlkSAUZZ6pjNT0klWL3d0m4wI0hV3hMir93GFl68iYVKYct1qKEM9ff /opt/test/db.c\n<br>

Peer&gt; Changing owner of /var/backups/csync2/opt to user 0 and group 0, rc= 0 \n<br>While syncing file /opt/test/db.c:<br><br>ERROR from peer(/opt/test/db.c): <a href="http://pdev22vm2.platform.avaya.com">pdev22vm2.platform.avaya.com</a> Changing owner of /var/backups/csync2/opt to user 0 and group 0, rc= 0<br>

<br>ERROR: Auto-resolving failed. Giving up.<br><br>File stays in dirty state. Try again later...<br><br>Local&gt; BYE\n<br>Peer&gt; \n<br>ERROR from peer(&lt;no file&gt;): <a href="http://pdev22vm2.platform.avaya.com">pdev22vm2.platform.avaya.com</a><br>

<br>SQL: SELECT command, logfile FROM action GROUP BY command, logfile<br><br>SQL Query finished.<br><br>SQL: COMMIT<br><br>Finished with 3 errors.<br></blockquote><br><div class="gmail_quote">I&#39;m not sure what is causing this issue and whether it is mistake on my part or a regression introduced recently in the code on git.<br>

<br>Thanks and Regards,<br>Samba<br><br><br><br>--------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>On Thu, Nov 10, 2011 at 12:26 PM, Samba <span dir="ltr">&lt;<a href="mailto:saasira@gmail.com">saasira@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Interestingly, many of the files (that are reported as L by command &quot;csync2 -T&quot;) which could not be replicated when I ran &quot;csync2 -x&quot; have been replicated smoothly when I explicitly ran &quot;csync2 -x file_name&quot; for each such file. The only problem has been the file which has been modified on the master and thus marked X by &#39;csync2 -T&#39; command.<br>


<br>Is it that csync2 is stopping to replicate all the remaining files when it encounters the first conflict? (although this is not a conflict and perhaps a regression issue).<br>It would be great if a fix can be delivered for this issue, or at least some hints as to where this needs to be fixed and how?<br>


<br>Thanks and Regards,<span class="HOEnZb"><font color="#888888"><br>Samba<br><br>------------------------------------------------------------------------------------------------------------------------------------------------------------------</font></span><div class="HOEnZb">

<div class="h5"><br><div class="gmail_quote">
On Wed, Nov 9, 2011 at 6:12 PM, Samba <span dir="ltr">&lt;<a href="mailto:saasira@gmail.com" target="_blank">saasira@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hi, <br><br>I cloned csync2 repository(latest) and built an rpm on centos5. <br><br>csync2 worked properly the first time but thereafter it is giving errors.<br><br> i think csync2 is copying the file to the slave only when it is not present on slave, if the file is also present on the slave, then it is giving the error:<br>



<br><blockquote style="margin:0pt 0pt 0pt 6.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex" class="gmail_quote">While syncing file /opt/test/yum.log: ERROR from peer(/opt/test/yum.log): <a href="http://slave.abc.com" target="_blank">slave.abc.com</a><br>



</blockquote><br>If the file is present on both master and slave but is modified on the master, then the error is:<br><br><blockquote style="margin:0pt 0pt 0pt 6.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex" class="gmail_quote">



While syncing file /opt/test/db.c:<br>ERROR from peer(/opt/test/db.c): <a href="http://slave.abc.com" target="_blank">slave.abc.com</a> Stating original file /opt rc: 0 mode: 40755<br>Auto-resolving conflict: Won &#39;master/slave&#39; test.<br>



While syncing file /opt/test/db.c:<br>ERROR from peer(/opt/test/db.c): <a href="http://slave.abc.com" target="_blank">slave.abc.com</a> Changing owner of /var/backups/csync2/opt to user 0 and group 0, rc= 0 <br>ERROR: Auto-resolving failed. Giving up.<br>



ERROR from peer(&lt;no file&gt;): <a href="http://slave.abc.com" target="_blank">slave.abc.com</a> Changing mode of /var/backups/csync2/opt/test/db.c to mode 33188, rc= 0 <br></blockquote><br>Please note that I modified the file /opt/test/db.c<br>



<br>When I ran csync2 -T, the output is:<br><br><blockquote style="margin:0pt 0pt 0pt 6.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex" class="gmail_quote">X    <a href="http://master.abc.com" target="_blank">master.abc.com</a>    <a href="http://slave.abc.com" target="_blank">slave.abc.com</a>    /opt/test/db.c<br>



L    <a href="http://master.abc.com" target="_blank">master.abc.com</a>    <a href="http://slave.abc.com" target="_blank">slave.abc.com</a>    /opt/test/maillog.1<br>L    <a href="http://master.abc.com" target="_blank">master.abc.com</a>    <a href="http://slave.abc.com" target="_blank">slave.abc.com</a>    /opt/test/messages.1<br>



L    <a href="http://master.abc.com" target="_blank">master.abc.com</a>    <a href="http://slave.abc.com" target="_blank">slave.abc.com</a>    /opt/test/rpmpkgs.1<br>L    <a href="http://master.abc.com" target="_blank">master.abc.com</a>    <a href="http://slave.abc.com" target="_blank">slave.abc.com</a>    /opt/test/rpmpkgs.2<br>



L    <a href="http://master.abc.com" target="_blank">master.abc.com</a>    <a href="http://slave.abc.com" target="_blank">slave.abc.com</a>    /opt/test/rpmpkgs.3<br>L    <a href="http://master.abc.com" target="_blank">master.abc.com</a>    <a href="http://slave.abc.com" target="_blank">slave.abc.com</a>    /opt/test/rpmpkgs.4<br>



L    <a href="http://master.abc.com" target="_blank">master.abc.com</a>    <a href="http://slave.abc.com" target="_blank">slave.abc.com</a>    /opt/test/scrollkeeper.log<br>L    <a href="http://master.abc.com" target="_blank">master.abc.com</a>    <a href="http://slave.abc.com" target="_blank">slave.abc.com</a>    /opt/test/secure.1<br>



L    <a href="http://master.abc.com" target="_blank">master.abc.com</a>    <a href="http://slave.abc.com" target="_blank">slave.abc.com</a>    /opt/test/snmpd.log<br>L    <a href="http://master.abc.com" target="_blank">master.abc.com</a>    <a href="http://slave.abc.com" target="_blank">slave.abc.com</a>    /opt/test/spooler.1<br>



L    <a href="http://master.abc.com" target="_blank">master.abc.com</a>    <a href="http://slave.abc.com" target="_blank">slave.abc.com</a>    /opt/test/yum.log<br></blockquote><br>Here is my csync2 configuration file:<br>


<br>================================================================<br>
<br># Csync2 Configuration File<br># ---------------------------------<br>#<br># Please read the documentation:<br># <a href="http://oss.linbit.com/csync2/paper.pdf" target="_blank">http://oss.linbit.com/csync2/paper.pdf</a><br>


nossl * *;<br>
group smgr<br>{<br>        host <a href="http://master.abc.com" target="_blank">master.abc.com</a>;<br>        host (<a href="http://slave.abc.com" target="_blank">slave.abc.com</a>);<br><br>        key /etc/csync2.key;<br>


<br>        include /opt/test;<br>
<br>        backup-directory /var/backups/csync2;<br>        backup-generations 3;<br><br>        auto left;<br>}<br><br><br>Csync2 1.34 is working properly but the latest git codebase is giving this error. Am I doing something wrong or is this a regression issue? If it is a regression issue, then I can test and verify a patch if you can provide one (may be i can try if some hints can be given, but i&#39;m not so good at C, hence hesitation :) ).<br>



<br>Thanks and Regards,<br>Samba<br><br><br>PS:<br><br>I had faced another minor issue with the latest codebase from Git where it complained &quot;no such column: TRUE&quot; pointing to the line:218 in the file check.c.<br>



 Here is the code snippet that is responsible for that:<br><br><blockquote style="margin:0pt 0pt 0pt 6.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex" class="gmail_quote">void csync_check_del(const char *file, int recursive, int init_run)<br>



211 {<br>212         char *where_rec = &quot;&quot;;<br>213         struct textlist *tl = 0, *t;<br>214         struct stat st;<br>215 <br>216         if ( recursive ) {<br>217                 if ( !strcmp(file, &quot;/&quot;) )<br>



218                   ASPRINTF(&amp;where_rec, &quot;OR TRUE&quot;);<br>219                 else<br>220                   ASPRINTF(&amp;where_rec, &quot;UNION ALL SELECT filename from file where filename &gt; &#39;%s/&#39; &quot;<br>



221                                 &quot;and filename &lt; &#39;%s0&#39;&quot;,<br>222                                 url_encode(file), url_encode(file));<br>223         }<br>224 <br>225         SQL_BEGIN(&quot;Checking for removed files&quot;,<br>



226                         &quot;SELECT filename from file where &quot;<br>227                         &quot;filename = &#39;%s&#39; %s ORDER BY filename&quot;, url_encode(file), where_rec)<br>228         {<br></blockquote>



<br>I had changed &quot;OR TRUE&quot; to &quot;OR 1=1&quot; which I think would work on all the databases.<br><br>I&#39;m using sqlite3, and the issue may be with the standard compliance of sqlite3 but I think it is better to go with minimum common denominator and hence would suggest to use &quot;OR 1=1&quot; instead of &quot;OR TRUE&quot; in the above mentioned context.<br>



</blockquote></div><br>
</div></div></blockquote></div><br>