Zun

zun cli - Requested microversion is unsupported

Bug #1715808 reported by cooldharma06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Invalid
Undecided
Unassigned

Bug Description

In current zun facing following errror:

Requested microversion is unsupported

zun --debug list

DEBUG (session:372) REQ: curl -g -i -X POST http://172.16.69.115/container/v1/containers -H "OpenStack-API-Version: container 1.7" -H "X-Auth-Token: {SHA1}4ed52a2120c982bbd0c8f086ac53a2305ed6bb78" -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: None" -d '{"auto_remove": false, "name": "cir4", "image": "cir:xyz", "labels": {}, "environment": {}, "command": "\"--debug\"", "image_driver": "glance", "nets": [], "hints": {}}'
DEBUG (connectionpool:243) Resetting dropped connection: 172.16.69.115
DEBUG (connectionpool:396) http://172.16.69.115:80 "POST /container/v1/containers HTTP/1.1" 406 281
DEBUG (session:419) RESP: [406] Date: Fri, 08 Sep 2017 05:52:04 GMT Server: Apache/2.4.18 (Ubuntu) OpenStack-API-Minimum-Version: container 1.1 OpenStack-API-Maximum-Version: container 1.6 OpenStack-API-Version: container 1.7 vary: OpenStack-API-Version Content-Type: application/json Content-Length: 281 x-openstack-request-id: req-b11500c0-dcec-4fef-9467-c2a31a1c5ddb Connection: close
RESP BODY: {"errors": [{"status": 406, "code": "", "links": [], "title": "Requested microversion is unsupported", "detail": "Version 1.7 was requested but the minor version is not supported by this service. The supported version range is: [container 1.1, container 1.6].", "request_id": ""}]}

DEBUG (session:722) POST call to container for http://172.16.69.115/container/v1/containers used request id req-b11500c0-dcec-4fef-9467-c2a31a1c5ddb
DEBUG (shell:698) Requested microversion is unsupported (HTTP 406) (Request-ID: req-b11500c0-dcec-4fef-9467-c2a31a1c5ddb)
Traceback (most recent call last):
  File "/opt/stack/python-zunclient/zunclient/shell.py", line 696, in main
    map(encodeutils.safe_decode, sys.argv[1:]))
  File "/opt/stack/python-zunclient/zunclient/shell.py", line 632, in main
    args.func(self.cs, args)
  File "/opt/stack/python-zunclient/zunclient/v1/containers_shell.py", line 140, in do_create
    _show_container(cs.containers.create(**opts))
  File "/opt/stack/python-zunclient/zunclient/v1/containers.py", line 108, in create
    return self._create(self._path(), new)
  File "/opt/stack/python-zunclient/zunclient/common/base.py", line 52, in _create
    resp, body = self.api.json_request('POST', url, body=body)
  File "/opt/stack/python-zunclient/zunclient/common/httpclient.py", line 368, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "/opt/stack/python-zunclient/zunclient/common/httpclient.py", line 351, in _http_request
    error_json.get('debuginfo'), method, url)
NotAcceptable: Requested microversion is unsupported (HTTP 406) (Request-ID: req-b11500c0-dcec-4fef-9467-c2a31a1c5ddb)
ERROR: Requested microversion is unsupported (HTTP 406) (Request-ID: req-b11500c0-dcec-4fef-9467-c2a31a1c5ddb)

summary: - Requested microversion is unsupported
+ zun cli - Requested microversion is unsupported
Changed in zun:
assignee: nobody → cooldharma06 (cooldharma06)
Changed in zun:
assignee: cooldharma06 (cooldharma06) → nobody
Revision history for this message
hongbin (hongbin034) wrote :

The error is caused by using a newer version of python-zunclient with older version of Zun server. I guess the error will disappear by pulling down the latest version of Zun server. In particular, make sure your Zun server have this commit: https://github.com/openstack/zun/commit/b6a8b36b1d6ca2b7642c5d5a5c5435017f40e8b7 .

Changed in zun:
status: New → Incomplete
status: Incomplete → Invalid
Revision history for this message
cooldharma06 (cooldharma06) wrote :

Hi @hongbin i am using master devstack and zun branch; tried twice still facing the same error.

i checked in /opt/stack/zun - git log and its synced with master branch. Also i am able to see the mentioned patch @ e8281c6 Merge "Disallow non-admin users to force delete containers":

______________
# git log
commit 32e299e17e89449f91fee70ac105d7dc06bca2e7
Merge: 9a7d7bf 0e3a181
Author: Jenkins <email address hidden>
Date: Mon Sep 11 02:27:36 2017 +0000

    Merge "Add db model for pci device"

commit 9a7d7bfb398675822705340bea611111ebad7477
Author: junboli <email address hidden>
Date: Fri Sep 8 18:02:14 2017 +0800

    TrivialFix: ignore directory doc/source/_static

    When build the docs, the directory doc/source/_static will be
    generated, therefore, add this will ignore the directory stuff
    at everyone commit

    Change-Id: I8ee2b16f6f4fafcb63ce64471e7a3c255637faf7
_____________

kindly, tell some other suggestions

Changed in zun:
status: Invalid → Opinion
Revision history for this message
Shunli Zhou (shunliz) wrote :

The response show the server support 1.1 and 1.6 indicate that your server has patch @ e8281c6. The client request 1.7 version, and the server have both [1.1, 1.6] api version and 1.7 version for container delete.

There are two points for me that seems not correct:
1, Seems the code still goes to the [1.1,1.6] version check, but it's expected to check the 1.7 version.
2, zun list should not check the delete api version.

Sorry, that i'm also have no idea what's the problem. Since the api version check for a specific function has enabled the recently, seems there still not work correctly.

@hongbin,I thought this https://review.openstack.org/#/c/499011/ will fix this problem, seems it's not. Seems the api version check in one controller for different function with different version still has some problem.

Revision history for this message
hongbin (hongbin034) wrote :

Hi cooldharma06,

Could you restart the server and try again: sudo systemctl restart devstack@zun*

Changed in zun:
status: Opinion → Confirmed
Revision history for this message
hongbin (hongbin034) wrote :

Shunli,

For your comment (@hongbin,I thought this https://review.openstack.org/#/c/499011/ will fix this problem, seems it's not. Seems the api version check in one controller for different function with different version still has some problem.) , could you elaborate how to reproduce the problem. I will write some unit tests to verify it.

Revision history for this message
cooldharma06 (cooldharma06) wrote :

hi @hongbin, @shunli

i reinstalled devstack+zun today and now its working fine. i think we can close this ticket.

hongbin (hongbin034)
Changed in zun:
status: Confirmed → Invalid
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.