Activity log for bug #1600579

Date Who What changed Old value New value Message
2016-07-10 10:30:29 Tim Bishop bug added bug
2016-07-10 10:31:36 Tim Bishop description The cron job for zfsutils-linux fails to run. The problem is that $PATH (on xenial, at least) is set to /bin:/usr/bin. The zpool binary is in /sbin and the script (below) doesn't give the full path or modify $PATH. Further, the 2>&1 ensures that the useful error is sent to awk and not stderr where it'd be more easily noticed. The fix is to just s,zpool,/sbin/zpool, in the script. And probably remove the stderr redirection, since I'm not sure if it's actually useful here. #!/bin/sh -eu # Scrub all healthy pools. zpool list -H -o health,name 2>&1 | \ awk 'BEGIN {FS="\t"} {if ($1 ~ /^ONLINE/) print $2}' | \ while read pool do zpool scrub "$pool" done The cron job for zfsutils-linux fails to run. The problem is that $PATH (on xenial, at least) is set to /bin:/usr/bin. The zpool binary is in /sbin and the script (below) doesn't give the full path or modify $PATH. Further, the 2>&1 ensures that the useful error is sent to awk and not stderr where it'd be more easily noticed. The fix is to just s,zpool,/sbin/zpool, in the script. And probably remove the stderr redirection, since I'm not sure if it's actually useful here. This is the script as it currently is, for reference: #!/bin/sh -eu # Scrub all healthy pools. zpool list -H -o health,name 2>&1 | \         awk 'BEGIN {FS="\t"} {if ($1 ~ /^ONLINE/) print $2}' | \ while read pool do         zpool scrub "$pool" done
2016-07-10 10:32:13 Tim Bishop description The cron job for zfsutils-linux fails to run. The problem is that $PATH (on xenial, at least) is set to /bin:/usr/bin. The zpool binary is in /sbin and the script (below) doesn't give the full path or modify $PATH. Further, the 2>&1 ensures that the useful error is sent to awk and not stderr where it'd be more easily noticed. The fix is to just s,zpool,/sbin/zpool, in the script. And probably remove the stderr redirection, since I'm not sure if it's actually useful here. This is the script as it currently is, for reference: #!/bin/sh -eu # Scrub all healthy pools. zpool list -H -o health,name 2>&1 | \         awk 'BEGIN {FS="\t"} {if ($1 ~ /^ONLINE/) print $2}' | \ while read pool do         zpool scrub "$pool" done The cron job for zfsutils-linux fails to run. The problem is that $PATH (on xenial, at least) is set to /bin:/usr/bin. The zpool binary is in /sbin and the /usr/lib/zfs-linux/scrub script (below) doesn't give the full path or modify $PATH. Further, the 2>&1 ensures that the useful error is sent to awk and not stderr where it'd be more easily noticed. The fix is to just s,zpool,/sbin/zpool, in the script. And probably remove the stderr redirection, since I'm not sure if it's actually useful here. This is the script as it currently is, for reference: #!/bin/sh -eu # Scrub all healthy pools. zpool list -H -o health,name 2>&1 | \         awk 'BEGIN {FS="\t"} {if ($1 ~ /^ONLINE/) print $2}' | \ while read pool do         zpool scrub "$pool" done
2016-07-11 02:40:30 Richard Laager marked as duplicate 1548009
2016-09-26 21:20:04 mickelin bug added subscriber mickelin