Invalid field for 'command'

Bug #1797285 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun UI
Fix Released
Undecided
hongbin

Bug Description

Use latest version of zun and zun-ui. Specify the 'command' field on creating container. The UI showed it failed to create the container. The following error in the horizon log:

2018-10-11 02:39:31.349242 ERROR openstack_dashboard.api.rest.utils error invoking apiclient
2018-10-11 02:39:31.349258 Traceback (most recent call last):
2018-10-11 02:39:31.349261 File "/opt/stack/horizon/openstack_dashboard/api/rest/utils.py", line 127, in _wrapped
2018-10-11 02:39:31.349264 data = function(self, request, *args, **kw)
2018-10-11 02:39:31.349266 File "/opt/stack/zun-ui/zun_ui/api/rest_api.py", line 144, in post
2018-10-11 02:39:31.349269 new_container = client.container_create(request, **request.DATA)
2018-10-11 02:39:31.349271 File "/opt/stack/zun-ui/zun_ui/api/client.py", line 152, in container_create
2018-10-11 02:39:31.349274 response = zunclient(request).containers.run(**args)
2018-10-11 02:39:31.349276 File "/opt/stack/python-zunclient/zunclient/v1/containers.py", line 187, in run
2018-10-11 02:39:31.349279 return self._create(self._path() + '?run=true', kwargs)
2018-10-11 02:39:31.349281 File "/opt/stack/python-zunclient/zunclient/common/base.py", line 52, in _create
2018-10-11 02:39:31.349283 resp, body = self.api.json_request('POST', url, body=body)
2018-10-11 02:39:31.349286 File "/opt/stack/python-zunclient/zunclient/common/httpclient.py", line 367, in json_request
2018-10-11 02:39:31.349288 resp = self._http_request(url, method, **kwargs)
2018-10-11 02:39:31.349291 File "/opt/stack/python-zunclient/zunclient/common/httpclient.py", line 350, in _http_request
2018-10-11 02:39:31.349293 error_json.get('debuginfo'), method, url)
2018-10-11 02:39:31.349296 BadRequest: Invalid input for field 'command'.Value: 'sleep 1000'. u'sleep 1000' is not of type 'array', 'null'
2018-10-11 02:39:31.349298
2018-10-11 02:39:31.349301 Failed validating 'type' in schema['properties']['command']:
2018-10-11 02:39:31.349303 {'type': ['array', 'null']}
2018-10-11 02:39:31.349305
2018-10-11 02:39:31.349307 On instance:
2018-10-11 02:39:31.349310 u'sleep 1000' (HTTP 400) (Request-ID: req-fd24512e-9693-4a83-b97b-f36a980e681d)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun-ui (master)

Fix proposed to branch: master
Review: https://review.openstack.org/609580

Changed in zun-ui:
assignee: nobody → hongbin (hongbin034)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zun-ui (master)

Reviewed: https://review.openstack.org/609580
Committed: https://git.openstack.org/cgit/openstack/zun-ui/commit/?id=4f3be81f4cd30f73eac66924d3aaf87f5ca30bcd
Submitter: Zuul
Branch: master

commit 4f3be81f4cd30f73eac66924d3aaf87f5ca30bcd
Author: Hongbin Lu <email address hidden>
Date: Thu Oct 11 03:17:00 2018 +0000

    Split command into list

    The 'command' parameter has changed from string to list [1].
    This patch updates the UI to catch this up.

    [1] https://review.openstack.org/#/c/580990/

    Change-Id: I60bdd84c22ba14e0646593a9747c5251e0dd46ff
    Closes-Bug: #1797285

Changed in zun-ui:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun-ui (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/631556

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zun-ui (stable/rocky)

Reviewed: https://review.openstack.org/631556
Committed: https://git.openstack.org/cgit/openstack/zun-ui/commit/?id=f4a7b41ccc5b905683de8d00f662d28c508e0b40
Submitter: Zuul
Branch: stable/rocky

commit f4a7b41ccc5b905683de8d00f662d28c508e0b40
Author: Hongbin Lu <email address hidden>
Date: Thu Oct 11 03:17:00 2018 +0000

    Split command into list

    The 'command' parameter has changed from string to list [1].
    This patch updates the UI to catch this up.

    [1] https://review.openstack.org/#/c/580990/

    Change-Id: I60bdd84c22ba14e0646593a9747c5251e0dd46ff
    Partial-Bug: #1811791
    Closes-Bug: #1797285
    (cherry picked from commit 4f3be81f4cd30f73eac66924d3aaf87f5ca30bcd)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/zun-ui 3.0.0

This issue was fixed in the openstack/zun-ui 3.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/zun-ui rocky-eol

This issue was fixed in the openstack/zun-ui rocky-eol release.

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.