csync2 icon indicating copy to clipboard operation
csync2 copied to clipboard

more and clearer error/debug messages, allow A-Z and -_. in config filenames

Open morgana2313 opened this issue 8 years ago • 3 comments

I had quite some trouble figuring out what was wrong with my csync2 setup using NAT, so I added more clear error and debug messages to figure out what;s going on.

The paper.pdf might also be clearer on the host syntax: hostname@interfacename can be misleading, hostname@alternative_NATted_hostname might help people.

The restrictions on the config names lead to hard to read confignames if you have a lot of hierarchic files. Adding A-Z -_. makes things easier to read.

morgana2313 avatar Apr 01 '18 16:04 morgana2313

Hello Ige,

Op 3 apr. 2018, om 20:14 heeft Lars Ellenberg [email protected] het volgende geschreven:

@lge commented on this pull request.

usually, if you think you want to use "config names", you really want to use "groups" (and the default config name) instead. That said, config names must be valid filenames, AND valid database names in the supported databases, and the way the database names are constructed (from myhostname and cfgname) must not lead to ambiguities. Relaxing this from [a-zA-Z0-9] to [a-zAZ0-9_.-] looks harmless enough

Thanks for the tip, I’ll look into that. If that’s the reason the dots (and the minus sign) might prove to be a problem (with a mysql backend anyway).

The %s -> [%s] is a matter of taste, I guess.

I was trying to figure out the difference between hostname and hostname. (followed by a dot as in a TLD). The dots at the end of sentences were confusing :-)

Kind regards, Jasper

morgana2313 avatar Apr 03 '18 19:04 morgana2313

I'm using csync2 in combination with lsync (to only start it when an inotify happens) in a dynamic environment where the config files are generated by Saltstack.

There is a valid case where peers change or might not be resolvable or online (yet). I seems that csync2 doesn't notice new peers until I delete te database.

Are there a options where I can tell csync2 to update the hosts in the database and don't abort the sync on a host that is not resolvable or online yet?

morgana2313 avatar Apr 04 '18 09:04 morgana2313

I'm using csync2 in combination with lsync (to only start it when an inotify happens) in a dynamic environment where the config files are generated by Saltstack. There is a valid case where peers change or might not be resolvable or online (yet). I seems that csync2 doesn't notice new peers until I delete te database. Are there a options where I can tell csync2 to update the hosts in the database and don't abort the sync on a host that is not resolvable or online yet?

That has nothing to do with this pull request. please post on the mailing list, and try to elaborate a bit, I for one did not really get what you are asking.

lge avatar Apr 04 '18 10:04 lge