dont automount/read props in testmode

This commit is contained in:
Edwin Eefting 2023-09-27 01:32:29 +02:00
parent 50f8aba101
commit 16ab4f8183
No known key found for this signature in database
GPG Key ID: 0F3C35D8E9887737

View File

@ -707,6 +707,8 @@ class ZfsDataset:
def automount(self):
"""mount the dataset as if one did a zfs mount -a, but only for this dataset"""
self.debug("Auto mounting")
if self.properties['type']!="filesystem":
@ -775,7 +777,9 @@ class ZfsDataset:
#try to automount it, if its the initial transfer
if not prev_snapshot:
target_snapshot.parent.force_exists=True
target_snapshot.parent.automount()
#in test mode it doesnt actually exist, so dont try to mount it/read properties
if not target_snapshot.zfs_node.readonly:
target_snapshot.parent.automount()
def abort_resume(self):