bundles/zfs: more ordering please

This commit is contained in:
Franzi 2023-07-13 20:02:53 +02:00
parent 5fa8c72863
commit cff3fe558e
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -2,27 +2,6 @@ from json import dumps
from bundlewrap.metadata import MetadataJSONEncoder
if node.os == 'debian':
actions = {
# For some reason, this module doesn't get auto-loaded on debian,
# even if installation of zfsutils-linux tries to start
# zfs-mount.service. We have no choice but to do it manually.
'modprobe_zfs': {
'command': 'modprobe zfs',
'unless': 'lsmod | grep ^zfs',
'needs': {
'pkg_apt:zfs-dkms',
},
'needed_by': {
'pkg_apt:zfs-zed',
'pkg_apt:zfsutils-linux',
'zfs_dataset:',
'zfs_pool:',
},
'comment': 'If this fails, do a dist-upgrade, reinstall zfs-dkms, reboot',
},
}
files = {
'/etc/modprobe.d/zfs.conf': {
'source': 'zfs-modprobe.conf',
@ -87,6 +66,9 @@ svc_systemd = {
'needs': {
'file:/etc/systemd/system/zfs-import-scan.service.d/bundlewrap.conf',
},
'after': {
'pkg_apt:',
},
'before': {
'svc_systemd:zfs-import-cache.service',
},
@ -95,14 +77,31 @@ svc_systemd = {
'running': None,
'enabled': False,
'masked': True,
'after': {
'pkg_apt:',
},
},
'zfs-mount.service': {
'after': {
'pkg_apt:',
},
},
'zfs-zed': {
'after': {
'pkg_apt:',
},
},
'zfs-mount.service': {},
'zfs-zed': {},
'zfs.target': {
'running': None,
'after': {
'pkg_apt:',
},
},
'zfs-import.target': {
'running': None,
'after': {
'pkg_apt:',
},
},
}