On Wed, Dec 27, 2017 at 01:43:53PM -0800, E-Blokos wrote:
> On 12/25/2017 5:34 AM, Lars Ellenberg wrote:
> >On Sat, Dec 23, 2017 at 03:38:20AM -0800, E-Blokos wrote:
> > >
> > > is there any API/CLI command to put a host in maintenance/add/remove
> > > as hot plug?
> > I'm not sure I understand what you mean by that.
> > But as every help text and man page says:
> > Csync2 will refuse to do anything
> > when a /etc/csync2/csync2.lock file is found.
> > So maybe "touch /etc/csync2/csync2.lock" is what you want?
> > Lars
> Thanks for your answer.
> Maybe I didn't describe well.
> let's say there is a group of 4 nodes.
> for various reason the admin wants to just
> put one node in maintenance through the replication
> chain, temporary, so csync2 won't try to connect to it
> until the node is back in "normal" mode.
> Until now I had to remove the node on all csync2 files on all nodes
> to reproduce it. Also with this kind of option it will avoid csync2 to lock
> trying to connect and will avoid thousands email sent by crond too ;)
Nothing exactly like this exists.
Yes, you would need to remove it from the config file,
and later re-add (and re-integrate) it again.
Maybe you can have your cron (or other) jobs simply not do "sync to
everyone", but sync to specific peers instead, and then exclude the
"offline" peer from the list of peers, or list of cronjobs?
csync2 supports this:
csync2 -u -P only,these,peers
You could have one cronjob for each peer,
and disable/comment out the "offline" ones.
Or use a for loop
SUPPOSEDLY_ONLINE_PEERS="some number of peers"
for peer in $SUPPOSEDLY_ONLINE_PEERS; do csync2 -u -P $peer ; done
And change that variable as you see fit.
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker
: R&D, Integration, Ops, Consulting, Support
DRBD® and LINBIT® are registered trademarks of LINBIT
Csync2 mailing list