Bug#874182: Regression breaks hourly, daily, weekly, and monthly snapshots

2017-09-05 Thread Andras Korn
Package: zfs-auto-snapshot
Version: 1.2.2-1
Followup-For: Bug #874182

Hi,

"exec true && echo OK" will never print "OK" because the /bin/true binary
replaces the running shell.

The same problem exists in the zfs-auto-snapshot cronjobs; since you call
which(1) with exec, zfs-auto-snapshot is never actually run.

Andras

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (350, 'unstable'), (350, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.42-vs2.3.8.5.3-caeeng (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=hu_HU.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: runit

-- 
This message was encrypted using ROT26.



Bug#874182: Regression breaks hourly, daily, weekly, and monthly snapshots

2017-09-03 Thread Jason Wittlin-Cohen
Package: zfs-auto-snapshot
Version: 1.2.2-1
Severity: Important

Dear Maintainer,

The update to zfs-auto-snapshot 1.2.2-1 has caused a regression preventing
hourly, daily, weekly, and monthly auto snapshots from running.  Frequent
snapshots still work.  Reverting the scripts to those used by the prior
version, 1.2.1-1, fixed the issue.

New script which does not work:

!/bin/sh

# Only call zfs-auto-snapshot if it's available
exec which zfs-auto-snapshot > /dev/null && \
 zfs-auto-snapshot --quiet --syslog --label=daily --keep=31 //

Old Script that works:

#!/bin/sh
exec zfs-auto-snapshot --quiet --syslog --label=daily --keep=31 //

   * What led up to the situation?

I installed zfs-auto-snapshot on my system running Debian Buster, and
enabled
frequent, hourly, and daily snapshots.  I noticed that only frequent
snapshots
were running.  In contrast, with the same settings, my Debian Stretch system
had functional frequent, hourly, and daily snapshots. Syslog only showed the
zfs-auto-snapshot running for frequent snapshots.  There was no indication
that
the system attempted to run hourly or daily snapshots, as instructed.


   * What exactly did you do (or not do) that was effective (or

 ineffective)?

I was able to resolve the issue by replacing the zfs-auto-snapshot scripts
in
/etc/cron.daily and /etc/cron.hourly with the scripts from 1.2.1-1.

   * What was the outcome of this action?

Hourly and Daily snapshots now work as expected.

-- System Information:

Debian Release: buster/sid

  APT prefers testing
  APT policy: (900, 'testing'), (800, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.12.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)

Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages zfs-auto-snapshot depends on:

ii  cron3.0pl1-128+b1
ii  zfsutils-linux  0.6.5.11-1

zfs-auto-snapshot recommends no packages.
zfs-auto-snapshot suggests no packages.

-- Configuration Files:

/etc/cron.daily/zfs-auto-snapshot changed:

exec zfs-auto-snapshot --quiet --syslog --label=daily --keep=31 //

/etc/cron.hourly/zfs-auto-snapshot changed:

exec zfs-auto-snapshot --quiet --syslog --label=hourly --keep=24 //