Zun

Failed to update container

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

Bug Description

Reproducing steps:

$ CONTAINER_ID=$(openstack appcontainer run -c uuid -f value nginx)
$ openstack appcontainer set --memory 100 $CONTAINER_ID
Internal Server Error (HTTP 500) (Request-ID: req-9cfb7677-e6e5-4db6-97d3-0c8a2b5350c0)

Here is the logs:

4fda1c0f-0ba2-48a0-bf11-908931bafd4c:unsupported operand type(s) for -: 'unicode' and 'unicode': TypeError: unsupported operand type(s) for -: 'unicode' and 'unicode'
Sep 21 02:09:12 ip-172-31-1-38 <email address hidden>[22365]: 2018-09-21 02:09:12.825 22370 ERROR zun.common.exception Traceback (most recent call last):
Sep 21 02:09:12 ip-172-31-1-38 <email address hidden>[22365]: 2018-09-21 02:09:12.825 22370 ERROR zun.common.exception File "/opt/stack/zun/zun/common/exception.py", line 110, in wrapped
Sep 21 02:09:12 ip-172-31-1-38 <email address hidden>[22365]: 2018-09-21 02:09:12.825 22370 ERROR zun.common.exception return func(*args, **kwargs)
Sep 21 02:09:12 ip-172-31-1-38 <email address hidden>[22365]: 2018-09-21 02:09:12.825 22370 ERROR zun.common.exception File "/opt/stack/zun/zun/api/validation/__init__.py", line 33, in wrapper
Sep 21 02:09:12 ip-172-31-1-38 <email address hidden>[22365]: 2018-09-21 02:09:12.825 22370 ERROR zun.common.exception return func(*args, **kwargs)
Sep 21 02:09:12 ip-172-31-1-38 <email address hidden>[22365]: 2018-09-21 02:09:12.825 22370 ERROR zun.common.exception File "/opt/stack/zun/zun/api/controllers/v1/containers.py", line 689, in patch
Sep 21 02:09:12 ip-172-31-1-38 <email address hidden>[22365]: 2018-09-21 02:09:12.825 22370 ERROR zun.common.exception container_deltas['memory'] = patch['memory'] - container.memory
Sep 21 02:09:12 ip-172-31-1-38 <email address hidden>[22365]: 2018-09-21 02:09:12.825 22370 ERROR zun.common.exception TypeError: unsupported operand type(s) for -: 'unicode' and 'unicode'

hongbin (hongbin034)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun (master)

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

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

Reviewed: https://review.openstack.org/604247
Committed: https://git.openstack.org/cgit/openstack/zun/commit/?id=78d56ee8f853403523acf7552eac7e119b962e69
Submitter: Zuul
Branch: master

commit 78d56ee8f853403523acf7552eac7e119b962e69
Author: Hongbin Lu <email address hidden>
Date: Fri Sep 21 02:29:54 2018 +0000

    Fix an issue on container update

    Convert memory from string to int before doing the substraction.

    Change-Id: I8056c74c1d22dcdba2da858ed4a8784a9a3b0685
    Closes-Bug: #1793625

Changed in zun:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/zun 3.0.0.0rc1

This issue was fixed in the openstack/zun 3.0.0.0rc1 release candidate.

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.