mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #47227 from pruiz/pruiz/zfs-dataset-present-slow-2017.7
Fix issue #47225: avoid zfs.filesystem_present slowdown when dataset has lots of snapshots (2017.7 branch)
This commit is contained in:
commit
56933eb0b2
@ -376,7 +376,7 @@ def filesystem_present(name, create_parent=False, properties=None, cloned_from=N
|
||||
if name in __salt__['zfs.list'](name, **{'type': 'filesystem'}): # update properties if needed
|
||||
result = {}
|
||||
if len(properties) > 0:
|
||||
result = __salt__['zfs.get'](name, **{'properties': ','.join(properties.keys()), 'fields': 'value', 'depth': 1})
|
||||
result = __salt__['zfs.get'](name, **{'properties': ','.join(properties.keys()), 'type': 'filesystem', 'fields': 'value', 'depth': 0})
|
||||
|
||||
for prop in properties:
|
||||
if properties[prop] != result[name][prop]['value']:
|
||||
|
Loading…
Reference in New Issue
Block a user