Thanks for using the TrueNAS Community Edition issue tracker! TrueNAS Enterprise users receive direct support for their reports from our support portal.

Cloud Sync Fail with snapshots enabled and existing Zvol

Description

When "Take Snapshot" is enabled on a Cloud Sync Task and a Zvol exists everywhere on the system the sync task fails with "KeyError: 'mountpoint'".

The error is caused by this check in the cloud_sync middleware: https://github.com/truenas/middleware/blob/bc97adfdcaec5da97c9f2e408908259c154f536a/src/middlewared/middlewared/plugins/cloud_sync.py#L468

The mountpoint proptery doesn't exist on the Zvol and the check fails.

Full error:

Error: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 409, in run
await self.future
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 445, in __run_body
rv = await self.method(*([self] + args))
File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1269, in nf
return await func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/middlewared/plugins/cloud_sync.py", line 1103, in sync
await self._sync(cloud_sync, options, job)
File "/usr/lib/python3/dist-packages/middlewared/plugins/cloud_sync.py", line 1150, in _sync
await rclone(self.middleware, job, cloud_sync, options["dry_run"])
File "/usr/lib/python3/dist-packages/middlewared/plugins/cloud_sync.py", line 191, in rclone
dataset, recursive = get_dataset_recursive(
File "/usr/lib/python3/dist-packages/middlewared/plugins/cloud_sync.py", line 462, in get_dataset_recursive
datasets = [
File "/usr/lib/python3/dist-packages/middlewared/plugins/cloud_sync.py", line 468, in <listcomp>
if dataset["properties"]["mountpoint"]["value"] != "none"
KeyError: 'mountpoint'

Problem/Justification

None

Impact

None

is duplicated by

Activity

Show:

Vladimir Vinogradenko January 27, 2022 at 4:48 PM

Marking it as done, 13 PR will be merged later

Bug Clerk January 24, 2022 at 12:17 PM

Bug Clerk January 17, 2022 at 6:37 PM

Bonnie Follweiler January 6, 2022 at 3:53 PM

Thank you for your submission ,

This ticket is now in our queue to review.

An engineering representative will update with any further questions or details in the near future.

Chris January 6, 2022 at 3:00 PM

I'm not allowed to send system config data by policy however the version is TrueNAS-SCALE-22.02-RC.2.

Complete

Details

Assignee

Reporter

Labels

Time remaining

0m

Components

Affects versions

Priority

Katalon Platform

Created January 6, 2022 at 2:43 PM
Updated July 1, 2022 at 5:55 PM
Resolved January 27, 2022 at 4:48 PM

Flag notifications