mirror of https://github.com/jimsalterjrs/sanoid
fix(syncoid): Regression: `zfs get` parser not compatible with fallback
In the fallback mode, non-snapshot datasets would be included in the output, leading to this parsing error: ```shell # syncoid --debug root@192.168.122.26:rpool/before syncoid-test-11/after … [TRUNCATED] … WARNING: snapshot listing failed, trying fallback command DEBUG: getting list of snapshots on rpool/before using ssh -S /tmp/syncoid-root19216812226-1718239740-763496-6973 root@192.168.122.26 zfs get -Hpd 1 all ''"'"'rpool/before'"'"'' |... CRITICAL ERROR: Unexpected dataset format in rpool/before type filesystem - at /usr/sbin/syncoid line 1914. ``` Fixes: https://github.com/jimsalterjrs/sanoid/pull/818#issuecomment-2164155867
This commit is contained in:
parent
f16c15c9ba
commit
a2adaf8499
2
syncoid
2
syncoid
|
|
@ -1911,7 +1911,7 @@ sub getsnaps {
|
|||
die "CRITICAL ERROR: Unexpected line format in $line" unless defined $value;
|
||||
|
||||
my (undef, $snap) = split /@/, $dataset;
|
||||
die "CRITICAL ERROR: Unexpected dataset format in $line" unless $snap;
|
||||
next unless length $snap;
|
||||
|
||||
if (!snapisincluded($snap)) { next; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue