Properly check local path for cloud sync

Description

I created a Cloud Sync task long time ago to backup the FreeNAS config (/data/freenas-v1.db), which worked until yesterday.

Now it is not starting and I get the following error:
Error: Traceback (most recent call last):
{{ File "/usr/local/lib/python3.7/site-packages/middlewared/job.py", line 349, in run}}
{{ await self.future}}
{{ File "/usr/local/lib/python3.7/site-packages/middlewared/job.py", line 386, in __run_body}}
{{ rv = await self.method(*( [self] + args))}}
{{ File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 949, in nf}}
{{ return await f(*args, **kwargs)}}
{{ File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/cloud_sync.py", line 897, in sync}}
{{ await rclone(self.middleware, job, cloud_sync)}}
{{ File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/cloud_sync.py", line 161, in rclone}}
{{ await middleware.call("zfs.dataset.query"), cloud_sync ["path"] )}}
{{ File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/cloud_sync.py", line 335, in get_dataset_recursive}}
{{ ) [0] }}
{{ IndexError: list index out of range}}
I only added additional Cloud Sync tasks - nothing else was changed.

I assume it has something to do with the path, as when creating an new Cloud Sync task, I can only select path at "/mnt/" downwards!

Problem/Justification

None

Impact

None

SmartDraw Connector

Katalon Manual Tests (BETA)

Activity

Show:

Bug Clerk December 12, 2019 at 12:39 PM

Vladimir Vinogradenko December 11, 2019 at 8:54 PM

cloud syncs (as other FreeNAS features) are meant to work within data pools. Our checks were not sufficient and that's why you're getting cryptic error message. To achieve what you're doing, create a directory within your data pool and push from it, copying your FreeNAS config file there in pre-sync script. We'll fix the checks in RC2 and your configuration won't be valid anymore.

Stefan Schramek December 11, 2019 at 4:24 PM
Edited

I updated to 11.3 RC1 right now - the error is still there, if I select "Take Snapshots"

Debug dump is attached!

Joe Maloney December 9, 2019 at 1:34 PM

I believe this has already been addressed in 11.3-RC1 which is pushing tomorrow.  https://jira.ixsystems.com/browse/NAS-103831

Joe Maloney December 9, 2019 at 1:33 PM

 I believe this may be fixed in tomorrows release already.  https://jira.ixsystems.com/browse/NAS-103831 as our engineers have address this so that this setting only gets enabled on push tasks.  Can you try 11.3-RC1 tomorrow and reopen if it is still an issue?  

Complete
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

More fields

Katalon Platform

Created December 8, 2019 at 3:21 PM
Updated July 1, 2022 at 4:47 PM
Resolved December 12, 2019 at 12:39 PM