Zun

The --mount options didn't work in stable/queens

Bug #1747282 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Fix Committed
Critical
hongbin

Bug Description

Use 'stable/queens' version python-zunclient with latest version of zun server, the --mount option doesn't work.

  $ cd /opt/stack/python-zunclient
  $ git checkout stable/queens
  $ zun run --mount size=1,destination=/data nginx
  ERROR: Invalid input for field '0'.Value: '{u'source': u'', u'destination': u'/data', u'size': u'1'}'. {u'source': u'', u'destination': u'/data', u'size': u'1'} is valid under each of {'required': ['size', 'destination']}, {'required': ['source', 'destination']}

  Failed validating 'oneOf' in schema['properties']['mounts']['items']:
    {'additionalProperties': False,
     'oneOf': [{'required': ['source', 'destination']},
               {'required': ['size', 'destination']}],
     'properties': {'destination': {'type': ['string']},
                    'size': {'type': ['string', 'integer']},
                    'source': {'type': ['string']}},
     'type': 'object'}

  On instance['mounts']:
    {u'destination': u'/data', u'size': u'1', u'source': u''} (HTTP 400)
  (Request-ID: req-a1cae2e4-4d97-4b34-bb4d-627d7ece376f)

hongbin (hongbin034)
Changed in zun:
importance: Undecided → Critical
assignee: nobody → hongbin (hongbin034)
status: New → Triaged
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/540678

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

Reviewed: https://review.openstack.org/540678
Committed: https://git.openstack.org/cgit/openstack/zun/commit/?id=0124bcf77333d85c4c937b3dca565e4e6902f4a8
Submitter: Zuul
Branch: master

commit 0124bcf77333d85c4c937b3dca565e4e6902f4a8
Author: Hongbin Lu <email address hidden>
Date: Sun Feb 4 19:17:48 2018 +0000

    Temporarily relax validation of 'mounts'

    We currently restrict the 'mounts' parameter to be one of the
    following forms:
    1. {'source': xxx, 'destination': xxx}
    2. {'size': xxx, 'destination': xxx}

    However, the python-zunclient sends the following:
    i. {'source': xxx, 'destination': xxx, 'size': ''}
    ii. {'size': xxx, 'destination': xxx, 'source': ''}

    Either i and ii is considered to be invalid because it matches
    both #1 and #2. However, the valid request should matches either
    The long term fix is to make the python-zunclient stop sending
    empty string to server.

    Change-Id: Id8ffc5d783923c2783565b6d019b250feae2031d
    Partial-Bug: #1747282

hongbin (hongbin034)
Changed in zun:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-zunclient 1.4.0

This issue was fixed in the openstack/python-zunclient 1.4.0 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.