Project

General

Profile

Bug #41556

Update SMB charset choices in middlewared

Added by William Grzybowski over 1 year ago. Updated over 1 year ago.

Status:
Done
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Middleware
Target version:
Severity:
Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

The valid hoices for dos charset and possibly unix charset are wrong.

Legacy UI provides many options but middleware accepts only a few.

We need middleware to accept all of them and also provide methods to get all possible values (get_doscharset_choices, get_unixcharset_choices -- these returning a dict)

Aug 14 14:12:31 home uwsgi: [freeadmin.views:210] UI crash exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 42, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 178, in _get_response
    response = middleware_method(request, callback, callback_args, callback_kwargs)
  File "./freenasUI/freeadmin/middleware.py", line 163, in process_view
    return login_required(view_func)(request, *view_args, **view_kwargs)
  File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "./freenasUI/services/views.py", line 212, in services_cifs
    form.save()
  File " 
Aug 14 14:12:31 home uwsgi: ./freenasUI/middleware/form.py", line 55, in save
    result = self.__save()
  File "./freenasUI/middleware/form.py", line 114, in __save
    raise
  File "./freenasUI/middleware/form.py", line 109, in __save
    return c.call(f"{self.middleware_plugin}.{self._middleware_action}", *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/client/client.py", line 437, in call
    raise ClientException(c.error, c.errno, c.trace, c.extra)
middlewared.client.client.ClientException: [doscharset] Invalid choice: UTF-8

Acceptance Criteria
Once this is done we should be able to set several different kind of charsets in Services-SMB.

https://sentry.ixsystems.com/ixsystems/freenas-middleware/issues/7215/


Related issues

Copied to FreeNAS - Bug #41628: Expose SMB charset choices in new UI Done

Associated revisions

Revision f8bb806a (diff)
Added by Waqar Ahmed over 1 year ago

Updated Charset choices in Middlewared for smb plugin This commit adds more choices to the smb plugin for charset fields and moves the generation of charset choices to Middlewared from legacy UI. Ticket: #41556

Revision b6ef2b1e (diff)
Added by Waqar Ahmed over 1 year ago

Updated Charset choices in Middlewared for smb plugin This commit adds more choices to the smb plugin for charset fields and moves the generation of charset choices to Middlewared from legacy UI. Ticket: #41556

Revision 3333647a (diff)
Added by Waqar Ahmed over 1 year ago

Updated Charset choices in Middlewared for smb plugin This commit adds more choices to the smb plugin for charset fields and moves the generation of charset choices to Middlewared from legacy UI. Ticket: #41556

Revision 381e601e (diff)
Added by Waqar Ahmed over 1 year ago

Updated Charset choices in Middlewared for smb plugin This commit adds more choices to the smb plugin for charset fields and moves the generation of charset choices to Middlewared from legacy UI. Ticket: #41556

Revision d6487df9 (diff)
Added by Waqar Ahmed over 1 year ago

Updated Charset choices in Middlewared for smb plugin (#1682) Updated Charset choices in Middlewared for smb plugin This commit adds more choices to the smb plugin for charset fields and moves the generation of charset choices to Middlewared from legacy UI. Ticket: #41556

Revision 69e55f33 (diff)
Added by Waqar Ahmed over 1 year ago

Bug fix This commit fixes a bug which prevents FreeNAS build. Ticket: #41556

Revision fc4dcd0b (diff)
Added by Waqar Ahmed over 1 year ago

Bug fix This commit fixes a bug which prevents FreeNAS build. Ticket: #41556

Revision c0f56f06 (diff)
Added by Waqar Ahmed over 1 year ago

Bug fix This commit fixes a bug which prevents FreeNAS build. Ticket: #41556

History

#1 Updated by Waqar Ahmed over 1 year ago

  • Status changed from Unscreened to In Progress

#2 Updated by Dru Lavigne over 1 year ago

  • Status changed from In Progress to Ready for Testing
  • Needs Merging changed from Yes to No

#3 Updated by Dru Lavigne over 1 year ago

  • Subject changed from Fix SMB charset options to Update SMB charset choices in middlewared

#4 Updated by Dru Lavigne over 1 year ago

  • Copied to Bug #41628: Expose SMB charset choices in new UI added

#5 Updated by Dru Lavigne over 1 year ago

  • Status changed from Ready for Testing to In Progress
  • Needs Merging changed from No to Yes

#6 Updated by Waqar Ahmed over 1 year ago

  • Status changed from In Progress to Ready for Testing

#7 Updated by Dru Lavigne over 1 year ago

  • Needs Merging changed from Yes to No

#8 Updated by Dru Lavigne over 1 year ago

  • Needs Doc changed from Yes to No

#9 Updated by Dru Lavigne over 1 year ago

  • Status changed from Ready for Testing to Done
  • Needs QA changed from Yes to No

Also available in: Atom PDF