bolthole / zrep

ZREP ZFS based replication and failover script from bolthole.com
Other
251 stars 57 forks source link

Fix propagation of `ZREP_INC_FLAG` when doing `zrep refresh` #197

Open janvrany opened 2 years ago

janvrany commented 2 years ago

When doing zrep refresh, ZREP_INC_FLAG setting (on "refreshing" side) was (prior this commit) ignored, falling back to default setting.

This is because the value ZREP_INC_FLAG was not propagated to the other ("sending") side. One way would be to set it in /etc/default/zrep on the "sending" side - but this is both fiddly and sets it for all (that is, you cannot have one "refreshing" site using -i and the other using -I)

Better solution is to simply propagate the setting to the other side, which is what this commit does.

ppbrown commented 1 year ago

Thank you both for your continued interest in zrep. It is the interaction with folks like yourself, that give me the motivational bump to keep maintaining it. I see the need for this.. however, I dont thing the proposed method of adding a special argument to the hidden function, is the best way to go. I'm reviewing the code for a cleaner way to handle this

ppbrown commented 1 year ago

Aha. I had previously HALF solved this problem, by the hack of the ZREP_SEND_FLAGS

But that doesnt transfer over well when $BBCP is in the way. So to be consistent, I probably need to make ZREP_SEND_FLAGS a full top level option, rather than a variable hack.

ppbrown commented 1 year ago

please see https://github.com/bolthole/zrep/raw/issue201/zrep