LINBIT / csync2

file synchronization tool using librsync and current state databases
GNU General Public License v2.0
145 stars 39 forks source link

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

Open morgana2313 opened 6 years ago

morgana2313 commented 6 years ago

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 commented 6 years ago

Hello Ige,

Op 3 apr. 2018, om 20:14 heeft Lars Ellenberg notifications@github.com 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 commented 6 years ago

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?

lge commented 6 years ago

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.