[ZFSonLinux] Stop inheriting options creating share from snapshot

Because, it leads to inheritance of access rules too. That is a bug.
All other expected options are generated on-fly already.

Change-Id: Ibe744c9fd001156a8184aa8f955c424cebfb8664
Closes-Bug: #1645746
This commit is contained in:
Valeriy Ponomaryov committed 2016-12-06 14:57:35 +03:00
1 parent 583ce59b09
commit 656dc81906
3 files changed
+7 -2

No files matched your search

+1 -1
View File
@@ -604,7 +604,7 @@ class ZFSonLinuxShareDriver(zfs_utils.ExecuteMixin, driver.ShareDriver):
# NOTE(vponomaryov): SSH is used as workaround for 'execute'
# implementation restriction that does not support usage of '|'.
'ssh', ssh_cmd,
'sudo', 'zfs', 'send', '-vDp', snapshot_name, '|',
'sudo', 'zfs', 'send', '-vD', snapshot_name, '|',
'sudo', 'zfs', 'receive', '-v', dataset_name,
)
# Apply options based on used share type that may differ from
@@ -846,7 +846,7 @@ class ZFSonLinuxShareDriverTestCase(test.TestCase):
self.driver.execute.assert_has_calls([
mock.call(
'ssh', 'someuser@2.2.2.2',
'sudo', 'zfs', 'send', '-vDp', snap_name, '|',
'sudo', 'zfs', 'send', '-vD', snap_name, '|',
'sudo', 'zfs', 'receive', '-v',
'bar/subbar/some_prefix_fake_share_id'),
mock.call(
@@ -0,0 +1,5 @@
---
fixes:
- Fix inheritance of access rules from parent share by ZFSonLinux child
shares. It was inherited before, now it is not, as expected.
Now, each share created from snapshot will not have inherited access rules.