Project

General

Profile

Bug #35038

Rename cifs to smb in REST API

Added by Eric Turgeon over 2 years ago. Updated over 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
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

From https://builds.ixsystems.com/jenkins/view/Builds/view/All/job/FreeNAS%20-%20Master%20-%20Incremental%20Build/3206/artifact/artifacts/iso/FreeNAS-11.2-MASTER-201806150906-91108b28e.iso that iso can be updated any time so https://builds.ixsystems.com/jenkins/view/Builds/view/All/job/FreeNAS%20-%20Master%20-%20Incremental%20Build/3206/artifact/artifacts/iso/

cifs service failed to stop maybe related to Bug #34843, but as stated by William it also could be a Samba problem also.

Step to reproduce

The iso is placed int the freenas/test/iso folder
It is run under a BHYVE build by ixautomation.

sudo ixautomation --run api2-tests --systype freenas --keep-alive

When it is done the result of IPython are done in the freenas/tests folder.

cd path/tofreenas/tests
sudo ipython-3.6

In [1]: from functions import POST, DELETE, GET, PUT

In [18]: POST("/service/stop/", {"service": "cifs", "service-control": {"onetime": True}}).text
Out[18]: 'true'

In [19]: GET('/service/?service=cifs').text
Out[19]: '[\n {\n  "id": 4,\n  "service": "cifs",\n  "enable": false,\n  "state": "RUNNING",\n  "pids": []\n }\n]'

In [20]: POST("/service/stop/", {"service": "cifs", "onetime": True}).text
Out[20]: 'true'

In [21]: GET('/service/?service=cifs').text
Out[21]: '[\n {\n  "id": 4,\n  "service": "cifs",\n  "enable": false,\n  "state": "RUNNING",\n  "pids": []\n }\n]'

test ouput

==================================================== 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 50 items                                                                                                           

api2/smb_and_cifs.py::test_01_setting_auxilary_parameters_for_mount_smbfs PASSED                                       [  2%]
api2/smb_and_cifs.py::test_02_creating_smb_dataset PASSED                                                              [  4%]
api2/smb_and_cifs.py::test_03_changing_permissions_on_smb_PATH PASSED                                                  [  6%]
api2/smb_and_cifs.py::test_04_starting_cifs_service_at_boot PASSED                                                     [  8%]
api2/smb_and_cifs.py::test_05_checking_to_see_if_clif_service_is_enabled_at_boot PASSED                                [ 10%]
api2/smb_and_cifs.py::test_06_starting_cifs_service PASSED                                                             [ 12%]
api2/smb_and_cifs.py::test_07_checking_to_see_if_nfs_service_is_running PASSED                                         [ 14%]
api2/smb_and_cifs.py::test_08_Creating_a_cifs_share_on_smb_PATH PASSED                                                 [ 16%]
api2/smb_and_cifs.py::test_09_creating_smb_mountpoint_on_bsd SKIPPED                                                   [ 18%]
api2/smb_and_cifs.py::test_10_mounting_smb_on_bsd SKIPPED                                                              [ 20%]
api2/smb_and_cifs.py::test_11_creating_smb_file_on_bsd SKIPPED                                                         [ 22%]
api2/smb_and_cifs.py::test_12_moving_smb_file_on_bsd SKIPPED                                                           [ 24%]
api2/smb_and_cifs.py::test_13_copying_smb_file_on_bsd SKIPPED                                                          [ 26%]
api2/smb_and_cifs.py::test_14_deleting_smb_file_1_2_on_bsd SKIPPED                                                     [ 28%]
api2/smb_and_cifs.py::test_15_deleting_smb_file_2_2_on_bsd SKIPPED                                                     [ 30%]
api2/smb_and_cifs.py::test_16_unmounting_smb_on_bsd SKIPPED                                                            [ 32%]
api2/smb_and_cifs.py::test_17_mounting_smb_on_bsd SKIPPED                                                              [ 34%]
api2/smb_and_cifs.py::test_18_creating_smb_file_on_bsd SKIPPED                                                         [ 36%]
api2/smb_and_cifs.py::test_19_moving_smb_file_on_bsd SKIPPED                                                           [ 38%]
api2/smb_and_cifs.py::test_20_copying_smb_file_on_bsd SKIPPED                                                          [ 40%]
api2/smb_and_cifs.py::test_21_deleting_smb_file_1_2_on_bsd SKIPPED                                                     [ 42%]
api2/smb_and_cifs.py::test_22_deleting_smb_file_2_2_on_bsd SKIPPED                                                     [ 44%]
api2/smb_and_cifs.py::test_23_unmounting_smb_on_bsd SKIPPED                                                            [ 46%]
api2/smb_and_cifs.py::test_24_removing_smb_mountpoint_on_bsd SKIPPED                                                   [ 48%]
api2/smb_and_cifs.py::test_25_stoping_clif_service PASSED                                                              [ 50%]
api2/smb_and_cifs.py::test_26_checking_if_cifs_is_stop PASSED                                                          [ 52%]
api2/smb_and_cifs.py::test_27_update_smb PASSED                                                                        [ 54%]
api2/smb_and_cifs.py::test_28_update_cifs_share PASSED                                                                 [ 56%]
api2/smb_and_cifs.py::test_29_starting_cifs_service PASSED                                                             [ 58%]
api2/smb_and_cifs.py::test_30_checking_to_see_if_nfs_service_is_running PASSED                                         [ 60%]
api2/smb_and_cifs.py::test_31_create_mount_point_for_smb_on_osx SKIPPED                                                [ 62%]
api2/smb_and_cifs.py::test_32_mount_smb_share_on_osx SKIPPED                                                           [ 64%]
api2/smb_and_cifs.py::test_33_create_file_on_smb_share_via_osx_to_test_permissions SKIPPED                             [ 66%]
api2/smb_and_cifs.py::test_34_moving_smb_test_file_into_a_new_directory_on_osx SKIPPED                                 [ 68%]
api2/smb_and_cifs.py::test_35_deleting_test_file_and_directory_from_smb_share_on_osx SKIPPED                           [ 70%]
api2/smb_and_cifs.py::test_36_verifying_test_file_directory_were_successfully_removed_on_osx SKIPPED                   [ 72%]
api2/smb_and_cifs.py::test_37_unmount_smb_share_on_osx SKIPPED                                                         [ 74%]
api2/smb_and_cifs.py::test_38_mount_smb_share_on_osx SKIPPED                                                           [ 76%]
api2/smb_and_cifs.py::test_39_create_file_on_smb_share_via_osx_to_test_permissions_on_osx SKIPPED                      [ 78%]
api2/smb_and_cifs.py::test_40_moving_smb_test_file_into_a_new_directory_on_osx SKIPPED                                 [ 80%]
api2/smb_and_cifs.py::test_41_deleting_test_file_and_directory_from_smb_share_on_osx SKIPPED                           [ 82%]
api2/smb_and_cifs.py::test_42_verifying_test_file_directory_were_successfully_removed_on_osx SKIPPED                   [ 84%]
api2/smb_and_cifs.py::test_43_Unmount_smb_share_on_osx SKIPPED                                                         [ 86%]
api2/smb_and_cifs.py::test_44_Removing_smb_mountpoint_on_osx SKIPPED                                                   [ 88%]
api2/smb_and_cifs.py::test_45_delete_cifs_share PASSED                                                                 [ 90%]
api2/smb_and_cifs.py::test_46_disable_cifs_service_at_boot PASSED                                                      [ 92%]
api2/smb_and_cifs.py::test_47_checking_to_see_if_clif_service_is_enabled_at_boot PASSED                                [ 94%]
api2/smb_and_cifs.py::test_48_stoping_clif_service PASSED                                                              [ 96%]
api2/smb_and_cifs.py::test_49_checking_if_cifs_is_stop FAILED                                                          [ 98%]
api2/smb_and_cifs.py::test_50_destroying_smb_dataset PASSED                                                            [100%]

