truenas / py-libzfs

Python libzfs bindings
GNU Lesser General Public License v3.0
81 stars 24 forks source link

NAS-124390 / 23.10 / properly catch errors in zfs_prop_set_list() (by yocalebo) #244

Closed bugclerk closed 1 year ago

bugclerk commented 1 year ago

With the behavioral changes introduced in https://github.com/truenas/zfs/commit/22da5ae59fbf8902f4897c2d417f5673591cc8e7, it was intended that zfs_prop_set_list return 0 (success) when, for example, sharenfs=on but updating files in exports/conf.d failed.

This means that we can't just check for the return value of that function, we now need to check for the returned value as well as the errno being set on the handle.

Original PR: https://github.com/truenas/py-libzfs/pull/243 Jira URL: https://ixsystems.atlassian.net/browse/NAS-124390