Project

General

Profile

Bug #34050

Remove CRASHED state from API until proper service monitoring is implemented

Added by Eric Turgeon 11 months ago. Updated 11 months ago.

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Severity:
Low 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

I have noticed that all the services that get stop crash, so I tought to right a bug reports for that.

Here an exemple from my IPython setup.

In [4]: GET('/service?service=ssh').text
Out[4]: '[\n {\n  "id": 11,\n  "service": "ssh",\n  "enable": true,\n  "state": "RUNNING",\n  "pids": [\n   4171\n  ]\n }\n]'

In [5]: POST("/service/stop", {"service": "ssh", "service-control": {"onetime": True}}).text
Out[5]: 'false'

In [6]: GET('/service?service=ssh').text
Out[6]: '[\n {\n  "id": 11,\n  "service": "ssh",\n  "enable": true,\n  "state": "CRASHED",\n  "pids": []\n }\n]'

In [7]: POST("/service/start", {"service": "ssh", "service-control": {"onetime": True}}).text
Out[7]: 'true'

In [8]: GET('/service?service=ssh').text
Out[8]: '[\n {\n  "id": 11,\n  "service": "ssh",\n  "enable": true,\n  "state": "RUNNING",\n  "pids": [\n   21903\n  ]\n }\n]'

In [9]: POST("/service/stop", {"service": "ssh", "service-control": {"onetime": True}}).text
Out[9]: 'false'

In [10]: GET('/service?service=ssh').text
Out[10]: '[\n {\n  "id": 11,\n  "service": "ssh",\n  "enable": true,\n  "state": "CRASHED",\n  "pids": []\n }\n]'

Here one of the test

================================================= 19 passed in 4.39 seconds ==================================================
==================================================== test session starts =====================================================
platform freebsd12 -- Python 3.6.5, pytest-3.4.2, py-1.5.3, pluggy-0.6.0 -- /usr/local/bin/python3.6
cachedir: .pytest_cache
rootdir: /usr/home/ericbsd/projects/freenas/freenas/tests, inifile:
collected 28 items                                                                                                           

api2/nfs.py::test_01_creating_the_nfs_server PASSED                                                                    [  3%]
api2/nfs.py::test_02_creating_dataset_nfs PASSED                                                                       [  7%]
api2/nfs.py::test_03_changing_permissions_on_nfs PASSED                                                                [ 10%]
api2/nfs.py::test_04_creating_a_nfs_share_on_nfs_PATH PASSED                                                           [ 14%]
api2/nfs.py::test_05_starting_nfs_service_at_boot PASSED                                                               [ 17%]
api2/nfs.py::test_06_checking_to_see_if_nfs_service_is_enabled_at_boot PASSED                                          [ 21%]
api2/nfs.py::test_07_starting_nfs_service PASSED                                                                       [ 25%]
api2/nfs.py::test_08_checking_to_see_if_nfs_service_is_running PASSED                                                  [ 28%]
api2/nfs.py::test_09_creating_nfs_mountpoint SKIPPED                                                                   [ 32%]
api2/nfs.py::test_10_mounting_nfs SKIPPED                                                                              [ 35%]
api2/nfs.py::test_11_creating_nfs_file SKIPPED                                                                         [ 39%]
api2/nfs.py::test_12_moving_nfs_file SKIPPED                                                                           [ 42%]
api2/nfs.py::test_13_copying_nfs_file SKIPPED                                                                          [ 46%]
api2/nfs.py::test_14_deleting_nfs_file SKIPPED                                                                         [ 50%]
api2/nfs.py::test_15_unmounting_nfs SKIPPED                                                                            [ 53%]
api2/nfs.py::test_16_removing_nfs_mountpoint SKIPPED                                                                   [ 57%]
api2/nfs.py::test_17_updating_the_nfs_service PASSED                                                                   [ 60%]
api2/nfs.py::test_18_checking_to_see_if_nfs_service_is_enabled PASSED                                                  [ 64%]
api2/nfs.py::test_19_creating_nfs_mountpoint SKIPPED                                                                   [ 67%]
api2/nfs.py::test_20_mounting_nfs SKIPPED                                                                              [ 71%]
api2/nfs.py::test_21_creating_nfs_file SKIPPED                                                                         [ 75%]
api2/nfs.py::test_22_moving_nfs_file SKIPPED                                                                           [ 78%]
api2/nfs.py::test_23_copying_nfs_file SKIPPED                                                                          [ 82%]
api2/nfs.py::test_24_deleting_nfs_file SKIPPED                                                                         [ 85%]
api2/nfs.py::test_25_unmounting_nfs SKIPPED                                                                            [ 89%]
api2/nfs.py::test_26_removing_nfs_mountpoint SKIPPED                                                                   [ 92%]
api2/nfs.py::test_25_stoping_nfs_service PASSED                                                                        [ 96%]
api2/nfs.py::test_26_checking_to_see_if_nfs_service_is_stop FAILED                                                     [100%]

------------- generated xml file: /usr/home/ericbsd/projects/freenas/freenas/tests/results/nfs_tests_result.xml --------------

Associated revisions

Revision 1ed8610b (diff)
Added by William Grzybowski 11 months ago

fix(middlewared/service): remove CRASHED state

We dont have service monitoring yet. We cant tell if service crashed or
was deliberately stopped.

Ticket: #34050

Revision 6acc77e9 (diff)
Added by William Grzybowski 11 months ago

fix(middlewared/service): remove CRASHED state

We dont have service monitoring yet. We cant tell if service crashed or
was deliberately stopped.

Ticket: #34050

History

#1 Updated by Dru Lavigne 11 months ago

  • Assignee changed from Release Council to William Grzybowski

#2 Updated by William Grzybowski 11 months ago

  • Status changed from Unscreened to In Progress
  • Needs Merging changed from Yes to No

#3 Updated by William Grzybowski 11 months ago

  • Target version changed from Backlog to 11.2-BETA1

#4 Updated by William Grzybowski 11 months ago

  • Status changed from In Progress to Ready for Testing
  • Severity changed from New to Low Medium

#5 Updated by Dru Lavigne 11 months ago

  • Subject changed from Rest API 2.0 all service that get stop crash to Remove CRASHED state from API until proper service monitoring is implemented

#6 Updated by Eric Turgeon 11 months ago

  • Needs QA changed from Yes to No

It solves on my last test.

#7 Updated by Dru Lavigne 11 months ago

  • Status changed from Ready for Testing to Done

Also available in: Atom PDF