share-server-manage command with "--wait" is broken

Bug #1982428 reported by Goutham Pacha Ravi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-manilaclient
In Progress
Undecided
Unassigned

Bug Description

The API request seems to succeed but the command's parsing is broken:

$ manila --debug share-server-manage zorilla-cephadm@alpha 7a292d88-6ad6-4b6d-a86f-12115bcfbb31 jhsg-jhfh-hghnn --driver-options x=y y=z --share-network-subnet a74ba45b-2094-4574-937d-dd956d08b0ee --wait

<snip>

REQ: curl -i -X POST http://100.0.110.14/share/v2/share-servers/manage -H "X-Auth-Token: gAAAAABi2IFYi6c0JIj3CvWR0YEkPUtiv8hkriemenvCJMXki2O71_7-Nbr-BQ7_XsXYFh_XdXqqeLzAeaVWr3MjpMmGhEbTZWSJMXG-5ZrL2wzmERlHYMhCL1znm3GJ9j1667_ohK2W6VPbn8C9zQXF1psTV6UYnO9FayN04WRoTvx3GjU-eqY" -H "X-Openstack-Manila-Api-Version: 2.69" -H "User-Agent: python-manilaclient" -H "Accept: application/json" -H "Content-Type: application/json" -d '{"share_server": {"host": "zorilla-cephadm@alpha", "share_network_id": "7a292d88-6ad6-4b6d-a86f-12115bcfbb31", "identifier": "jhsg-jhfh-hghnn", "share_network_subnet_id": "a74ba45b-2094-4574-937d-dd956d08b0ee", "driver_options": {"x": "y", "y": "z"}}}'

DEBUG (httpclient:209)
REQ: curl -i -X POST http://100.0.110.14/share/v2/share-servers/manage -H "X-Auth-Token: gAAAAABi2IFYi6c0JIj3CvWR0YEkPUtiv8hkriemenvCJMXki2O71_7-Nbr-BQ7_XsXYFh_XdXqqeLzAeaVWr3MjpMmGhEbTZWSJMXG-5ZrL2wzmERlHYMhCL1znm3GJ9j1667_ohK2W6VPbn8C9zQXF1psTV6UYnO9FayN04WRoTvx3GjU-eqY" -H "X-Openstack-Manila-Api-Version: 2.69" -H "User-Agent: python-manilaclient" -H "Accept: application/json" -H "Content-Type: application/json" -d '{"share_server": {"host": "zorilla-cephadm@alpha", "share_network_id": "7a292d88-6ad6-4b6d-a86f-12115bcfbb31", "identifier": "jhsg-jhfh-hghnn", "share_network_subnet_id": "a74ba45b-2094-4574-937d-dd956d08b0ee", "driver_options": {"x": "y", "y": "z"}}}'

DEBUG (connectionpool:228) Starting new HTTP connection (1): 100.0.110.14:80
DEBUG (connectionpool:456) http://100.0.110.14:80 "POST /share/v2/share-servers/manage HTTP/1.1" 202 575
RESP: [202] {'Date': 'Wed, 20 Jul 2022 22:27:36 GMT', 'Server': 'Apache/2.4.41 (Ubuntu)', 'Content-Type': 'application/json', 'Content-Length': '575', 'x-compute-request-id': 'req-170678be-2716-441b-b9ce-e4433f0f6f1b', 'X-OpenStack-Manila-API-Version': '2.69', 'Vary': 'X-OpenStack-Manila-API-Version', 'Connection': 'close'}
RESP BODY: {"share_server": {"id": "ba47a0e7-62e8-4f08-8115-280f1e3b1b6e", "project_id": "791b6c7af2b64ba5a5274c9dc39f9358", "updated_at": null, "status": "manage_starting", "host": "zorilla-cephadm@alpha", "share_network_name": "test", "share_network_id": "7a292d88-6ad6-4b6d-a86f-12115bcfbb31", "created_at": "2022-07-20T22:27:36.986606", "backend_details": {}, "is_auto_deletable": false, "identifier": "jhsg-jhfh-hghnn", "share_network_subnet_id": "a74ba45b-2094-4574-937d-dd956d08b0ee", "task_state": null, "source_share_server_id": null, "security_service_update_support": false}}

