Skip to content

Commit

Permalink
NAS-107302: Clarify two Periodic Snapshot error messages
Browse files Browse the repository at this point in the history
- Rework dataset not found to be clear that a dataset or zvol was not found. This should solve multi-window/user situations where a dataset/zvol is deleted while the other window has it selected.
- Clarify the exclude message a little.

(cherry picked from commit 07aa0d7)
  • Loading branch information
Mrt134 authored and william-gr committed Aug 21, 2020
1 parent 9fef244 commit be37edc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/middlewared/middlewared/plugins/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,13 @@ async def _validate(self, data):
if data['dataset'] not in (await self.middleware.call('pool.filesystem_choices')):
verrors.add(
'dataset',
'Invalid ZFS dataset'
'ZFS dataset or zvol not found'
)

if not data['recursive'] and data['exclude']:
verrors.add(
'exclude',
'Excluding datasets has no sense for non-recursive periodic snapshot tasks'
'Excluding datasets is not necessary for non-recursive periodic snapshot tasks'
)

for i, v in enumerate(data['exclude']):
Expand Down

0 comments on commit be37edc

Please sign in to comment.