diff options
author | Ben Woods <woodsb02@FreeBSD.org> | 2019-06-04 14:14:23 +0000 |
---|---|---|
committer | Ben Woods <woodsb02@FreeBSD.org> | 2019-06-04 14:14:23 +0000 |
commit | aa29472b28fd54c6d31c5728191612f0334a8dca (patch) | |
tree | 335c440f556a7ca6bb38780a58c07864fb33d8ce /sysutils/zrepl/files | |
parent | 37f9ed1f9c87871ab2ef497d6a20cadb398c4d16 (diff) | |
download | ports-aa29472b28fd54c6d31c5728191612f0334a8dca.tar.gz ports-aa29472b28fd54c6d31c5728191612f0334a8dca.zip |
sysutils/zrepl: Update to 0.1.1
Changes this release:
https://zrepl.github.io/v0.1.1/changelog.html
WARNING - BREAKING CHANGES WITH THE ZREPL 0.1.X RELEASE:
There are a number of breaking changes this release. To ensure zrepl
continues to function correctly, ensure you read the changelog, and then
perform the following on both sides of the replication:
- Stop the zrepl service: # service zrepl stop
- Upgrade the zrepl package: # pkg upgrade zrepl
- Modify the zrepl config: # vi /usr/local/etc/zrepl/zrepl.yml
- Check the configuration: # service zrepl configtest
- Start the zrepl service: # service zrepl start
- Monitor the zrepl service: # zrepl status
DANGER - SNAPSHOT PRUNING REQUIRES EXPLICIT KEEP RULES:
For any ZFS snapshot that you want to keep, at least one rule must match. This
is different from previous releases where pruning only affected snapshots with
the configured snapshotting prefix. Make sure that snapshots to be kept or
ignored by zrepl are covered, e.g. by using the regex keep rule.
This also applies to snapshots taken by means other than zrepl (e.g. manually).
PR: 237667
Submitted by: Michael Zhilin (mizhka@gmail.com)
Differential Revision: https://reviews.freebsd.org/D20095
Notes
Notes:
svn path=/head/; revision=503474
Diffstat (limited to 'sysutils/zrepl/files')
-rw-r--r-- | sysutils/zrepl/files/pkg-message.in | 36 | ||||
-rw-r--r-- | sysutils/zrepl/files/zrepl.in | 19 | ||||
-rw-r--r-- | sysutils/zrepl/files/zrepl.yml.sample | 4 |
3 files changed, 39 insertions, 20 deletions
diff --git a/sysutils/zrepl/files/pkg-message.in b/sysutils/zrepl/files/pkg-message.in index 61f93581f43f..2bdeeabd7776 100644 --- a/sysutils/zrepl/files/pkg-message.in +++ b/sysutils/zrepl/files/pkg-message.in @@ -1,5 +1,7 @@ ------------------------------------------------------------------------ -zrepl must be configured before it is started the first time. +Messages from sysutils/zrepl: + +SETUP BEFORE FIRST USE: - Create the log file /var/log/zrepl.log: # service newsyslog restart - Teach syslogd to redirect facility local0 to the zrepl.log file: @@ -10,19 +12,25 @@ zrepl must be configured before it is started the first time. # sysrc zrepl_enable="YES" - Start the zrepl daemon: # service zrepl start + +Documentation: https://zrepl.github.io/ +Changelog: https://zrepl.github.io/master/changelog.html -For documentation, refer to https://zrepl.github.io/. +WARNING - BREAKING CHANGES WITH THE ZREPL 0.1.X RELEASE: +There are a number of breaking changes this release. To ensure zrepl +continues to function correctly, ensure you read the changelog, and then +perform the following on both sides of the replication: +- Stop the zrepl service: # service zrepl stop +- Upgrade the zrepl package: # pkg upgrade zrepl +- Modify the zrepl config: # vi %%PREFIX%%/etc/zrepl/zrepl.yml +- Check the configuration: # service zrepl configtest +- Start the zrepl service: # service zrepl start +- Monitor the zrepl service: # zrepl status -*** BREAKING CHANGES WITH THE 0.0.3 RELEASE: *** -- Snapshots are automatically bookmarked and pruning of bookmarks must - be configured by adding the keep_bookmarks parameter to the prune - policy section of the zrepl configuration file (source side only). - Be sure to understand the meaning bookmarks have for maximum - allowable replication downtime. -- The ssh+stdinserver transport protocol has changed, requiring zrepl - to be updates on both the sending and receiving side, and the daemon - restarted on both sides. -- The first outlet in the global.logging section of the configuration - file is now used for logging meta-errors (e.g. problems encountered - when writing to other logging outlets). +DANGER - SNAPSHOT PRUNING REQUIRES EXPLICIT KEEP RULES: +For any ZFS snapshot that you want to keep, at least one rule must match. This +is different from previous releases where pruning only affected snapshots with +the configured snapshotting prefix. Make sure that snapshots to be kept or +ignored by zrepl are covered, e.g. by using the regex keep rule. +This also applies to snapshots taken by means other than zrepl (e.g. manually). ------------------------------------------------------------------------ diff --git a/sysutils/zrepl/files/zrepl.in b/sysutils/zrepl/files/zrepl.in index 954be23f7570..89f0fcea0967 100644 --- a/sysutils/zrepl/files/zrepl.in +++ b/sysutils/zrepl/files/zrepl.in @@ -40,15 +40,18 @@ load_rc_config $name : ${zrepl_flags:=""} : ${zrepl_facility:="local0"} : ${zrepl_priority:="alert"} -: ${zrepl_options:="${zrepl_flags} --config ${zrepl_config} daemon"} +: ${zrepl_options:="${zrepl_flags} --config ${zrepl_config}"} pidfile="/var/run/zrepl/daemon.pid" command="/usr/sbin/daemon" procname="%%PREFIX%%/bin/zrepl" -command_args="-p ${pidfile} %%DAEMON_LOGGING%% ${procname} ${zrepl_options}" +command_args="-p ${pidfile} %%DAEMON_LOGGING%% ${procname} ${zrepl_options} daemon" -start_precmd=zrepl_precmd -stop_postcmd=zrepl_postcmd +start_precmd="zrepl_precmd" +stop_postcmd="zrepl_postcmd" +restart_precmd="zrepl_checkconfig" +configtest_cmd="zrepl_checkconfig" +extra_commands="configtest" zrepl_precmd() { @@ -60,6 +63,8 @@ zrepl_precmd() if [ ! -e "${pidfile}" ]; then install -g ${zrepl_group} -o ${zrepl_user} -- /dev/null "${pidfile}"; fi + + zrepl_checkconfig } zrepl_postcmd() @@ -67,4 +72,10 @@ zrepl_postcmd() rm -f -- "${pidfile}" } +zrepl_checkconfig() +{ + echo "Performing sanity check on zrepl configuration:" + eval ${procname} ${zrepl_options} configcheck +} + run_rc_command "$1" diff --git a/sysutils/zrepl/files/zrepl.yml.sample b/sysutils/zrepl/files/zrepl.yml.sample index 0d0c35efa272..cba456ca3a27 100644 --- a/sysutils/zrepl/files/zrepl.yml.sample +++ b/sysutils/zrepl/files/zrepl.yml.sample @@ -5,10 +5,10 @@ # global: logging: - - outlet: "stdout" + - type: "stdout" level: "error" format: "human" - - outlet: "syslog" + - type: "syslog" level: "info" format: "logfmt" |