From 0b4f0e142f65f7b65cda490539ac2f296f4ffcd5 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Tue, 28 Dec 2021 16:52:26 +0100 Subject: [PATCH] bundles/zfs: explicitely set canmount and mountpoint if not specified --- bundles/zfs/items.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bundles/zfs/items.py b/bundles/zfs/items.py index a990f6a..11661d5 100644 --- a/bundles/zfs/items.py +++ b/bundles/zfs/items.py @@ -76,7 +76,13 @@ svc_systemd = { }, } -zfs_datasets = node.metadata.get('zfs/datasets', {}) +for name, attrs in node.metadata.get('zfs/datasets', {}).items(): + zfs_datasets[name] = attrs + + if 'mountpoint' not in attrs: + zfs_datasets[name]['canmount'] = 'off' + else: + zfs_datasets[name]['canmount'] = 'on' for name, attrs in node.metadata.get('zfs/pools', {}).items(): zfs_pools[name] = attrs