zfs/contrib/pyzfs/libzfs_core
Allan Jude 8fb79fdddb
Change the error handling for invalid property values
ZFS recv should return a useful error message when an invalid index
property value is provided in the send stream properties nvlist

With a compression= property outside of the understood range:

Before:
```
receiving full stream of zof/zstd_send@send2 into testpool/recv@send2
internal error: Invalid argument
Aborted (core dumped)
```
Note: the recv completes successfully, the abort() is likely just to
make it easier to track the unexpected error code.

After:
```
receiving full stream of zof/zstd_send@send2 into testpool/recv@send2
cannot receive compression property on testpool/recv: invalid property
value received 28.9M stream in 1 seconds (28.9M/sec)
```

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Closes #10631
2020-08-01 08:41:31 -07:00
..
bindings Remove code for zfs remap 2019-06-24 16:44:01 -07:00
test Separate warning for incomplete and corrupt streams 2020-03-17 10:30:33 -07:00
__init__.py Remove code for zfs remap 2019-06-24 16:44:01 -07:00
_constants.py Change the error handling for invalid property values 2020-08-01 08:41:31 -07:00
_error_translation.py Change the error handling for invalid property values 2020-08-01 08:41:31 -07:00
_libzfs_core.py Implement bookmark copying 2020-02-11 13:19:12 -08:00
_nvlist.py Fix typos in contrib/ 2019-08-30 09:44:43 -07:00
ctypes.py pyzfs: python3 support (library 2/2) 2019-01-06 10:39:41 -08:00
exceptions.py Fix cstyle warnings 2020-03-17 15:42:27 -07:00