DEBUG (httpclient:214) RESP: [202] {'Date': 'Wed, 20 Jul 2022 22:27:36 GMT', 'Server': 'Apache/2.4.41 (Ubuntu)', 'Content-Type': 'application/json', 'Content-Length': '575', 'x-compute-request-id': 'req-170678be-2716-441b-b9ce-e4433f0f6f1b', 'X-OpenStack-Manila-API-Version': '2.69', 'Vary': 'X-OpenStack-Manila-API-Version', 'Connection': 'close'}
RESP BODY: {"share_server": {"id": "ba47a0e7-62e8-4f08-8115-280f1e3b1b6e", "project_id": "791b6c7af2b64ba5a5274c9dc39f9358", "updated_at": null, "status": "manage_starting", "host": "zorilla-cephadm@alpha", "share_network_name": "test", "share_network_id": "7a292d88-6ad6-4b6d-a86f-12115bcfbb31", "created_at": "2022-07-20T22:27:36.986606", "backend_details": {}, "is_auto_deletable": false, "identifier": "jhsg-jhfh-hghnn", "share_network_subnet_id": "a74ba45b-2094-4574-937d-dd956d08b0ee", "task_state": null, "source_share_server_id": null, "security_service_update_support": false}}

REQ: curl -i -X GET http://100.0.110.14/share/v2/share-servers/ba47a0e7-62e8-4f08-8115-280f1e3b1b6e -H "X-Auth-Token: gAAAAABi2IFYi6c0JIj3CvWR0YEkPUtiv8hkriemenvCJMXki2O71_7-Nbr-BQ7_XsXYFh_XdXqqeLzAeaVWr3MjpMmGhEbTZWSJMXG-5ZrL2wzmERlHYMhCL1znm3GJ9j1667_ohK2W6VPbn8C9zQXF1psTV6UYnO9FayN04WRoTvx3GjU-eqY" -H "X-Openstack-Manila-Api-Version: 2.69" -H "User-Agent: python-manilaclient" -H "Accept: application/json"

DEBUG (httpclient:209)
REQ: curl -i -X GET http://100.0.110.14/share/v2/share-servers/ba47a0e7-62e8-4f08-8115-280f1e3b1b6e -H "X-Auth-Token: gAAAAABi2IFYi6c0JIj3CvWR0YEkPUtiv8hkriemenvCJMXki2O71_7-Nbr-BQ7_XsXYFh_XdXqqeLzAeaVWr3MjpMmGhEbTZWSJMXG-5ZrL2wzmERlHYMhCL1znm3GJ9j1667_ohK2W6VPbn8C9zQXF1psTV6UYnO9FayN04WRoTvx3GjU-eqY" -H "X-Openstack-Manila-Api-Version: 2.69" -H "User-Agent: python-manilaclient" -H "Accept: application/json"

DEBUG (connectionpool:228) Starting new HTTP connection (1): 100.0.110.14:80
DEBUG (connectionpool:456) http://100.0.110.14:80 "GET /share/v2/share-servers/ba47a0e7-62e8-4f08-8115-280f1e3b1b6e HTTP/1.1" 200 575
RESP: [200] {'Date': 'Wed, 20 Jul 2022 22:27:37 GMT', 'Server': 'Apache/2.4.41 (Ubuntu)', 'Content-Type': 'application/json', 'Content-Length': '575', 'x-compute-request-id': 'req-008813ca-37d1-467a-afd8-7536fcf365af', 'X-OpenStack-Manila-API-Version': '2.69', 'Vary': 'X-OpenStack-Manila-API-Version', 'Connection': 'close'}
RESP BODY: {"share_server": {"id": "ba47a0e7-62e8-4f08-8115-280f1e3b1b6e", "project_id": "791b6c7af2b64ba5a5274c9dc39f9358", "updated_at": null, "status": "manage_starting", "host": "zorilla-cephadm@alpha", "share_network_name": "test", "share_network_id": "7a292d88-6ad6-4b6d-a86f-12115bcfbb31", "created_at": "2022-07-20T22:27:36.986606", "backend_details": {}, "is_auto_deletable": false, "identifier": "jhsg-jhfh-hghnn", "share_network_subnet_id": "a74ba45b-2094-4574-937d-dd956d08b0ee", "task_state": null, "source_share_server_id": null, "security_service_update_support": false}}

