Project

General

Profile

Feature #32679

Umbrella #25917: Move business logic from Django to middlewared and make websocket API feature complete

Convert Storage:Periodic Snapshot Tasks to Middlewared

Added by William Grzybowski 12 months ago. Updated 10 months ago.

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

Description

Ticket to track transfer of business logic from Django/GUI to middlewared and making use of middleware client in GUI.

Snapshot Error.png (293 KB) Snapshot Error.png Ethan Large, 06/20/2018 10:15 AM
They were created.png (319 KB) They were created.png Ethan Large, 06/20/2018 10:15 AM
19075
19078

Associated revisions

Revision c3554003 (diff)
Added by Waqar Ahmed 12 months ago

Periodic Snapshots moved to Middlewared
Ticket: #32679

Revision f7436f5d (diff)
Added by Waqar Ahmed 12 months ago

Periodic Snapshots moved to Middlewared
Ticket: #32679

Revision 741828ac (diff)
Added by Waqar Ahmed 12 months ago

Periodic Snapshots moved to Middlewared
Ticket: #32679

Revision bc63ef21 (diff)
Added by Waqar Ahmed 12 months ago

Periodic Snapshots moved to Middlewared
Ticket: #32679

History

#1 Updated by Waqar Ahmed 12 months ago

  • Status changed from Unscreened to In Progress

#2 Updated by Waqar Ahmed 12 months ago

  • Status changed from In Progress to Ready for Testing

#3 Updated by Dru Lavigne 12 months ago

  • Target version changed from 11.2-RC2 to 11.2-BETA1

#4 Updated by Bonnie Follweiler 10 months ago

I assigned this ticket to Ethan

#5 Updated by Ethan Large 10 months ago

19075
19078

Short version: I got errors when attempting to create periodic snapshot tasks in both new and legacy GUI. It seemed like they failed to create, but they in fact created successfully.

Long version: Upon attempting to create a new periodic snapshot task in the new GUI, the error in the attached picture 'Snapshot Error' was generated. I tried a total of three times, with the same result, and the creation seemed to have failed. When I switched to the legacy UI, I saw that the three tasks had in fact been created. I then attempted to create another from the legacy UI, and though the task was in fact created I got the following error:

Request Method: POST
Request URL: http://10.231.5.219/legacy/admin/storage/task/add/
Software Version: FreeNAS-11.2-MASTER-201806200450 (196b12b)
Exception Type: ClientException
Exception Value:

[ENOMETHOD] Method "periodic_snapshot_extend" not found in "pool.snapshot"

Exception Location: /usr/local/lib/python3.6/site-packages/middlewared/client/client.py in call, line 436
Server time: Wed, 20 Jun 2018 10:08:13 -0700
Traceback
Environment:

Software Version: FreeNAS-11.2-MASTER-201806200450 (196b12b)
Request Method: POST
Request URL: http://10.231.5.219/legacy/admin/storage/task/add/

Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
42. response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in legacy_get_response
249. response = self._get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
178. response = middleware_method(request, callback, callback_args, callback_kwargs)
File "./freenasUI/freeadmin/middleware.py" in process_view
163. return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "./freenasUI/freeadmin/options.py" in wrapper
216. return self._admin.admin_view(view)(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/utils/decorators.py" in _wrapped_view
149. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
57. response = view_func(request, *args, **kwargs)
File "./freenasUI/freeadmin/site.py" in inner
142. return view(request, *args, **kwargs)
File "./freenasUI/freeadmin/options.py" in add
370. mf.save()
File "./freenasUI/middleware/form.py" in save
55. result = self.
_save()
File "./freenasUI/middleware/form.py" in __save
114. raise
File "./freenasUI/middleware/form.py" in __save
109. return c.call(f"{self.middleware_plugin}.{self._middleware_action}", *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/client/client.py" in call
436. raise ClientException(c.error, c.errno, c.trace, c.extra)

Exception Type: ClientException at /legacy/admin/storage/task/add/
Exception Value: [ENOMETHOD] Method "periodic_snapshot_extend" not found in "pool.snapshot"

Request information
GET

No GET data
POST
Variable Value
all ''
task_filesystem 'Poolerino'
task_ret_count '1'
task_ret_unit 'week'
task_begin 'Thu Jan 01 1970 09:00:00 GMT-0500 (EST)'
task_end 'Thu Jan 01 1970 18:00:00 GMT-0500 (EST)'
task_interval '60'
task_byweekday '5'
task_enabled 'on'
task_repeat_unit 'weekly'
__form_id 'dialogForm_task'
FILES

No FILES data
COOKIES
Variable Value
fntreeSaveStateCookie 'root%2Croot%2F62'
csrftoken '********'
sessionid 'wthlff82erppvg4m3oud8jqua6tt92z3'
META
Variable Value

#6 Updated by Waqar Ahmed 10 months ago

A PR has been filed and merged for the bug found out by QA. PR - https://github.com/freenas/freenas/pull/1405

#7 Updated by William Grzybowski 10 months ago

  • Status changed from Failed Testing to Ready for Testing
  • Assignee changed from William Grzybowski to Waqar Ahmed

#8 Updated by Dru Lavigne 10 months ago

  • Needs QA changed from No to Yes

#10 Updated by Ethan Large 10 months ago

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

Verified to be working as intended in Internal 8.

#11 Updated by Dru Lavigne 10 months ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF