Skip to content

Commit

Permalink
Merge pull request #244 from truenas/NAS-124390-23.10
Browse files Browse the repository at this point in the history
NAS-124390 / 23.10 / properly catch errors in zfs_prop_set_list() (by yocalebo)
  • Loading branch information
yocalebo authored Sep 28, 2023
2 parents 95f14d9 + 08f8ab4 commit 5d65dd1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libzfs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3617,7 +3617,12 @@ cdef class ZFSResource(ZFSObject):
with nogil:
ret = libzfs.zfs_prop_set_list(self.handle, props.handle)

if ret != 0:
if ret != 0 or self.root.errno != 0:
# setting the propert(y/ies) failed or
# the propert(y/ies) was/were changed successfully
# but the extended behavior that comes after failed
# (i.e. sharenfs=on will update files in exports/conf.d
# which can fail for a myriad of reasons)
raise self.root.get_error()

@staticmethod
Expand Down

0 comments on commit 5d65dd1

Please sign in to comment.