DEBUG (httpclient:214) RESP: [200] {'Date': 'Wed, 20 Jul 2022 22:27:37 GMT', 'Server': 'Apache/2.4.41 (Ubuntu)', 'Content-Type': 'application/json', 'Content-Length': '575', 'x-compute-request-id': 'req-008813ca-37d1-467a-afd8-7536fcf365af', 'X-OpenStack-Manila-API-Version': '2.69', 'Vary': 'X-OpenStack-Manila-API-Version', 'Connection': 'close'}
RESP BODY: {"share_server": {"id": "ba47a0e7-62e8-4f08-8115-280f1e3b1b6e", "project_id": "791b6c7af2b64ba5a5274c9dc39f9358", "updated_at": null, "status": "manage_starting", "host": "zorilla-cephadm@alpha", "share_network_name": "test", "share_network_id": "7a292d88-6ad6-4b6d-a86f-12115bcfbb31", "created_at": "2022-07-20T22:27:36.986606", "backend_details": {}, "is_auto_deletable": false, "identifier": "jhsg-jhfh-hghnn", "share_network_subnet_id": "a74ba45b-2094-4574-937d-dd956d08b0ee", "task_state": null, "source_share_server_id": null, "security_service_update_support": false}}

REQ: curl -i -X GET http://100.0.110.14/share/v2/share-servers/ba47a0e7-62e8-4f08-8115-280f1e3b1b6e -H "X-Auth-Token: gAAAAABi2IFYi6c0JIj3CvWR0YEkPUtiv8hkriemenvCJMXki2O71_7-Nbr-BQ7_XsXYFh_XdXqqeLzAeaVWr3MjpMmGhEbTZWSJMXG-5ZrL2wzmERlHYMhCL1znm3GJ9j1667_ohK2W6VPbn8C9zQXF1psTV6UYnO9FayN04WRoTvx3GjU-eqY" -H "X-Openstack-Manila-Api-Version: 2.69" -H "User-Agent: python-manilaclient" -H "Accept: application/json"

DEBUG (httpclient:209)
REQ: curl -i -X GET http://100.0.110.14/share/v2/share-servers/ba47a0e7-62e8-4f08-8115-280f1e3b1b6e -H "X-Auth-Token: gAAAAABi2IFYi6c0JIj3CvWR0YEkPUtiv8hkriemenvCJMXki2O71_7-Nbr-BQ7_XsXYFh_XdXqqeLzAeaVWr3MjpMmGhEbTZWSJMXG-5ZrL2wzmERlHYMhCL1znm3GJ9j1667_ohK2W6VPbn8C9zQXF1psTV6UYnO9FayN04WRoTvx3GjU-eqY" -H "X-Openstack-Manila-Api-Version: 2.69" -H "User-Agent: python-manilaclient" -H "Accept: application/json"

