Re: [Csync2] 2-node masters and root-owned files
On 8/8/17 10:06AM, Lars Ellenberg wrote: > but in this case, until proven otherwise, > I suspect you have some git command on the other node > running as root, and updating the index file there. Hi Lars I know you really need some detailed logs to understand the problem, however I can confirm anecdotally that it has happened for me recently. That is, random files owned by root instead of the correct user. For me, I have three nodes and syncing happening in all directions and use -B. I have probably 10,000 file operations per day and I've seen the problem happen maybe twice in four months. So logs are going to be very hard to get for you. Sorry I can't be of more direct help, but if I find a way to make it happen more frequently then I'll post here. Ari -- --> Aristedes Maniatis CEO, ish https://www.ish.com.au GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A signature.asc Description: OpenPGP digital signature ___ Csync2 mailing list Csync2@lists.linbit.com http://lists.linbit.com/mailman/listinfo/csync2
Re: [Csync2] 3-node masters and root-owned files
After years of reliable service, csync2 2.0 did exactly that for me just last week. One file suddenly owned by root. Ari On 17/7/17 10:32PM, Kevin Cackler wrote: > Funnily enough, we are also experiencing this issue with the root owned > files. Randomly, and without any definable pattern, so far as we can tell, > we'll get a file that suddenly is owned by root:root with rw permissions and > we have to go in and correct the permissions. So far we haven't been able to > nail down the cause of this. > > Mark Hodge wrote: >> >> Hi, >> >> I've recently setup a csync cluster between 3 nodes and although the >> ring model works ok, it obviously fails when the middle server (node >> 2) is offline. Therefore I've been trying to get a working config that >> is something like this: >> >> node1 => node2 + node3 >> node2 => node1 + node3 >> node3 => node1 + node2 >> >> So at least if node2 is offline, node1+node3 are still syncing. >> >> Is this the best way to achieve this? using "master (slave)" pairs? >> >> I ended up putting csync on all nodes in a cron every minute (lsync >> would crash occasionally) when csync returned errors. >> >> I got lots of "Database is busy, sleeping a sec" errors, which I >> presumed was because csync was running at the same time on each node >> and causing db locks. So I staggered them, at 0, 20 and 40 sec in the >> minute which got rid of the "busy" errors. >> >> However, occasionally I will get random files appear one one or more >> nodes owned by "root" with perms "rw" only for owner. This means >> standard users cannot access these files. I suspect that csync is >> somehow failing to set uid/gid/perms after the copy. >> >> How can this happen? >> >> Mark. >> >> ___ >> Csync2 mailing list >> Csync2@lists.linbit.com >> http://lists.linbit.com/mailman/listinfo/csync2 >> >> >> ___ >> Csync2 mailing list >> Csync2@lists.linbit.com >> http://lists.linbit.com/mailman/listinfo/csync2 -- --> Aristedes Maniatis CEO, ish https://www.ish.com.au GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A signature.asc Description: OpenPGP digital signature ___ Csync2 mailing list Csync2@lists.linbit.com http://lists.linbit.com/mailman/listinfo/csync2
Re: [Csync2] ipv6 problems
On 27/04/2016 11:45am, Aristedes Maniatis wrote: > On 19/04/2016 9:14pm, Lars Ellenberg wrote: >> I don't think so. >> It's supposed to bind to something that is suitable for *both* IPv6 and IPv4. > > A patch has been submitted that might fix the IPv6 problem: > > https://github.com/ari/csync2/commit/10636a4786485f7a45d1c35a554b9bb57fa52aae > > > I haven't yet had a chance to test it, but I'll try and do that in the next > few days. Does it look reasonable to you? I've now tested it and it works nicely in my environment (FreeBSD 10.2). Ari -- --> Aristedes Maniatis CEO, ish https://www.ish.com.au GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A signature.asc Description: OpenPGP digital signature ___ Csync2 mailing list Csync2@lists.linbit.com http://lists.linbit.com/mailman/listinfo/csync2
[Csync2] [patch] document -N
Lars Ellenberg wrote: > You do realize that there is a git beyond github? Yes. I and I know you are only joking. But there are big advantages IMO to using github. Everyone expects you to be there and it is confusing when a project is not. Plus of course the benefit of the simple task tracker, pull requests and the web browsing of a repo. Finally, submitting patches by email loses all the commit history of that patch, who made it and why it was made. Anyhow, I made a simple patch for you for updating the docs: https://github.com/ari/csync2/commit/4cf424738840f226ef01492ca3fbceed96cbb62d Cheers Ari -- --> Aristedes Maniatis CEO, ish https://www.ish.com.au GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A signature.asc Description: OpenPGP digital signature ___ Csync2 mailing list Csync2@lists.linbit.com http://lists.linbit.com/mailman/listinfo/csync2
Re: [Csync2] ipv6 problems
On 19/04/2016 9:14pm, Lars Ellenberg wrote: > I don't think so. > It's supposed to bind to something that is suitable for *both* IPv6 and IPv4. A patch has been submitted that might fix the IPv6 problem: https://github.com/ari/csync2/commit/10636a4786485f7a45d1c35a554b9bb57fa52aae I haven't yet had a chance to test it, but I'll try and do that in the next few days. Does it look reasonable to you? Ari -- ------> Aristedes Maniatis CEO, ish https://www.ish.com.au GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A signature.asc Description: OpenPGP digital signature ___ Csync2 mailing list Csync2@lists.linbit.com http://lists.linbit.com/mailman/listinfo/csync2
Re: [Csync2] ipv6 problems
On 19/04/2016 9:14pm, Lars Ellenberg wrote: > You can tell it to bind to "-N your.node.name". > If not specified, it will use the "any" address > (pass a NULL node to getaddrinfo) Passing -N on the command line works nicely to bind to a specific IP. Thanks. When you have a moment, please add that switch to the man page, I'm sure others would like to know about it. > The relevant function is "csync_server_bind()" in csync2.c I'm not a C coder, but I'm confused about https://github.com/rvanlaar/csync2/blob/master/csync2.c#L276 I'm guessing that (on FreeBSD at least) it binds to an IPv6 socket and then exits the loop. For anyone else following this thread, note that the argument for -N has to match the name of the host in your configuration file. If you use an IP address for -N but the hostname in the configuration file, then it will not work. Finally, when you upgrade to 2.0, there is a new version of sqlite which has different filenames (ending in .db3 instead of .db). This causes csync to think it is syncing for the first time. Ari -- --> Aristedes Maniatis CEO, ish https://www.ish.com.au GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A signature.asc Description: OpenPGP digital signature ___ Csync2 mailing list Csync2@lists.linbit.com http://lists.linbit.com/mailman/listinfo/csync2
[Csync2] ipv6 problems
I have a server where I upgraded csync2 to version 2.0 by mistake. Unfortunately I cannot find any changelogs or documentation for the new version. I started reading commit messages, but its pretty slow going. Unfortunately csync now binds only to the ipv6 address and ignores all the ipv4 addresses. Running csync like this: csync2 -ii -v gives me only # netstat -na | grep 30865 tcp6 0 0 *.30865*.*LISTEN Although I don't have ipv6 specifically configured, it is enabled in the kernel and present on localhost. It appears that ipv6 prevents csync listening on ipv4 at all. # ifconfig em0: flags=8843 metric 0 mtu 1500 options=4219b ether 00:30:48:7d:26:50 nd6 options=29 media: Ethernet autoselect (1000baseT ) status: active em1: flags=8843 metric 0 mtu 1500 options=4219b ether 00:30:48:7d:26:50 nd6 options=29 media: Ethernet autoselect (1000baseT ) status: active lo0: flags=8049 metric 0 mtu 16384 options=63 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff00 nd6 options=21 lagg0: flags=8843 metric 0 mtu 1500 options=4219b ether 00:30:48:7d:26:50 inet 10.100.2.1 netmask 0x broadcast 10.100.255.255 inet 10.100.53.1 netmask 0x broadcast 10.100.53.1 inet 10.100.80.1 netmask 0x broadcast 10.100.80.1 inet 10.100.48.1 netmask 0x broadcast 10.100.48.1 nd6 options=29 media: Ethernet autoselect status: active laggproto failover lagghash l2,l3,l4 laggport: em0 flags=5 laggport: em1 flags=0<> Is there a way to force csync to bind to a specific IP address? Or compile out ipv6 support completely? This is FreeBSD 10.2. Thanks Ari -- --> Aristedes Maniatis CEO, ish https://www.ish.com.au GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A signature.asc Description: OpenPGP digital signature ___ Csync2 mailing list Csync2@lists.linbit.com http://lists.linbit.com/mailman/listinfo/csync2