From 04133bdd8ad91f5f602cfc7f8b86081a059826b7 Mon Sep 17 00:00:00 2001 From: Geoffroy Desvernay Date: Tue, 10 Sep 2024 22:17:17 +0200 Subject: [PATCH] do not enforce lz4 compression everywhere use default compression (now zstd) on init for /iocage and let zfs inheritance (or sysadmin) manage inheritance fix #26 --- iocage_lib/ioc_check.py | 1 - iocage_lib/ioc_fetch.py | 5 ++--- iocage_lib/ioc_json.py | 3 +-- iocage_lib/ioc_start.py | 1 - 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/iocage_lib/ioc_check.py b/iocage_lib/ioc_check.py index 0dbf243d..815bfcf4 100644 --- a/iocage_lib/ioc_check.py +++ b/iocage_lib/ioc_check.py @@ -116,7 +116,6 @@ def __check_datasets__(self): silent=self.silent) dataset_options = { - "compression": "lz4", "aclmode": "passthrough", "aclinherit": "passthrough" } diff --git a/iocage_lib/ioc_fetch.py b/iocage_lib/ioc_fetch.py index ed594091..585824fb 100644 --- a/iocage_lib/ioc_fetch.py +++ b/iocage_lib/ioc_fetch.py @@ -244,7 +244,7 @@ def fetch_release(self, _list=False): pass else: self.zpool.create_dataset({ - 'name': pool_dataset, 'properties': {'compression': 'lz4'} + 'name': pool_dataset }) for f in self.files: @@ -661,7 +661,7 @@ def fetch_download(self, _list, missing=False): ds = Dataset(dataset) if not ds.exists: - ds.create({'properties': {'compression': 'lz4'}}) + ds.create() if not ds.mounted: ds.mount() @@ -810,7 +810,6 @@ def fetch_extract(self, f): if not os.path.isdir(dest): self.zpool.create_dataset({ 'name': dataset, 'create_ancestors': True, - 'properties': {'compression': 'lz4'}, }) with tarfile.open(src) as f: diff --git a/iocage_lib/ioc_json.py b/iocage_lib/ioc_json.py index b7dc5725..72d4902a 100644 --- a/iocage_lib/ioc_json.py +++ b/iocage_lib/ioc_json.py @@ -1243,7 +1243,7 @@ def retrieve_default_props(): 'sync_state': 'none', 'sync_target': 'none', 'sync_tgt_zpool': 'none', - 'compression': 'lz4', + 'compression': 'on', 'origin': 'readonly', 'quota': 'none', 'mountpoint': 'readonly', @@ -2190,7 +2190,6 @@ def json_check_prop(self, key, value, conf, default=False): zfs_props = { # ZFS Props - "compression": "lz4", "origin": "readonly", "quota": "none", "mountpoint": "readonly", diff --git a/iocage_lib/ioc_start.py b/iocage_lib/ioc_start.py index a58a6dc7..c53f9bb2 100644 --- a/iocage_lib/ioc_start.py +++ b/iocage_lib/ioc_start.py @@ -320,7 +320,6 @@ def __start_jail__(self): except su.CalledProcessError: iocage_lib.ioc_common.checkoutput( ["zfs", "create", "-o", - "compression=lz4", "-o", "mountpoint=none", f"{self.pool}/{jdataset}"], stderr=su.STDOUT)