← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1812196] Re: when using templated cells urls, validation fails with create_cell when using {scheme} and {port}

 

Reviewed:  https://review.openstack.org/631649
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=edd1cd9ee4d149b01a388f03fb423374020033d7
Submitter: Zuul
Branch:    master

commit edd1cd9ee4d149b01a388f03fb423374020033d7
Author: Dan Smith <dansmith@xxxxxxxxxx>
Date:   Thu Jan 17 13:27:25 2019 -0800

    Fix using template cell urls with nova-manage
    
    When nova-manage went to validate the transport-url given in config or on the
    command line, it was not doing the translation before passing the url to the
    oslo.messaging parse routine to check it. This exposes the format functions
    from the CellMapping object, and makes our _validate_transport_url() format
    the url before passing it to parse.
    
    This also adds a test that makes sure the template makes it into the database
    (as a template) and that it gets loaded out in translated form with an
    object load.
    
    Change-Id: I40a435b8e97c8552c2f5f0ca3a24de2edd9f81bd
    Closes-Bug: #1812196


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1812196

Title:
  when using templated cells urls, validation fails with create_cell
  when using {scheme} and {port}

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) rocky series:
  In Progress

Bug description:
  When using templated cells urls as in
  https://docs.openstack.org/nova/rocky/user/cells.html#template-urls-
  in-cell-mappings , there is an issue with nova-manage parsing the
  transport url when we use {scheme} or {port}. The validation in nova-
  manage fails with:

  * {scheme} - No scheme specified:

  ()[root@undercloud /]# su nova -s /bin/bash -c "/usr/bin/nova-manage cell_v2 create_cell --name=default --database_connection='{scheme}://{username}:{password}@{hostname}/nova?{query}' --transport-url='{scheme}://{username}:{password}@{hostname}:{port}/?{query}' --verbose"
  Invalid transport URL: No scheme specified

  * {port} - expects an int for the port:

  ()[root@undercloud /]# su nova -s /bin/bash -c "/usr/bin/nova-manage cell_v2 create_cell --name=default --database_connection='{scheme}://{username}:{password}@{hostname}/nova?{query}' --transport-url='rabbit://{username}:{password}@{hostname}:{port}/?{query}' --verbose"
  Invalid transport URL: invalid literal for int() with base 10: '{port}'

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1812196/+subscriptions


References