--------- generated xml file: /usr/home/ericbsd/projects/freenas/freenas/tests/results/smb_and_cifs_tests_result.xml ---------
========================================================== FAILURES ==========================================================
______________________________________________ test_49_checking_if_cifs_is_stop ______________________________________________

    def test_49_checking_if_cifs_is_stop():
        results = GET("/service?service=cifs")
>       assert results.json()[0]['state'] == "STOPPED", results.text
E       AssertionError: [
E          {
E           "id": 4,
E           "service": "cifs",
E           "enable": false,
E           "state": "RUNNING",
E           "pids": []
E          }
E         ]
E       assert 'RUNNING' == 'STOPPED'
E         - RUNNING
E         + STOPPED

api2/smb_and_cifs.py:414: AssertionError
====================================== 1 failed, 19 passed, 30 skipped in 37.19 seconds ======================================

Associated revisions

Revision 517f562a (diff)
Added by William Grzybowski over 2 years ago

fix(smb): renaming and tests Ticket: #35038

Revision 6b8be627 (diff)
Added by William Grzybowski over 2 years ago

fix(smb): renaming and tests Ticket: #35038

Revision 78459b16 (diff)
Added by William Grzybowski about 2 years ago

fix(smb): renaming and tests Ticket: #35038

History

#1 Updated by Dru Lavigne over 2 years ago

  • Assignee changed from Release Council to William Grzybowski

#2 Updated by Eric Turgeon over 2 years ago

I have also try curl


 /u/h/ericbsd  curl -L -u root:testing  http://192.168.2.223/api/v2.0/service/\?service\=cifs
[
 {
  "id": 4,
  "service": "cifs",
  "enable": false,
  "state": "RUNNING",
  "pids": []
 }
]                                                                               

/u/h/ericbsd  curl -L -u root:testing  http://192.168.2.223/api/v2.0/service/stop/ -d '{"service": "cifs", "onetime": true}'
true

/u/h/ericbsd  curl -L -u root:testing  http://192.168.2.223/api/v2.0/service/\?service\=cifs
[
 {
  "id": 4,
  "service": "cifs",
  "enable": false,
  "state": "RUNNING",
  "pids": []
 }
]                                 

#3 Updated by William Grzybowski over 2 years ago

  • Status changed from Unscreened to In Progress
  • Target version changed from Backlog to 11.2-BETA1
  • Severity changed from New to Medium

#4 Updated by William Grzybowski over 2 years ago

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

#5 Updated by Eric Turgeon over 2 years ago

  • Needs QA changed from Yes to No

It is fix.

#6 Updated by Dru Lavigne over 2 years ago

  • Subject changed from REST API 2.0 post /service/stop/ failed to stop cifs with out error but returning true instead of false. to Rename cifs to smb in REST API
  • Status changed from Ready for Testing to Done

Also available in: Atom PDF