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 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 = { files = {
'/etc/modprobe.d/zfs.conf': { '/etc/modprobe.d/zfs.conf': {
'source': 'zfs-modprobe.conf', 'source': 'zfs-modprobe.conf',
@ -87,6 +66,9 @@ svc_systemd = {
'needs': { 'needs': {
'file:/etc/systemd/system/zfs-import-scan.service.d/bundlewrap.conf', 'file:/etc/systemd/system/zfs-import-scan.service.d/bundlewrap.conf',
}, },
'after': {
'pkg_apt:',
},
'before': { 'before': {
'svc_systemd:zfs-import-cache.service', 'svc_systemd:zfs-import-cache.service',
}, },
@ -95,14 +77,31 @@ svc_systemd = {
'running': None, 'running': None,
'enabled': False, 'enabled': False,
'masked': True, 'masked': True,
'after': {
'pkg_apt:',
},
},
'zfs-mount.service': {
'after': {
'pkg_apt:',
},
},
'zfs-zed': {
'after': {
'pkg_apt:',
},
}, },
'zfs-mount.service': {},
'zfs-zed': {},
'zfs.target': { 'zfs.target': {
'running': None, 'running': None,
'after': {
'pkg_apt:',
},
}, },
'zfs-import.target': { 'zfs-import.target': {
'running': None, 'running': None,
'after': {
'pkg_apt:',
},
}, },
} }