DEBUG (connectionpool:228) Starting new HTTP connection (1): 100.0.110.14:80
DEBUG (connectionpool:456) http://100.0.110.14:80 "GET /share/v2/share-servers/ba47a0e7-62e8-4f08-8115-280f1e3b1b6e HTTP/1.1" 200 575
RESP: [200] {'Date': 'Wed, 20 Jul 2022 22:27:39 GMT', 'Server': 'Apache/2.4.41 (Ubuntu)', 'Content-Type': 'application/json', 'Content-Length': '575', 'x-compute-request-id': 'req-d3cd2848-edc7-4ee2-a914-81e6ccc35924', 'X-OpenStack-Manila-API-Version': '2.69', 'Vary': 'X-OpenStack-Manila-API-Version', 'Connection': 'close'}
RESP BODY: {"share_server": {"id": "ba47a0e7-62e8-4f08-8115-280f1e3b1b6e", "project_id": "791b6c7af2b64ba5a5274c9dc39f9358", "updated_at": null, "status": "manage_starting", "host": "zorilla-cephadm@alpha", "share_network_name": "test", "share_network_id": "7a292d88-6ad6-4b6d-a86f-12115bcfbb31", "created_at": "2022-07-20T22:27:36.986606", "backend_details": {}, "is_auto_deletable": false, "identifier": "jhsg-jhfh-hghnn", "share_network_subnet_id": "a74ba45b-2094-4574-937d-dd956d08b0ee", "task_state": null, "source_share_server_id": null, "security_service_update_support": false}}

DEBUG (httpclient:214) RESP: [200] {'Date': 'Wed, 20 Jul 2022 22:27:39 GMT', 'Server': 'Apache/2.4.41 (Ubuntu)', 'Content-Type': 'application/json', 'Content-Length': '575', 'x-compute-request-id': 'req-d3cd2848-edc7-4ee2-a914-81e6ccc35924', 'X-OpenStack-Manila-API-Version': '2.69', 'Vary': 'X-OpenStack-Manila-API-Version', 'Connection': 'close'}
RESP BODY: {"share_server": {"id": "ba47a0e7-62e8-4f08-8115-280f1e3b1b6e", "project_id": "791b6c7af2b64ba5a5274c9dc39f9358", "updated_at": null, "status": "manage_starting", "host": "zorilla-cephadm@alpha", "share_network_name": "test", "share_network_id": "7a292d88-6ad6-4b6d-a86f-12115bcfbb31", "created_at": "2022-07-20T22:27:36.986606", "backend_details": {}, "is_auto_deletable": false, "identifier": "jhsg-jhfh-hghnn", "share_network_subnet_id": "a74ba45b-2094-4574-937d-dd956d08b0ee", "task_state": null, "source_share_server_id": null, "security_service_update_support": false}}

REQ: curl -i -X GET http://100.0.110.14/share/v2/share-servers/ba47a0e7-62e8-4f08-8115-280f1e3b1b6e -H "X-Auth-Token: gAAAAABi2IFYi6c0JIj3CvWR0YEkPUtiv8hkriemenvCJMXki2O71_7-Nbr-BQ7_XsXYFh_XdXqqeLzAeaVWr3MjpMmGhEbTZWSJMXG-5ZrL2wzmERlHYMhCL1znm3GJ9j1667_ohK2W6VPbn8C9zQXF1psTV6UYnO9FayN04WRoTvx3GjU-eqY" -H "X-Openstack-Manila-Api-Version: 2.69" -H "User-Agent: python-manilaclient" -H "Accept: application/json"

DEBUG (httpclient:209)
REQ: curl -i -X GET http://100.0.110.14/share/v2/share-servers/ba47a0e7-62e8-4f08-8115-280f1e3b1b6e -H "X-Auth-Token: gAAAAABi2IFYi6c0JIj3CvWR0YEkPUtiv8hkriemenvCJMXki2O71_7-Nbr-BQ7_XsXYFh_XdXqqeLzAeaVWr3MjpMmGhEbTZWSJMXG-5ZrL2wzmERlHYMhCL1znm3GJ9j1667_ohK2W6VPbn8C9zQXF1psTV6UYnO9FayN04WRoTvx3GjU-eqY" -H "X-Openstack-Manila-Api-Version: 2.69" -H "User-Agent: python-manilaclient" -H "Accept: application/json"

