bay-create failure without "name"

Bug #1506314 reported by Shu Muto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Low
yuanying

Bug Description

currently magnum allow to create without name.
but it's failed with below error.

TypeError: value argument must be a text type.
Traceback (most recent call last):

  File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
    executor_callback))

  File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
    executor_callback)

  File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
    result = func(ctxt, **new_args)

  File "/opt/stack/magnum/magnum/conductor/handlers/bay_conductor.py", line 127, in bay_create
    cert_manager.generate_certificates_to_bay(bay)

  File "/opt/stack/magnum/magnum/conductor/handlers/common/cert_manager.py", line 84, in generate_certificates_to_bay
    ca_cert_ref, ca_cert, ca_password = _generate_ca_cert(issuer_name)

  File "/opt/stack/magnum/magnum/conductor/handlers/common/cert_manager.py", line 38, in _generate_ca_cert
    encryption_password=ca_password)

  File "/opt/stack/magnum/magnum/common/x509/operations.py", line 43, in generate_ca_certificate
    encryption_password=encryption_password

  File "/opt/stack/magnum/magnum/common/x509/operations.py", line 95, in _generate_self_signed_certificate
    encryption_password=encryption_password)

  File "/opt/stack/magnum/magnum/common/x509/operations.py", line 109, in _generate_certificate
    x509.NameAttribute(x509.OID_COMMON_NAME, subject_name),

  File "/usr/local/lib/python2.7/dist-packages/cryptography/x509/name.py", line 22, in __init__
    "value argument must be a text type."

TypeError: value argument must be a text type.

yuanying (yuanying)
Changed in magnum:
importance: Undecided → Low
assignee: nobody → yuanying (ootsuka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Changed in magnum:
status: New → In Progress
yuanying (yuanying)
no longer affects: magnum/liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/235114
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=8f41e712bace54cbc4d9b01b397124f757c6fbd0
Submitter: Jenkins
Branch: master

commit 8f41e712bace54cbc4d9b01b397124f757c6fbd0
Author: OTSUKA, Yuanying <email address hidden>
Date: Thu Oct 15 15:47:58 2015 +0900

    Fix bay-create failure without "name"

    Currently magnum allow to create bay without name. But it's failed
    because `cert_manager.generate_certificates_to_bay` requires bay
    "name".
    This fixes it to use bay "uuid" instead of bay "name".

    Change-Id: I5da8910fcf8b71f9521abb48e72dc178c3785104
    Closes-Bug: #1506314

Changed in magnum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
status: Fix Committed → Fix Released
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.