blob: 085e9e85caf84a098e571a3d04781b52000674ba [file] [log] [blame]
SF initial configuratordccd9a02024-06-18 14:51:07 +03001From 809a5c657faa1b1cbe26a7ae0aad77840300498f Mon Sep 17 00:00:00 2001
Peter Pentchev9c24be92022-09-26 22:35:24 +03002From: Peter Penchev <openstack-dev@storpool.com>
3Date: Mon, 12 Mar 2018 12:00:10 +0200
Peter Pentchev5cf673c2024-02-20 10:04:41 +02004Subject: [PATCH 9/9] Add iSCSI export support to the StorPool driver
Peter Pentchev9c24be92022-09-26 22:35:24 +03005
6Add four new driver options:
7- iscsi_cinder_volume: use StorPool iSCSI attachments whenever
8 the cinder-volume service needs to attach a volume to the controller,
9 e.g. for copying an image to a volume or vice versa
10- iscsi_export_to:
11 - an empty string to use the StorPool native protocol for exporting volumes
12 protocol for exporting volumes)
13 - the string "*" to always use iSCSI for exporting volumes
14 - an experimental, not fully supported list of IQN patterns to export
15 volumes to using iSCSI; this results in a Cinder driver that exports
16 different volumes using different storage protocols
17- iscsi_portal_group: the name of the iSCSI portal group defined in
18 the StorPool configuration to use for these export
19- iscsi_learn_initiator_iqns: automatically create StorPool configuration
20 records for an initiator when a volume is first exported to it
21
22When exporting volumes via iSCSI, report the storage protocol as "iSCSI" and
23disable multiattach (the StorPool CI failures with iSCSI multiattach may need
24further investigation).
25
26Change-Id: I9de64306e0e6976268df782053b0651dd1cca96f
27---
Peter Pentchev5a9f8a62023-12-06 10:40:18 +020028 .../unit/volume/drivers/test_storpool.py | 437 +++++++++++++++++-
Peter Pentchevea354462023-07-18 11:15:56 +030029 cinder/volume/drivers/storpool.py | 374 ++++++++++++++-
30 .../drivers/storpool-volume-driver.rst | 60 ++-
Peter Pentchev5a9f8a62023-12-06 10:40:18 +020031 .../storpool-iscsi-cefcfe590a07c5c7.yaml | 13 +
32 4 files changed, 874 insertions(+), 10 deletions(-)
Peter Pentchevea354462023-07-18 11:15:56 +030033 create mode 100644 releasenotes/notes/storpool-iscsi-cefcfe590a07c5c7.yaml
Peter Pentchev9c24be92022-09-26 22:35:24 +030034
Peter Pentchevacaaa382023-02-28 11:26:13 +020035diff --git a/cinder/tests/unit/volume/drivers/test_storpool.py b/cinder/tests/unit/volume/drivers/test_storpool.py
SF initial configuratordccd9a02024-06-18 14:51:07 +030036index 94074d218..781d1a0ef 100644
Peter Pentchev9c24be92022-09-26 22:35:24 +030037--- a/cinder/tests/unit/volume/drivers/test_storpool.py
38+++ b/cinder/tests/unit/volume/drivers/test_storpool.py
Peter Pentchev5cf673c2024-02-20 10:04:41 +020039@@ -14,14 +14,24 @@
Peter Pentchevea354462023-07-18 11:15:56 +030040 # under the License.
41
42
43+from __future__ import annotations
44+
45+import dataclasses
46 import itertools
47 import re
48 import sys
49+from typing import Any, NamedTuple, TYPE_CHECKING # noqa: H301
50 from unittest import mock
51
52 import ddt
53 from oslo_utils import units
Peter Pentchevea354462023-07-18 11:15:56 +030054
55+if TYPE_CHECKING:
56+ if sys.version_info >= (3, 11):
57+ from typing import Self
58+ else:
59+ from typing_extensions import Self
60+
61
62 fakeStorPool = mock.Mock()
63 fakeStorPool.spopenstack = mock.Mock()
Peter Pentchev5cf673c2024-02-20 10:04:41 +020064@@ -31,12 +41,21 @@ fakeStorPool.sptypes = mock.Mock()
Peter Pentchev9c24be92022-09-26 22:35:24 +030065 sys.modules['storpool'] = fakeStorPool
66
67
68+from cinder.common import constants
69 from cinder import exception
Peter Pentchevea354462023-07-18 11:15:56 +030070+from cinder.tests.unit import fake_constants as fconst
Peter Pentchev9c24be92022-09-26 22:35:24 +030071 from cinder.tests.unit import test
72 from cinder.volume import configuration as conf
Peter Pentchevea354462023-07-18 11:15:56 +030073 from cinder.volume.drivers import storpool as driver
74
75
76+_ISCSI_IQN_OURS = 'beleriand'
77+_ISCSI_IQN_OTHER = 'rohan'
78+_ISCSI_IQN_THIRD = 'gondor'
79+_ISCSI_PAT_OTHER = 'roh*'
80+_ISCSI_PAT_BOTH = '*riand roh*'
81+_ISCSI_PORTAL_GROUP = 'openstack_pg'
82+
83 volume_types = {
84 1: {},
85 2: {'storpool_template': 'ssd'},
Peter Pentchev5cf673c2024-02-20 10:04:41 +020086@@ -70,6 +89,10 @@ def snapshotName(vtype, vid):
Peter Pentchevea354462023-07-18 11:15:56 +030087 return 'os--snap--{t}--{id}'.format(t=vtype, id=vid)
88
89
90+def targetName(vid):
91+ return 'iqn.2012-11.storpool:{id}'.format(id=vid)
92+
93+
94 class MockDisk(object):
95 def __init__(self, diskId):
96 self.id = diskId
SF initial configuratordccd9a02024-06-18 14:51:07 +030097@@ -180,6 +203,273 @@ def MockVolumeUpdateDesc(size):
Peter Pentchevea354462023-07-18 11:15:56 +030098 return {'size': size}
99
100
101+@dataclasses.dataclass(frozen=True)
102+class MockIscsiNetwork:
103+ """Mock a StorPool IP CIDR network definition (partially)."""
104+
105+ address: str
106+
107+
108+@dataclasses.dataclass(frozen=True)
109+class MockIscsiPortalGroup:
110+ """Mock a StorPool iSCSI portal group definition (partially)."""
111+
112+ name: str
113+ networks: list[MockIscsiNetwork]
114+
115+
116+@dataclasses.dataclass(frozen=True)
117+class MockIscsiExport:
118+ """Mock a StorPool iSCSI exported volume/target definition."""
119+
120+ portalGroup: str
121+ target: str
122+
123+
124+@dataclasses.dataclass(frozen=True)
125+class MockIscsiInitiator:
126+ """Mock a StorPool iSCSI initiator definition."""
127+
128+ name: str
129+ exports: list[MockIscsiExport]
130+
131+
132+@dataclasses.dataclass(frozen=True)
133+class MockIscsiTarget:
134+ """Mock a StorPool iSCSI volume-to-target mapping definition."""
135+
136+ name: str
137+ volume: str
138+
139+
140+class IscsiTestCase(NamedTuple):
141+ """A single test case for the iSCSI config and export methods."""
142+
143+ initiator: str | None
144+ volume: str | None
145+ exported: bool
146+ commands_count: int
147+
148+
149+@dataclasses.dataclass(frozen=True)
150+class MockIscsiConfig:
151+ """Mock the structure returned by the "get current config" query."""
152+
153+ portalGroups: dict[str, MockIscsiPortalGroup]
154+ initiators: dict[str, MockIscsiInitiator]
155+ targets: dict[str, MockIscsiTarget]
156+
157+ @classmethod
158+ def build(cls, tcase: IscsiTestCase) -> Self:
159+ """Build a test config structure."""
160+ initiators = {
161+ '0': MockIscsiInitiator(name=_ISCSI_IQN_OTHER, exports=[]),
162+ }
163+ if tcase.initiator is not None:
164+ initiators['1'] = MockIscsiInitiator(
165+ name=tcase.initiator,
166+ exports=(
167+ [
168+ MockIscsiExport(
169+ portalGroup=_ISCSI_PORTAL_GROUP,
170+ target=targetName(tcase.volume),
171+ ),
172+ ]
173+ if tcase.exported
174+ else []
175+ ),
176+ )
177+
178+ targets = {
179+ '0': MockIscsiTarget(
180+ name=targetName(fconst.VOLUME2_ID),
181+ volume=volumeName(fconst.VOLUME2_ID),
182+ ),
183+ }
184+ if tcase.volume is not None:
185+ targets['1'] = MockIscsiTarget(
186+ name=targetName(tcase.volume),
187+ volume=volumeName(tcase.volume),
188+ )
189+
190+ return cls(
191+ portalGroups={
192+ '0': MockIscsiPortalGroup(
193+ name=_ISCSI_PORTAL_GROUP + '-not',
194+ networks=[],
195+ ),
196+ '1': MockIscsiPortalGroup(
197+ name=_ISCSI_PORTAL_GROUP,
198+ networks=[
199+ MockIscsiNetwork(address="192.0.2.0"),
200+ MockIscsiNetwork(address="195.51.100.0"),
201+ ],
202+ ),
203+ },
204+ initiators=initiators,
205+ targets=targets,
206+ )
207+
208+
209+@dataclasses.dataclass(frozen=True)
210+class MockIscsiConfigTop:
211+ """Mock the top level of the "get the iSCSI configuration" response."""
212+
213+ iscsi: MockIscsiConfig
214+
215+
216+class MockIscsiAPI:
217+ """Mock only the iSCSI-related calls of the StorPool API bindings."""
218+
219+ _asrt: test.TestCase
220+ _configs: list[MockIscsiConfig]
221+
222+ def __init__(
223+ self,
224+ configs: list[MockIscsiConfig],
225+ asrt: test.TestCase,
226+ ) -> None:
227+ """Store the reference to the list of iSCSI config objects."""
228+ self._asrt = asrt
229+ self._configs = configs
230+
231+ def iSCSIConfig(self) -> MockIscsiConfigTop:
232+ """Return the last version of the iSCSI configuration."""
233+ return MockIscsiConfigTop(iscsi=self._configs[-1])
234+
235+ def _handle_export(
236+ self,
237+ cfg: MockIscsiConfig, cmd: dict[str, Any],
238+ ) -> MockIscsiConfig:
239+ """Add an export for an initiator."""
240+ self._asrt.assertDictEqual(
241+ cmd,
242+ {
243+ 'initiator': _ISCSI_IQN_OURS,
244+ 'portalGroup': _ISCSI_PORTAL_GROUP,
245+ 'volumeName': volumeName(fconst.VOLUME_ID),
246+ },
247+ )
248+ self._asrt.assertEqual(cfg.initiators['1'].name, cmd['initiator'])
249+ self._asrt.assertListEqual(cfg.initiators['1'].exports, [])
250+
251+ return dataclasses.replace(
252+ cfg,
253+ initiators={
254+ **cfg.initiators,
255+ '1': dataclasses.replace(
256+ cfg.initiators['1'],
257+ exports=[
258+ MockIscsiExport(
259+ portalGroup=cmd['portalGroup'],
260+ target=targetName(fconst.VOLUME_ID),
261+ ),
262+ ],
263+ ),
264+ },
265+ )
266+
267+ def _handle_create_initiator(
268+ self,
269+ cfg: MockIscsiConfig,
270+ cmd: dict[str, Any],
271+ ) -> MockIscsiConfig:
272+ """Add a whole new initiator."""
273+ self._asrt.assertDictEqual(
274+ cmd,
275+ {
276+ 'name': _ISCSI_IQN_OURS,
277+ 'username': '',
278+ 'secret': '',
279+ },
280+ )
281+ self._asrt.assertNotIn(
282+ cmd['name'],
283+ [init.name for init in cfg.initiators.values()],
284+ )
285+ self._asrt.assertListEqual(sorted(cfg.initiators), ['0'])
286+
287+ return dataclasses.replace(
288+ cfg,
289+ initiators={
290+ **cfg.initiators,
291+ '1': MockIscsiInitiator(name=cmd['name'], exports=[]),
292+ },
293+ )
294+
295+ def _handle_create_target(
296+ self,
297+ cfg: MockIscsiConfig,
298+ cmd: dict[str, Any],
299+ ) -> MockIscsiConfig:
300+ """Add a target for a volume so that it may be exported."""
301+ self._asrt.assertDictEqual(
302+ cmd,
303+ {'volumeName': volumeName(fconst.VOLUME_ID)},
304+ )
305+ self._asrt.assertListEqual(sorted(cfg.targets), ['0'])
306+ return dataclasses.replace(
307+ cfg,
308+ targets={
309+ **cfg.targets,
310+ '1': MockIscsiTarget(
311+ name=targetName(fconst.VOLUME_ID),
312+ volume=volumeName(fconst.VOLUME_ID),
313+ ),
314+ },
315+ )
316+
317+ def _handle_initiator_add_network(
318+ self,
319+ cfg: MockIscsiConfig,
320+ cmd: dict[str, Any],
321+ ) -> MockIscsiConfig:
322+ """Add a network that an initiator is allowed to log in from."""
323+ self._asrt.assertDictEqual(
324+ cmd,
325+ {
326+ 'initiator': _ISCSI_IQN_OURS,
327+ 'net': '0.0.0.0/0',
328+ },
329+ )
330+ return dataclasses.replace(cfg)
331+
332+ _CMD_HANDLERS = {
333+ 'createInitiator': _handle_create_initiator,
334+ 'createTarget': _handle_create_target,
335+ 'export': _handle_export,
336+ 'initiatorAddNetwork': _handle_initiator_add_network,
337+ }
338+
339+ def iSCSIConfigChange(
340+ self,
341+ commands: dict[str, list[dict[str, dict[str, Any]]]],
342+ ) -> None:
343+ """Apply the requested changes to the iSCSI configuration.
344+
345+ This method adds a new config object to the configs list,
346+ making a shallow copy of the last one and applying the changes
347+ specified in the list of commands.
348+ """
349+ self._asrt.assertListEqual(sorted(commands), ['commands'])
350+ self._asrt.assertGreater(len(commands['commands']), 0)
351+ for cmd in commands['commands']:
352+ keys = sorted(cmd.keys())
353+ cmd_name = keys[0]
354+ self._asrt.assertListEqual(keys, [cmd_name])
355+ handler = self._CMD_HANDLERS[cmd_name]
356+ new_cfg = handler(self, self._configs[-1], cmd[cmd_name])
357+ self._configs.append(new_cfg)
358+
359+
360+_ISCSI_TEST_CASES = [
361+ IscsiTestCase(None, None, False, 4),
362+ IscsiTestCase(_ISCSI_IQN_OURS, None, False, 2),
363+ IscsiTestCase(_ISCSI_IQN_OURS, fconst.VOLUME_ID, False, 1),
364+ IscsiTestCase(_ISCSI_IQN_OURS, fconst.VOLUME_ID, True, 0),
365+]
366+
367+
368 def MockSPConfig(section = 's01'):
369 res = {}
370 m = re.match('^s0*([A-Za-z0-9]+)$', section)
SF initial configuratordccd9a02024-06-18 14:51:07 +0300371@@ -221,7 +511,15 @@ class StorPoolTestCase(test.TestCase):
Peter Pentchev9c24be92022-09-26 22:35:24 +0300372 self.cfg.volume_backend_name = 'storpool_test'
373 self.cfg.storpool_template = None
374 self.cfg.storpool_replication = 3
375+ self.cfg.iscsi_cinder_volume = False
376+ self.cfg.iscsi_export_to = ''
Peter Pentchevea354462023-07-18 11:15:56 +0300377+ self.cfg.iscsi_learn_initiator_iqns = True
378+ self.cfg.iscsi_portal_group = _ISCSI_PORTAL_GROUP
Peter Pentchev9c24be92022-09-26 22:35:24 +0300379+
Peter Pentchevea354462023-07-18 11:15:56 +0300380+ self._setup_test_driver()
381
Peter Pentchev9c24be92022-09-26 22:35:24 +0300382+ def _setup_test_driver(self):
383+ """Initialize a StorPool driver as per the current configuration."""
384 mock_exec = mock.Mock()
385 mock_exec.return_value = ('', '')
386
SF initial configuratordccd9a02024-06-18 14:51:07 +0300387@@ -230,7 +528,7 @@ class StorPoolTestCase(test.TestCase):
Peter Pentchev9c24be92022-09-26 22:35:24 +0300388 self.driver.check_for_setup_error()
389
390 @ddt.data(
391- (5, TypeError),
392+ (5, (TypeError, AttributeError)),
393 ({'no-host': None}, KeyError),
394 ({'host': 'sbad'}, driver.StorPoolConfigurationInvalid),
395 ({'host': 's01'}, None),
SF initial configuratordccd9a02024-06-18 14:51:07 +0300396@@ -246,7 +544,7 @@ class StorPoolTestCase(test.TestCase):
Peter Pentchev9c24be92022-09-26 22:35:24 +0300397 conn)
398
399 @ddt.data(
400- (5, TypeError),
401+ (5, (TypeError, AttributeError)),
402 ({'no-host': None}, KeyError),
403 ({'host': 'sbad'}, driver.StorPoolConfigurationInvalid),
404 )
SF initial configuratordccd9a02024-06-18 14:51:07 +0300405@@ -285,7 +583,7 @@ class StorPoolTestCase(test.TestCase):
Peter Pentchev5a9f8a62023-12-06 10:40:18 +0200406 self.assertEqual(21, pool['total_capacity_gb'])
407 self.assertEqual(5, int(pool['free_capacity_gb']))
408
409- self.assertTrue(pool['multiattach'])
410+ self.assertFalse(pool['multiattach'])
411 self.assertFalse(pool['QoS_support'])
412 self.assertFalse(pool['thick_provisioning_support'])
413 self.assertTrue(pool['thin_provisioning_support'])
SF initial configuratordccd9a02024-06-18 14:51:07 +0300414@@ -641,3 +939,136 @@ class StorPoolTestCase(test.TestCase):
415 self.driver.get_pool({
Peter Pentchev9c24be92022-09-26 22:35:24 +0300416 'volume_type': volume_type
417 }))
418+
419+ @ddt.data(
420+ # The default values
Peter Pentchevea354462023-07-18 11:15:56 +0300421+ ('', False, constants.STORPOOL, _ISCSI_IQN_OURS, False),
Peter Pentchev9c24be92022-09-26 22:35:24 +0300422+
423+ # Export to all
Peter Pentchevea354462023-07-18 11:15:56 +0300424+ ('*', True, constants.ISCSI, _ISCSI_IQN_OURS, True),
425+ ('*', True, constants.ISCSI, _ISCSI_IQN_OURS, True),
Peter Pentchev9c24be92022-09-26 22:35:24 +0300426+
427+ # Only export to the controller
Peter Pentchevea354462023-07-18 11:15:56 +0300428+ ('', False, constants.STORPOOL, _ISCSI_IQN_OURS, False),
Peter Pentchev9c24be92022-09-26 22:35:24 +0300429+
430+ # Some of the not-fully-supported pattern lists
Peter Pentchevea354462023-07-18 11:15:56 +0300431+ (_ISCSI_PAT_OTHER, False, constants.STORPOOL, _ISCSI_IQN_OURS, False),
432+ (_ISCSI_PAT_OTHER, False, constants.STORPOOL, _ISCSI_IQN_OTHER, True),
433+ (_ISCSI_PAT_BOTH, False, constants.STORPOOL, _ISCSI_IQN_OURS, True),
434+ (_ISCSI_PAT_BOTH, False, constants.STORPOOL, _ISCSI_IQN_OTHER, True),
Peter Pentchev9c24be92022-09-26 22:35:24 +0300435+ )
436+ @ddt.unpack
437+ def test_wants_iscsi(self, iscsi_export_to, use_iscsi, storage_protocol,
438+ hostname, expected):
439+ """Check the "should this export use iSCSI?" detection."""
440+ self.cfg.iscsi_export_to = iscsi_export_to
441+ self._setup_test_driver()
442+ self.assertEqual(self.driver._use_iscsi, use_iscsi)
443+
444+ # Make sure the driver reports the correct protocol in the stats
445+ self.driver._update_volume_stats()
446+ self.assertEqual(self.driver._stats["vendor_name"], "StorPool")
447+ self.assertEqual(self.driver._stats["storage_protocol"],
448+ storage_protocol)
449+
450+ def check(conn, forced, expected):
451+ """Pass partially or completely valid connector info."""
452+ for initiator in (None, hostname):
Peter Pentchevea354462023-07-18 11:15:56 +0300453+ for host in (None, _ISCSI_IQN_THIRD):
Peter Pentchev9c24be92022-09-26 22:35:24 +0300454+ self.assertEqual(
455+ self.driver._connector_wants_iscsi({
456+ "host": host,
457+ "initiator": initiator,
458+ **conn,
459+ }),
460+ expected if initiator is not None and host is not None
461+ else forced)
462+
463+ # If iscsi_cinder_volume is set and this is the controller, then yes.
464+ check({"storpool_wants_iscsi": True}, True, True)
465+
466+ # If iscsi_cinder_volume is not set or this is not the controller, then
467+ # look at the specified expected value.
468+ check({"storpool_wants_iscsi": False}, use_iscsi, expected)
469+ check({}, use_iscsi, expected)
Peter Pentchevea354462023-07-18 11:15:56 +0300470+
471+ def _validate_iscsi_config(
472+ self,
473+ cfg: MockIscsiConfig,
474+ res: dict[str, Any],
475+ tcase: IscsiTestCase,
476+ ) -> None:
477+ """Make sure the returned structure makes sense."""
478+ initiator = res['initiator']
479+ cfg_initiator = cfg.initiators.get('1')
480+
481+ self.assertIs(res['cfg'].iscsi, cfg)
482+ self.assertEqual(res['pg'].name, _ISCSI_PORTAL_GROUP)
483+
484+ if tcase.initiator is None:
485+ self.assertIsNone(initiator)
486+ else:
487+ self.assertIsNotNone(initiator)
488+ self.assertEqual(initiator, cfg_initiator)
489+
490+ if tcase.volume is None:
491+ self.assertIsNone(res['target'])
492+ else:
493+ self.assertIsNotNone(res['target'])
494+ self.assertEqual(res['target'], cfg.targets.get('1'))
495+
496+ if tcase.initiator is None:
497+ self.assertIsNone(cfg_initiator)
498+ self.assertIsNone(res['export'])
499+ else:
500+ self.assertIsNotNone(cfg_initiator)
501+ if tcase.exported:
502+ self.assertIsNotNone(res['export'])
503+ self.assertEqual(res['export'], cfg_initiator.exports[0])
504+ else:
505+ self.assertIsNone(res['export'])
506+
507+ @ddt.data(*_ISCSI_TEST_CASES)
508+ def test_iscsi_get_config(self, tcase: IscsiTestCase) -> None:
509+ """Make sure the StorPool iSCSI configuration is parsed correctly."""
510+ cfg_orig = MockIscsiConfig.build(tcase)
511+ configs = [cfg_orig]
512+ iapi = MockIscsiAPI(configs, self)
513+ with mock.patch.object(self.driver._attach, 'api', new=lambda: iapi):
514+ res = self.driver._get_iscsi_config(
515+ _ISCSI_IQN_OURS,
516+ fconst.VOLUME_ID,
517+ )
518+
519+ self._validate_iscsi_config(cfg_orig, res, tcase)
520+
521+ @ddt.data(*_ISCSI_TEST_CASES)
522+ def test_iscsi_create_export(self, tcase: IscsiTestCase) -> None:
523+ """Make sure _create_iscsi_export() makes the right API calls."""
524+ cfg_orig = MockIscsiConfig.build(tcase)
525+ configs = [cfg_orig]
526+ iapi = MockIscsiAPI(configs, self)
527+ with mock.patch.object(self.driver._attach, 'api', new=lambda: iapi):
528+ self.driver._create_iscsi_export(
529+ {
530+ 'id': fconst.VOLUME_ID,
531+ 'display_name': fconst.VOLUME_NAME,
532+ },
533+ {
534+ # Yeah, okay, so we cheat a little bit here...
535+ 'host': _ISCSI_IQN_OURS + '.hostname',
536+ 'initiator': _ISCSI_IQN_OURS,
537+ },
538+ )
539+
540+ self.assertEqual(len(configs), tcase.commands_count + 1)
541+ cfg_final = configs[-1]
542+ self.assertEqual(cfg_final.initiators['1'].name, _ISCSI_IQN_OURS)
543+ self.assertEqual(
544+ cfg_final.initiators['1'].exports[0].target,
545+ targetName(fconst.VOLUME_ID),
546+ )
547+ self.assertEqual(
548+ cfg_final.targets['1'].volume,
549+ volumeName(fconst.VOLUME_ID),
550+ )
Peter Pentchevacaaa382023-02-28 11:26:13 +0200551diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py
SF initial configuratordccd9a02024-06-18 14:51:07 +0300552index caa0ce06e..cec7589f2 100644
Peter Pentchev9c24be92022-09-26 22:35:24 +0300553--- a/cinder/volume/drivers/storpool.py
554+++ b/cinder/volume/drivers/storpool.py
555@@ -15,6 +15,7 @@
556
557 """StorPool block device driver"""
558
559+import fnmatch
560 import platform
561
562 from oslo_config import cfg
Peter Pentchev5cf673c2024-02-20 10:04:41 +0200563@@ -43,6 +44,31 @@ if storpool:
Peter Pentchev9c24be92022-09-26 22:35:24 +0300564
565
566 storpool_opts = [
567+ cfg.BoolOpt('iscsi_cinder_volume',
568+ default=False,
569+ help='Let the cinder-volume service use iSCSI instead of '
570+ 'the StorPool block device driver for accessing '
571+ 'StorPool volumes, e.g. when creating a volume from '
572+ 'an image or vice versa.'),
573+ cfg.StrOpt('iscsi_export_to',
574+ default='',
575+ help='Whether to export volumes using iSCSI. '
576+ 'An empty string (the default) makes the driver export '
577+ 'all volumes using the StorPool native network protocol. '
578+ 'The value "*" makes the driver export all volumes using '
579+ 'iSCSI. '
580+ 'Any other value leads to an experimental not fully '
581+ 'supported configuration and is interpreted as '
582+ 'a whitespace-separated list of patterns for IQNs for '
583+ 'hosts that need volumes to be exported via iSCSI, e.g. '
584+ '"iqn.1991-05.com.microsoft:\\*" for Windows hosts.'),
585+ cfg.BoolOpt('iscsi_learn_initiator_iqns',
586+ default=True,
587+ help='Create a StorPool record for a new initiator as soon as '
588+ 'Cinder asks for a volume to be exported to it.'),
589+ cfg.StrOpt('iscsi_portal_group',
590+ default=None,
591+ help='The portal group to export volumes via iSCSI in.'),
592 cfg.StrOpt('storpool_template',
593 default=None,
594 help='The StorPool template for volumes with no type.'),
SF initial configuratordccd9a02024-06-18 14:51:07 +0300595@@ -104,6 +130,7 @@ class StorPoolDriver(driver.VolumeDriver):
Peter Pentchev9c24be92022-09-26 22:35:24 +0300596 self._ourId = None
597 self._ourIdInt = None
598 self._attach = None
599+ self._use_iscsi = None
600
601 @staticmethod
602 def get_driver_options():
SF initial configuratordccd9a02024-06-18 14:51:07 +0300603@@ -161,10 +188,326 @@ class StorPoolDriver(driver.VolumeDriver):
Peter Pentchev9c24be92022-09-26 22:35:24 +0300604 raise StorPoolConfigurationInvalid(
605 section=hostname, param='SP_OURID', error=e)
606
607+ def _connector_wants_iscsi(self, connector):
608+ """Should we do this export via iSCSI?
609+
610+ Check the configuration to determine whether this connector is
611+ expected to provide iSCSI exports as opposed to native StorPool
612+ protocol ones. Match the initiator's IQN against the list of
613+ patterns supplied in the "iscsi_export_to" configuration setting.
614+ """
615+ if connector is None:
616+ return False
617+ if self._use_iscsi:
618+ LOG.debug(' - forcing iSCSI for all exported volumes')
619+ return True
620+ if connector.get('storpool_wants_iscsi'):
621+ LOG.debug(' - forcing iSCSI for the controller')
622+ return True
623+
624+ try:
625+ iqn = connector.get('initiator')
626+ except Exception:
627+ iqn = None
628+ try:
629+ host = connector.get('host')
630+ except Exception:
631+ host = None
632+ if iqn is None or host is None:
633+ LOG.debug(' - this connector certainly does not want iSCSI')
634+ return False
635+
636+ LOG.debug(' - check whether %(host)s (%(iqn)s) wants iSCSI',
637+ {
638+ 'host': host,
639+ 'iqn': iqn,
640+ })
641+
642+ export_to = self.configuration.iscsi_export_to
643+ if export_to is None:
644+ return False
645+
646+ for pat in export_to.split():
647+ LOG.debug(' - matching against %(pat)s', {'pat': pat})
648+ if fnmatch.fnmatch(iqn, pat):
649+ LOG.debug(' - got it!')
650+ return True
651+ LOG.debug(' - nope')
652+ return False
653+
654 def validate_connector(self, connector):
655+ if self._connector_wants_iscsi(connector):
656+ return True
657 return self._storpool_client_id(connector) >= 0
658
659+ def _get_iscsi_config(self, iqn, volume_id):
660+ """Get the StorPool iSCSI config items pertaining to this volume.
661+
662+ Find the elements of the StorPool iSCSI configuration tree that
663+ will be needed to create, ensure, or remove the iSCSI export of
664+ the specified volume to the specified initiator.
665+ """
666+ cfg = self._attach.api().iSCSIConfig()
667+
668+ pg_name = self.configuration.iscsi_portal_group
669+ pg_found = [
670+ pg for pg in cfg.iscsi.portalGroups.values() if pg.name == pg_name
671+ ]
672+ if not pg_found:
673+ raise Exception('StorPool Cinder iSCSI configuration error: '
674+ 'no portal group "{pg}"'.format(pg=pg_name))
675+ pg = pg_found[0]
676+
677+ # Do we know about this initiator?
678+ i_found = [
679+ init for init in cfg.iscsi.initiators.values() if init.name == iqn
680+ ]
681+ if i_found:
682+ initiator = i_found[0]
683+ else:
684+ initiator = None
685+
686+ # Is this volume already being exported?
687+ volname = self._attach.volumeName(volume_id)
688+ t_found = [
689+ tgt for tgt in cfg.iscsi.targets.values() if tgt.volume == volname
690+ ]
691+ if t_found:
692+ target = t_found[0]
693+ else:
694+ target = None
695+
696+ # OK, so is this volume being exported to this initiator?
697+ export = None
698+ if initiator is not None and target is not None:
699+ e_found = [
700+ exp for exp in initiator.exports
701+ if exp.portalGroup == pg.name and exp.target == target.name
702+ ]
703+ if e_found:
704+ export = e_found[0]
705+
706+ return {
707+ 'cfg': cfg,
708+ 'pg': pg,
709+ 'initiator': initiator,
710+ 'target': target,
711+ 'export': export,
712+ 'volume_name': volname,
713+ 'volume_id': volume_id,
714+ }
715+
716+ def _create_iscsi_export(self, volume, connector):
717+ """Create (if needed) an iSCSI export for the StorPool volume."""
718+ LOG.debug(
719+ '_create_iscsi_export() invoked for volume '
720+ '"%(vol_name)s" (%(vol_id)s) connector %(connector)s',
721+ {
722+ 'vol_name': volume['display_name'],
723+ 'vol_id': volume['id'],
724+ 'connector': connector,
725+ }
726+ )
727+ iqn = connector['initiator']
728+ try:
729+ cfg = self._get_iscsi_config(iqn, volume['id'])
730+ except Exception as exc:
731+ LOG.error(
732+ 'Could not fetch the iSCSI config: %(exc)s', {'exc': exc}
733+ )
734+ raise
735+
736+ if cfg['initiator'] is None:
737+ if not (self.configuration.iscsi_learn_initiator_iqns or
738+ self.configuration.iscsi_cinder_volume and
739+ connector.get('storpool_wants_iscsi')):
740+ raise Exception('The "{iqn}" initiator IQN for the "{host}" '
741+ 'host is not defined in the StorPool '
742+ 'configuration.'
743+ .format(iqn=iqn, host=connector['host']))
744+ else:
745+ LOG.info('Creating a StorPool iSCSI initiator '
746+ 'for "{host}s" ({iqn}s)',
747+ {'host': connector['host'], 'iqn': iqn})
748+ self._attach.api().iSCSIConfigChange({
749+ 'commands': [
750+ {
751+ 'createInitiator': {
752+ 'name': iqn,
753+ 'username': '',
754+ 'secret': '',
755+ },
756+ },
757+ {
758+ 'initiatorAddNetwork': {
759+ 'initiator': iqn,
760+ 'net': '0.0.0.0/0',
761+ },
762+ },
763+ ]
764+ })
765+
766+ if cfg['target'] is None:
767+ LOG.info(
768+ 'Creating a StorPool iSCSI target '
769+ 'for the "%(vol_name)s" volume (%(vol_id)s)',
770+ {
771+ 'vol_name': volume['display_name'],
772+ 'vol_id': volume['id'],
773+ }
774+ )
775+ self._attach.api().iSCSIConfigChange({
776+ 'commands': [
777+ {
778+ 'createTarget': {
779+ 'volumeName': cfg['volume_name'],
780+ },
781+ },
782+ ]
783+ })
784+ cfg = self._get_iscsi_config(iqn, volume['id'])
785+
786+ if cfg['export'] is None:
787+ LOG.info('Creating a StorPool iSCSI export '
788+ 'for the "{vol_name}s" volume ({vol_id}s) '
789+ 'to the "{host}s" initiator ({iqn}s) '
790+ 'in the "{pg}s" portal group',
791+ {
792+ 'vol_name': volume['display_name'],
793+ 'vol_id': volume['id'],
794+ 'host': connector['host'],
795+ 'iqn': iqn,
796+ 'pg': cfg['pg'].name
797+ })
798+ self._attach.api().iSCSIConfigChange({
799+ 'commands': [
800+ {
801+ 'export': {
802+ 'initiator': iqn,
803+ 'portalGroup': cfg['pg'].name,
804+ 'volumeName': cfg['volume_name'],
805+ },
806+ },
807+ ]
808+ })
809+
Peter Pentchevc53e6c02023-02-08 15:13:56 +0200810+ target_portals = [
811+ "{addr}:3260".format(addr=net.address)
812+ for net in cfg['pg'].networks
813+ ]
814+ target_iqns = [cfg['target'].name] * len(target_portals)
815+ target_luns = [0] * len(target_portals)
816+ if connector.get('multipath', False):
817+ multipath_settings = {
818+ 'target_iqns': target_iqns,
819+ 'target_portals': target_portals,
820+ 'target_luns': target_luns,
821+ }
822+ else:
823+ multipath_settings = {}
824+
Peter Pentchev9c24be92022-09-26 22:35:24 +0300825+ res = {
826+ 'driver_volume_type': 'iscsi',
827+ 'data': {
Peter Pentchevc53e6c02023-02-08 15:13:56 +0200828+ **multipath_settings,
Peter Pentchev9c24be92022-09-26 22:35:24 +0300829+ 'target_discovered': False,
Peter Pentchevc53e6c02023-02-08 15:13:56 +0200830+ 'target_iqn': target_iqns[0],
831+ 'target_portal': target_portals[0],
832+ 'target_lun': target_luns[0],
Peter Pentchev9c24be92022-09-26 22:35:24 +0300833+ 'volume_id': volume['id'],
834+ 'discard': True,
835+ },
836+ }
837+ LOG.debug('returning %(res)s', {'res': res})
838+ return res
839+
840+ def _remove_iscsi_export(self, volume, connector):
841+ """Remove an iSCSI export for the specified StorPool volume."""
842+ LOG.debug(
843+ '_remove_iscsi_export() invoked for volume '
844+ '"%(vol_name)s" (%(vol_id)s) connector %(conn)s',
845+ {
846+ 'vol_name': volume['display_name'],
847+ 'vol_id': volume['id'],
848+ 'conn': connector,
849+ }
850+ )
851+ try:
852+ cfg = self._get_iscsi_config(connector['initiator'], volume['id'])
853+ except Exception as exc:
854+ LOG.error(
855+ 'Could not fetch the iSCSI config: %(exc)s', {'exc': exc}
856+ )
857+ raise
858+
859+ if cfg['export'] is not None:
860+ LOG.info('Removing the StorPool iSCSI export '
861+ 'for the "%(vol_name)s" volume (%(vol_id)s) '
862+ 'to the "%(host)s" initiator (%(iqn)s) '
863+ 'in the "%(pg)s" portal group',
864+ {
865+ 'vol_name': volume['display_name'],
866+ 'vol_id': volume['id'],
867+ 'host': connector['host'],
868+ 'iqn': connector['initiator'],
869+ 'pg': cfg['pg'].name,
870+ })
871+ try:
872+ self._attach.api().iSCSIConfigChange({
873+ 'commands': [
874+ {
875+ 'exportDelete': {
876+ 'initiator': cfg['initiator'].name,
877+ 'portalGroup': cfg['pg'].name,
878+ 'volumeName': cfg['volume_name'],
879+ },
880+ },
881+ ]
882+ })
883+ except spapi.ApiError as e:
884+ if e.name not in ('objectExists', 'objectDoesNotExist'):
885+ raise
886+ LOG.info('Looks like somebody beat us to it')
887+
888+ if cfg['target'] is not None:
889+ last = True
890+ for initiator in cfg['cfg'].iscsi.initiators.values():
891+ if initiator.name == cfg['initiator'].name:
892+ continue
893+ for exp in initiator.exports:
894+ if exp.target == cfg['target'].name:
895+ last = False
896+ break
897+ if not last:
898+ break
899+
900+ if last:
901+ LOG.info(
902+ 'Removing the StorPool iSCSI target '
903+ 'for the "{vol_name}s" volume ({vol_id}s)',
904+ {
905+ 'vol_name': volume['display_name'],
906+ 'vol_id': volume['id'],
907+ }
908+ )
909+ try:
910+ self._attach.api().iSCSIConfigChange({
911+ 'commands': [
912+ {
913+ 'deleteTarget': {
914+ 'volumeName': cfg['volume_name'],
915+ },
916+ },
917+ ]
918+ })
919+ except spapi.ApiError as e:
920+ if e.name not in ('objectDoesNotExist', 'invalidParam'):
921+ raise
922+ LOG.info('Looks like somebody beat us to it')
923+
924 def initialize_connection(self, volume, connector):
925+ if self._connector_wants_iscsi(connector):
926+ return self._create_iscsi_export(volume, connector)
927 return {'driver_volume_type': 'storpool',
928 'data': {
929 'client_id': self._storpool_client_id(connector),
SF initial configuratordccd9a02024-06-18 14:51:07 +0300930@@ -173,6 +516,9 @@ class StorPoolDriver(driver.VolumeDriver):
Peter Pentchev9c24be92022-09-26 22:35:24 +0300931 }}
932
933 def terminate_connection(self, volume, connector, **kwargs):
934+ if self._connector_wants_iscsi(connector):
935+ LOG.debug('- removing an iSCSI export')
936+ self._remove_iscsi_export(volume, connector)
937 pass
938
939 def create_snapshot(self, snapshot):
SF initial configuratordccd9a02024-06-18 14:51:07 +0300940@@ -274,11 +620,20 @@ class StorPoolDriver(driver.VolumeDriver):
Peter Pentchev9c24be92022-09-26 22:35:24 +0300941 )
942
943 def create_export(self, context, volume, connector):
944- pass
945+ if self._connector_wants_iscsi(connector):
946+ LOG.debug('- creating an iSCSI export')
947+ self._create_iscsi_export(volume, connector)
948
949 def remove_export(self, context, volume):
950 pass
951
952+ def _attach_volume(self, context, volume, properties, remote=False):
953+ if self.configuration.iscsi_cinder_volume and not remote:
954+ LOG.debug('- adding the "storpool_wants_iscsi" flag')
955+ properties['storpool_wants_iscsi'] = True
956+
957+ return super()._attach_volume(context, volume, properties, remote)
958+
959 def delete_volume(self, volume):
960 name = self._attach.volumeName(volume['id'])
961 try:
SF initial configuratordccd9a02024-06-18 14:51:07 +0300962@@ -315,6 +670,17 @@ class StorPoolDriver(driver.VolumeDriver):
Peter Pentchev9c24be92022-09-26 22:35:24 +0300963 LOG.error("StorPoolDriver API initialization failed: %s", e)
964 raise
965
966+ export_to = self.configuration.iscsi_export_to
967+ export_to_set = export_to is not None and export_to.split()
968+ vol_iscsi = self.configuration.iscsi_cinder_volume
969+ pg_name = self.configuration.iscsi_portal_group
970+ if (export_to_set or vol_iscsi) and pg_name is None:
971+ msg = _('The "iscsi_portal_group" option is required if '
972+ 'any patterns are listed in "iscsi_export_to"')
973+ raise exception.VolumeDriverException(message=msg)
974+
975+ self._use_iscsi = export_to == "*"
976+
977 def _update_volume_stats(self):
978 try:
979 dl = self._attach.api().disksList()
SF initial configuratordccd9a02024-06-18 14:51:07 +0300980@@ -340,7 +706,7 @@ class StorPoolDriver(driver.VolumeDriver):
Peter Pentchev9c24be92022-09-26 22:35:24 +0300981 'total_capacity_gb': total / units.Gi,
982 'free_capacity_gb': free / units.Gi,
983 'reserved_percentage': 0,
984- 'multiattach': True,
Peter Pentchev5a9f8a62023-12-06 10:40:18 +0200985+ 'multiattach': self._use_iscsi,
Peter Pentchev9c24be92022-09-26 22:35:24 +0300986 'QoS_support': False,
987 'thick_provisioning_support': False,
988 'thin_provisioning_support': True,
SF initial configuratordccd9a02024-06-18 14:51:07 +0300989@@ -359,7 +725,9 @@ class StorPoolDriver(driver.VolumeDriver):
Peter Pentchev9c24be92022-09-26 22:35:24 +0300990 'volume_backend_name') or 'storpool',
991 'vendor_name': 'StorPool',
992 'driver_version': self.VERSION,
993- 'storage_protocol': constants.STORPOOL,
994+ 'storage_protocol': (
995+ constants.ISCSI if self._use_iscsi else constants.STORPOOL
996+ ),
Peter Pentchevacaaa382023-02-28 11:26:13 +0200997 # Driver capabilities
Peter Pentchev9c24be92022-09-26 22:35:24 +0300998 'clone_across_pools': True,
999 'sparse_copy_volume': True,
Peter Pentchevacaaa382023-02-28 11:26:13 +02001000diff --git a/doc/source/configuration/block-storage/drivers/storpool-volume-driver.rst b/doc/source/configuration/block-storage/drivers/storpool-volume-driver.rst
Peter Pentchevea354462023-07-18 11:15:56 +03001001index d2c5895a9..1f3d46cce 100644
Peter Pentchev9c24be92022-09-26 22:35:24 +03001002--- a/doc/source/configuration/block-storage/drivers/storpool-volume-driver.rst
1003+++ b/doc/source/configuration/block-storage/drivers/storpool-volume-driver.rst
Peter Pentchevacaaa382023-02-28 11:26:13 +02001004@@ -19,12 +19,15 @@ Prerequisites
Peter Pentchev9c24be92022-09-26 22:35:24 +03001005 * The controller and all the compute nodes must have access to the StorPool
1006 API service.
1007
1008-* All nodes where StorPool-backed volumes will be attached must have access to
1009+* If iSCSI is not being used as a transport (see below), all nodes where
1010+ StorPool-backed volumes will be attached must have access to
1011 the StorPool data network and run the ``storpool_block`` service.
1012
1013-* If StorPool-backed Cinder volumes need to be created directly from Glance
1014- images, then the node running the ``cinder-volume`` service must also have
1015- access to the StorPool data network and run the ``storpool_block`` service.
1016+* If Glance uses Cinder as its image store, or if StorPool-backed Cinder
1017+ volumes need to be created directly from Glance images, and iSCSI is not
1018+ being used as a transport, then the node running the ``cinder-volume``
1019+ service must also have access to the StorPool data network and run
1020+ the ``storpool_block`` service.
1021
1022 * All nodes that need to access the StorPool API (the compute nodes and
1023 the node running the ``cinder-volume`` service) must have the following
Peter Pentchevacaaa382023-02-28 11:26:13 +02001024@@ -34,6 +37,29 @@ Prerequisites
Peter Pentchev9c24be92022-09-26 22:35:24 +03001025 * the storpool Python bindings package
1026 * the storpool.spopenstack Python helper package
1027
1028+Using iSCSI as the transport protocol
1029+-------------------------------------
1030+
1031+The StorPool distributed storage system uses its own, highly optimized and
1032+tailored for its specifics, network protocol for communication between
1033+the storage servers and the clients (the OpenStack cluster nodes where
1034+StorPool-backed volumes will be attached). There are cases when granting
1035+various nodes access to the StorPool data network or installing and
1036+running the ``storpool_block`` client service on them may pose difficulties.
1037+The StorPool servers may also expose the user-created volumes and snapshots
1038+using the standard iSCSI protocol that only requires TCP routing and
1039+connectivity between the storage servers and the StorPool clients.
1040+The StorPool Cinder driver may be configured to export volumes and
1041+snapshots via iSCSI using the ``iscsi_export_to`` and ``iscsi_portal_group``
1042+configuration options.
1043+
1044+Additionally, even if e.g. the hypervisor nodes running Nova will use
1045+the StorPool network protocol and run the ``storpool_block`` service
1046+(so the ``iscsi_export_to`` option has its default empty string value),
1047+the ``iscsi_cinder_volume`` option configures the StorPool Cinder driver
1048+so that only the ``cinder-volume`` service will use the iSCSI protocol when
1049+attaching volumes and snapshots to transfer data to and from Glance images.
1050+
1051 Configuring the StorPool volume driver
1052 --------------------------------------
1053
Peter Pentchevea354462023-07-18 11:15:56 +03001054@@ -55,6 +81,32 @@ volume backend definition) and per volume type:
Peter Pentchev9c24be92022-09-26 22:35:24 +03001055 with the default placement constraints for the StorPool cluster.
1056 The default value for the chain replication is 3.
1057
Peter Pentchevea354462023-07-18 11:15:56 +03001058+In addition, if the iSCSI protocol is used to access the StorPool cluster as
1059+described in the previous section, the following options may be defined in
1060+the ``cinder.conf`` volume backend definition:
1061+
Peter Pentchev9c24be92022-09-26 22:35:24 +03001062+- ``iscsi_export_to``: if set to the value ``*``, the StorPool Cinder driver
1063+ will export volumes and snapshots using the iSCSI protocol instead of
1064+ the StorPool network protocol. The ``iscsi_portal_group`` option must also
1065+ be specified.
1066+
1067+- ``iscsi_portal_group``: if the ``iscsi_export_to`` option is set to
1068+ the value ``*`` or the ``iscsi_cinder_volume`` option is turned on,
1069+ this option specifies the name of the iSCSI portal group that Cinder
1070+ volumes will be exported to.
1071+
1072+- ``iscsi_cinder_volume``: if enabled, even if the ``iscsi_export_to`` option
1073+ has its default empty value, the ``cinder-volume`` service will use iSCSI
1074+ to attach the volumes and snapshots for transferring data to and from
1075+ Glance images.
1076+
Peter Pentchevea354462023-07-18 11:15:56 +03001077+- ``iscsi_learn_initiator_iqns``: if enabled, the StorPool Cinder driver will
1078+ automatically use the StorPool API to create definitions for new initiators
1079+ in the StorPool cluster's configuration. This is the default behavior of
1080+ the driver; it may be disabled in the rare case if, e.g. because of site
1081+ policy, OpenStack iSCSI initiators (e.g. Nova hypervisors) need to be
1082+ explicitly allowed to use the StorPool iSCSI targets.
1083+
Peter Pentchev9c24be92022-09-26 22:35:24 +03001084 Using the StorPool volume driver
1085 --------------------------------
1086
Peter Pentchevea354462023-07-18 11:15:56 +03001087diff --git a/releasenotes/notes/storpool-iscsi-cefcfe590a07c5c7.yaml b/releasenotes/notes/storpool-iscsi-cefcfe590a07c5c7.yaml
1088new file mode 100644
Peter Pentchev5a9f8a62023-12-06 10:40:18 +02001089index 000000000..edf46d298
Peter Pentchevea354462023-07-18 11:15:56 +03001090--- /dev/null
1091+++ b/releasenotes/notes/storpool-iscsi-cefcfe590a07c5c7.yaml
Peter Pentchev5a9f8a62023-12-06 10:40:18 +02001092@@ -0,0 +1,13 @@
Peter Pentchevea354462023-07-18 11:15:56 +03001093+---
1094+features:
1095+ - |
1096+ StorPool driver: Added support for exporting the StorPool-backed volumes
1097+ using the iSCSI protocol, so that the Cinder volume service and/or
1098+ the Nova or Glance consumers do not need to have the StorPool block
1099+ device third-party service installed. See the StorPool driver section in
1100+ the Cinder documentation for more information on the ``iscsi_export_to``,
1101+ ``iscsi_portal_group``, ``iscsi_cinder_volume``, and
1102+ ``iscsi_learn_initiator_iqns`` options.
Peter Pentchev5a9f8a62023-12-06 10:40:18 +02001103+ Note that multiattach support for StorPool is now only enabled if
1104+ ``iscsi_export_to`` is set to ``*`, that is, all StorPool volumes will be
1105+ exported via iSCSI to all initiators.
Peter Pentchevacaaa382023-02-28 11:26:13 +02001106--
SF initial configuratordccd9a02024-06-18 14:51:07 +030011072.43.0
Peter Pentchevacaaa382023-02-28 11:26:13 +02001108