DEBUG (connectionpool:228) Starting new HTTP connection (1): 100.0.110.14:80
DEBUG (connectionpool:456) http://100.0.110.14:80 "GET /share/v2/share-servers/ba47a0e7-62e8-4f08-8115-280f1e3b1b6e HTTP/1.1" 200 596
RESP: [200] {'Date': 'Wed, 20 Jul 2022 22:27:41 GMT', 'Server': 'Apache/2.4.41 (Ubuntu)', 'Content-Type': 'application/json', 'Content-Length': '596', 'x-compute-request-id': 'req-7cbe7306-911b-41c7-bde2-620012973443', 'X-OpenStack-Manila-API-Version': '2.69', 'Vary': 'X-OpenStack-Manila-API-Version', 'Connection': 'close'}
RESP BODY: {"share_server": {"id": "ba47a0e7-62e8-4f08-8115-280f1e3b1b6e", "project_id": "791b6c7af2b64ba5a5274c9dc39f9358", "updated_at": "2022-07-20T22:27:39.139102", "status": "manage_error", "host": "zorilla-cephadm@alpha", "share_network_name": "test", "share_network_id": "7a292d88-6ad6-4b6d-a86f-12115bcfbb31", "created_at": "2022-07-20T22:27:36.986606", "backend_details": {}, "is_auto_deletable": false, "identifier": "jhsg-jhfh-hghnn", "share_network_subnet_id": "a74ba45b-2094-4574-937d-dd956d08b0ee", "task_state": null, "source_share_server_id": null, "security_service_update_support": false}}

DEBUG (httpclient:214) RESP: [200] {'Date': 'Wed, 20 Jul 2022 22:27:41 GMT', 'Server': 'Apache/2.4.41 (Ubuntu)', 'Content-Type': 'application/json', 'Content-Length': '596', 'x-compute-request-id': 'req-7cbe7306-911b-41c7-bde2-620012973443', 'X-OpenStack-Manila-API-Version': '2.69', 'Vary': 'X-OpenStack-Manila-API-Version', 'Connection': 'close'}
RESP BODY: {"share_server": {"id": "ba47a0e7-62e8-4f08-8115-280f1e3b1b6e", "project_id": "791b6c7af2b64ba5a5274c9dc39f9358", "updated_at": "2022-07-20T22:27:39.139102", "status": "manage_error", "host": "zorilla-cephadm@alpha", "share_network_name": "test", "share_network_id": "7a292d88-6ad6-4b6d-a86f-12115bcfbb31", "created_at": "2022-07-20T22:27:36.986606", "backend_details": {}, "is_auto_deletable": false, "identifier": "jhsg-jhfh-hghnn", "share_network_subnet_id": "a74ba45b-2094-4574-937d-dd956d08b0ee", "task_state": null, "source_share_server_id": null, "security_service_update_support": false}}

DEBUG (shell:739) 'share_server'
Traceback (most recent call last):
  File "/opt/stack/python-manilaclient/manilaclient/shell.py", line 734, in main
    OpenStackManilaShell().main(sys.argv[1:])
  File "/opt/stack/python-manilaclient/manilaclient/shell.py", line 601, in main
    args.func(self.cs, args)
  File "/opt/stack/python-manilaclient/manilaclient/api_versions.py", line 399, in substitution
    return method.func(obj, *args, **kwargs)
  File "/opt/stack/python-manilaclient/manilaclient/v2/shell.py", line 1645, in do_share_server_manage
    _wait_for_resource_status(
  File "/opt/stack/python-manilaclient/manilaclient/v2/shell.py", line 114, in _wait_for_resource_status
    print_resource[resource_type](cs, resource)
KeyError: 'share_server'
ERROR: 'share_server'

summary: - share-server-manage command is broken
+ share-server-manage command with "--wait" is broken
Changed in python-manilaclient:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.