← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1696001] [NEW] nova-manage cell_v2 map_cell0 can create invalid connection URL

 

Public bug reported:

Description
===========

nova-manage cell_v2 map_cell0 will automatically generate a database
connection url from the existing connection configuration setting.
However, if the connection has query parameters like a charset defined,
it will generate an invalid URL.


Steps to reproduce
==================
Set the following in the nova.conf:

[database]
connection = mysql+pymysql://nova:password@xxxxxxxxxxxxxx/nova?charset=utf8

Run:

nova-manage cell_v2 map_cell0


Excepted result
===============

Cell0 is mapped to

mysql+pymysql://nova:password@xxxxxxxxxxxxxx/nova_cell0?charset=utf8


Actual Result
=============

Cell0 is mapped to

mysql+pymysql://nova:password@xxxxxxxxxxxxxx/nova?charset=utf8nova_cell0

Subsequent API calls may fail because of this with exceptions like:

2017-06-05 20:54:20.343 2197 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 660, in __init__
2017-06-05 20:54:20.343 2197 ERROR nova.api.openstack.extensions     self.encoding = charset_by_name(self.charset).encoding
2017-06-05 20:54:20.343 2197 ERROR nova.api.openstack.extensions AttributeError: 'NoneType' object has no attribute 'encoding'

because utf8nova_cell0  is not a valid encoding.


Environment:
OpenStack Ocata,
# dpkg -l | grep nova-common
ii  nova-common                          2:15.0.5-1~u16.04+mcp5                     all          OpenStack Compute - common files

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1696001

Title:
  nova-manage cell_v2 map_cell0 can create invalid connection URL

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========

  nova-manage cell_v2 map_cell0 will automatically generate a database
  connection url from the existing connection configuration setting.
  However, if the connection has query parameters like a charset
  defined, it will generate an invalid URL.

  
  Steps to reproduce
  ==================
  Set the following in the nova.conf:

  [database]
  connection = mysql+pymysql://nova:password@xxxxxxxxxxxxxx/nova?charset=utf8

  Run:

  nova-manage cell_v2 map_cell0

  
  Excepted result
  ===============

  Cell0 is mapped to

  mysql+pymysql://nova:password@xxxxxxxxxxxxxx/nova_cell0?charset=utf8

  
  Actual Result
  =============

  Cell0 is mapped to

  mysql+pymysql://nova:password@xxxxxxxxxxxxxx/nova?charset=utf8nova_cell0

  Subsequent API calls may fail because of this with exceptions like:

  2017-06-05 20:54:20.343 2197 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 660, in __init__
  2017-06-05 20:54:20.343 2197 ERROR nova.api.openstack.extensions     self.encoding = charset_by_name(self.charset).encoding
  2017-06-05 20:54:20.343 2197 ERROR nova.api.openstack.extensions AttributeError: 'NoneType' object has no attribute 'encoding'

  because utf8nova_cell0  is not a valid encoding.

  
  Environment:
  OpenStack Ocata,
  # dpkg -l | grep nova-common
  ii  nova-common                          2:15.0.5-1~u16.04+mcp5                     all          OpenStack Compute - common files

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


Follow ups