items/zfs_dataset: remove automatic dependency detection for now
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good

This basically reverts commit 1086ed28c3
This commit is contained in:
Franzi 2021-07-17 19:40:41 +02:00
parent cee2a41771
commit 84d55c246a
Signed by: kunsi
GPG key ID: 12E3D2136B818350
12 changed files with 56 additions and 8 deletions

View file

@ -3,6 +3,9 @@ defaults = {
'datasets': { 'datasets': {
'tank/element-web': { 'tank/element-web': {
'mountpoint': '/opt/element-web', 'mountpoint': '/opt/element-web',
'needed_by': {
'directory:/opt/element-web',
},
}, },
}, },
}, },

View file

@ -50,9 +50,15 @@ defaults = {
'tank/gitea': {}, 'tank/gitea': {},
'tank/gitea/home': { 'tank/gitea/home': {
'mountpoint': '/home/git', 'mountpoint': '/home/git',
'needed_by': {
'directory:/home/git',
},
}, },
'tank/gitea/var': { 'tank/gitea/var': {
'mountpoint': '/var/lib/gitea', 'mountpoint': '/var/lib/gitea',
'needed_by': {
'directory:/var/lib/gitea',
},
}, },
}, },
}, },

View file

@ -60,10 +60,16 @@ defaults = {
'tank/matrix-media-repo': {}, 'tank/matrix-media-repo': {},
'tank/matrix-media-repo/install': { 'tank/matrix-media-repo/install': {
'mountpoint': '/opt/matrix-media-repo', 'mountpoint': '/opt/matrix-media-repo',
'needed_by': {
'directory:/opt/matrix-media-repo',
},
}, },
'tank/matrix-media-repo/media': { 'tank/matrix-media-repo/media': {
'mountpoint': '/var/matrix/media', 'mountpoint': '/var/matrix/media',
'compression': 'on', 'compression': 'on',
'needed_by': {
'directory:/var/matrix/media',
},
}, },
}, },
}, },

View file

@ -44,6 +44,9 @@ defaults = {
'datasets': { 'datasets': {
'tank/mautrix-telegram': { 'tank/mautrix-telegram': {
'mountpoint': '/opt/mautrix-telegram', 'mountpoint': '/opt/mautrix-telegram',
'needed_by': {
'directory:/opt/mautrix-telegram',
},
}, },
}, },
}, },

View file

@ -51,6 +51,9 @@ defaults = {
'datasets': { 'datasets': {
'tank/mautrix-whatsapp': { 'tank/mautrix-whatsapp': {
'mountpoint': '/opt/mautrix-whatsapp', 'mountpoint': '/opt/mautrix-whatsapp',
'needed_by': {
'directory:/opt/mautrix-whatsapp',
},
}, },
}, },
}, },

View file

@ -39,6 +39,9 @@ defaults = {
'datasets': { 'datasets': {
'tank/mx-puppet-discord': { 'tank/mx-puppet-discord': {
'mountpoint': '/opt/mx-puppet-discord', 'mountpoint': '/opt/mx-puppet-discord',
'needed_by': {
'directory:/opt/mx-puppet-discord',
},
}, },
}, },
}, },

View file

@ -15,6 +15,9 @@ defaults = {
'datasets': { 'datasets': {
'tank/pleroma-data': { 'tank/pleroma-data': {
'mountpoint': '/var/pleroma', 'mountpoint': '/var/pleroma',
'needed_by': {
'directory:/var/pleroma',
},
}, },
}, },
}, },

View file

@ -27,10 +27,16 @@ defaults = {
'zfs': { 'zfs': {
'datasets': { 'datasets': {
'tank/mail': { 'tank/mail': {
'mountpoint': '/var/mail', 'mountpoint': '/var/mail/vmail',
'needed_by': {
'directory:/var/mail/vmail',
},
}, },
'tank/postfixadmin': { 'tank/postfixadmin': {
'mountpoint': '/opt/postfixadmin', 'mountpoint': '/opt/postfixadmin',
'needed_by': {
'directory:/opt/postfixadmin',
},
}, },
}, },
}, },

View file

@ -119,13 +119,16 @@ class ZFSDataset(Item):
# XXX Could be optimized by finding the "largest" # XXX Could be optimized by finding the "largest"
# parent only. # parent only.
yield item.id yield item.id
elif self.attributes.get('mountpoint'):
for item_type in ['directory', 'file', 'git_deploy']: # XXX This populates 'needs', not 'needed_by'. We have opened
if ( # an issue: https://github.com/bundlewrap/bundlewrap/issues/648
item.ITEM_TYPE_NAME == item_type and # elif self.attributes.get('mountpoint'):
item.name.startswith('{}:{}'.format(item_type, self.attributes['mountpoint'])) # for item_type in ['directory', 'file', 'git_deploy']:
): # if (
yield item.id # item.ITEM_TYPE_NAME == item_type and
# item.name.startswith('{}:{}'.format(item_type, self.attributes['mountpoint']))
# ):
# yield item.id
if not pool_item_found: if not pool_item_found:

View file

@ -87,6 +87,9 @@ nodes['htz-cloud.luther'] = {
'datasets': { 'datasets': {
'tank/luther-website': { 'tank/luther-website': {
'mountpoint': '/var/www/luther-ps', 'mountpoint': '/var/www/luther-ps',
'needed_by': {
'directory:/var/www/luther-ps',
},
}, },
}, },
}, },

View file

@ -79,6 +79,9 @@ nodes['htz-cloud.sewfile'] = {
}, },
'tank/seafile-data': { 'tank/seafile-data': {
'mountpoint': '/mnt/seafile-data', 'mountpoint': '/mnt/seafile-data',
'needed_by': {
'bundle:seafile',
},
}, },
}, },
}, },

View file

@ -324,9 +324,15 @@ nodes['rx300'] = {
'tank/libvirt': { 'tank/libvirt': {
'mountpoint': '/var/lib/libvirt', 'mountpoint': '/var/lib/libvirt',
'compression': 'on', 'compression': 'on',
'needed_by': {
'bundle:vmhost',
},
}, },
'tank/home-kunsi': { 'tank/home-kunsi': {
'mountpoint': '/home/kunsi', 'mountpoint': '/home/kunsi',
'needed_by': {
'directory:/home/kunsi',
},
}, },
}, },
}, },