[Csync2] csync2 prefix mapping ==> I/O Error 'No such file or directory' in rsync-check

Samba saasira at gmail.com
Mon Jun 18 12:38:01 CEST 2012


Lars,

I did not make that change myself but I felt that it would be safe to
resolve the prefixes in get_tempfile_name() and paranoid_file() functions
rather than expecting that the caller functions would resolve the prefixes
before passing the input parameters.

Centralizing the logic has the other benefits like :

   - resolving environment variables
   - resolving symbolic links
   - resolving relative paths, etc

Regards,
Samba

==================================================================================
On Mon, Jun 18, 2012 at 2:27 PM, Samba <saasira at gmail.com> wrote:

> Hi Lars,
>
> I managed to modify the patch submitted by *Dennis Schafroth *to also
> consider the configured 'tempdir' directive in csync2 config files.
> Further, Dennis's patch did not fix the issue of replication to deleted
> subdirectories on slave server, which this patch has fixed. On the
> otherhand, this patch also includes the fix given by Dennis for backing up
> of prefixed locations.
>
>
> The attached patch fixes the issue previously mentioned in this mail
> thread, namely 'fail to sync when a subdirectory gets deleted either on
> master or slave servers, WITH OR WITHOUT PREFIX MAPPING'.
>
>
> I tested it for regression and am confident that this did not introduce
> any new issues;
>
> Here are the test cases we have run after upgrading the Csync2 rpm
> [deleted subdir fix]:
>
>
>
>
>
> Self
>
> Peer
>
> Result
>
> file deleted on master
>
> no changes to that file on slave
>
> SUCCESS
>
> file deleted on master
>
> changes happened to that file on slave
>
> SUCCESS
>
> file deleted on master
>
> file deleted on slave
>
> SUCCESS
>
> file changed on master
>
> no changes to that file on slave
>
> SUCCESS
>
> file changed on master
>
> file changed on slave
>
> SUCCESS
>
> file chaned on master
>
> file deleted on slave
>
> SUCCESS
>
> subdir deleted on master
>
> no changes to that subdir or files under it on slave
>
> SUCCESS
>
> subdir deleted on master
>
> files under that subdir are modified on slave
>
> SUCCESS
>
> subdir deleted on master
>
> subdir deleted on slave
>
> SUCCESS
>
> files under that subdir are modified on master
>
>
>
> subdir deleted on slave
>
> SUCCESS [synced only the file that was modified on master, did not sync
> the complete subdirectory
>
> TODO: sync the complete subdir tree when it is detected that a subdir has
> been deleted on the slave]
>
> subdir deleted on master
>
> subdir deleted on slave
>
> SUCCESS
>
> dirtree deleted on master
>
> no changes on slave
>
> SUCCESS
>
> dirtree deleted on master
>
> some files in the hierarchy changed on slave
>
> SUCCESS
>
> dirtree modified on master
>
> part of the dirtree is deleted on slave
>
> SUCCESS [synced only the file that was modified on master, did not sync
> the complete subdirectory
>
> TODO: sync the complete subdir tree when it is detected that a subdir has
> been deleted on the slave]
>
> dirtree deleted on master
>
> dirtree deleted on slave
>
> SUCCESS
>
>
>
>
>
>
>
>
>
>
>
>  Please review the attached patch and give feedback [ this is my first
> attempt at writing any usable C program, so please suggest appropriate
> corrections if any].
>
> I hope this patch gets committed to trunk soon.
>
> Thanks and Regards,
> Samba
>
>
>
> ===================================================================================
>
> On Tue, Jun 5, 2012 at 1:19 PM, Lars Ellenberg <lars.ellenberg at linbit.com>wrote:
>
>> On Sat, Jun 02, 2012 at 06:09:37AM +0530, Samba wrote:
>> > Sorry for flooding the list;
>>
>> Oh, please keep it coming ;)
>>
>> > I will review,
>> > test and verify the patch in a bit more detail and send my comments in a
>> > couple of days.
>>
>> Thanks,
>>
>>
>> --
>> : 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.
>> _______________________________________________
>> Csync2 mailing list
>> Csync2 at lists.linbit.com
>> http://lists.linbit.com/mailman/listinfo/csync2
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/csync2/attachments/20120618/77381883/attachment.htm>


More information about the Csync2 mailing list