[Csync2] -f not working as documented? (again)
Lars Ellenberg
lars.ellenberg at linbit.com
Sat Jan 14 13:02:36 CET 2012
On Mon, Jan 09, 2012 at 12:21:23AM +0100, Martin Leben wrote:
> Hi!
>
> I use csync2 1.34 on debian squeeze in a group of two nodes. Some
> files are marked dirty on both nodes. Trying to resolve this by
> using the "-f" flag on one of the nodes doesn't work. Trying on the
> other doesn't work either.
>
> root at obed:~# csync2 -x
> While syncing file %martin%/_.txt:
> ERROR from peer birdie: File is also marked dirty here!
> [...]
> Finished with 3 errors.
> root at obed:~# csync2 -f /home/martin/data/_.txt
> root at obed:~# csync2 -x
> While syncing file %martin%/_.txt:
> ERROR from peer birdie: File is also marked dirty here!
> Finished with 3 errors.
> [...]
>
> This seems to be the exact same problem that was reported and solved
> ages ago. See
> <http://lists.linbit.com/pipermail/csync2/2005-November/000028.html>
No, that was something completely different.
Yours is related to prefix substitution,
and it looks like the patch that was supposed to fix this
http://git.linbit.com/gitweb.cgi?p=csync2.git;a=commitdiff;h=47400b5200bdb320855c37492985eaa835018ea0
does not really use the pfname as it should:
diff --git a/csync2.c b/csync2.c
index b8bf552..1693329 100644
--- a/csync2.c
+++ b/csync2.c
@@ -773,12 +773,12 @@ found_a_group:;
else
ASPRINTF(&where_rec, "or (filename > '%s/' "
"and filename < '%s0')",
- url_encode(realname), url_encode(realname));
+ url_encode(pfname), url_encode(pfname));
}
SQL("Mark file as to be forced",
"UPDATE dirty SET forced = 1 WHERE filename = '%s' %s",
- url_encode(realname), where_rec);
+ url_encode(pfname), where_rec);
if ( recursive )
free(where_rec);
> Do you have any ideas?
(d'oh!)
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
More information about the Csync2
mailing list