Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-129811 / 24.10 / Perform additional fixup wrt CORE ctl device names #13974

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/middlewared/middlewared/etc_files/scst.conf.mako
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
missing_extents = []
extents_io = {'vdisk_fileio': [], 'vdisk_blockio': []}
for extent in extents.values():
extent['name'] = extent['name'].replace('.', '_').replace('/', '-') # CORE ctl device names are incompatible with SCALE SCST
if extent['locked']:
middleware.logger.debug(
'Skipping generation of extent %r as the underlying resource is locked', extent['name']
Expand All @@ -160,7 +161,6 @@
missing_extents.append(extent['id'])
continue

extent['name'] = extent['name'].replace('.', '_') # CORE ctl device names are incompatible with SCALE SCST
extents_io[extents_io_key].append(extent)
all_extent_names.append(extent['name'])

Expand Down
4 changes: 2 additions & 2 deletions src/middlewared/middlewared/plugins/iscsi_/global_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ def resync_lun_size_for_zvol(self, id_):

try:
# CORE ctl device names are incompatible with SCALE SCST
# so (similarly to scst.mako.conf) replace period with underscore
extent_name = extent[0]["name"].replace('.', '_')
# so (similarly to scst.mako.conf) replace period with underscore, slash with dash
extent_name = extent[0]["name"].replace('.', '_').replace('/', '-')
with open(f'/sys/kernel/scst_tgt/devices/{extent_name}/resync_size', 'w') as f:
f.write('1')
except Exception as e:
Expand Down
Loading