commit e3076f5ff6fea598dc4ad2de9b5cb88eb083688b
Author: Matt Riedemann <email address hidden>
Date: Thu May 11 18:29:42 2017 -0400
Handle special characters in database connection URL netloc
When calling "nova-manage cell_v2 simple_cell_setup" or
"nova-manage cell_v2 map_cell0" without passing in the
--database_connection option, we read the [database]/connection
URL from nova.conf, try to split the URL and then create a
default connection based on the name of the original connection,
so if you're cell database's name is 'nova' you'd end up with
'nova_cell0' for the cell0 database name in the URL.
The problem is the database connection URL has credentials in the
netloc and if the password has special characters in it, those can
mess up the URL split, like splitting on ? which is normally denoting
the beginning of the path in a URL.
This change handles special characters in the password by using
a nice DB connection URL parsing utility method available in
sqlalchemy to get the database name out of the connection URL string
so we can replace it properly with the _cell0 suffix.
Adds a release note as this bug causes issues when upgrading.
Conflicts: nova/tests/unit/test_nova_manage.py
NOTE(mriedem): The conflict is due to ddt not being used in Newton.
Change-Id: I7a7678e4af8160e6f48b96095154fca6ca48ff09
Closes-Bug: #1673613
(cherry picked from commit 9a9a620ea2d06e51c01b0864d7275b57d7203e5a)
(cherry picked from commit b501fa7a926943238ff5b88ef94aaaf642765e73)
Reviewed: https:/ /review. openstack. org/466808 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=e3076f5ff6f ea598dc4ad2de9b 5cb88eb083688b
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit e3076f5ff6fea59 8dc4ad2de9b5cb8 8eb083688b
Author: Matt Riedemann <email address hidden>
Date: Thu May 11 18:29:42 2017 -0400
Handle special characters in database connection URL netloc
When calling "nova-manage cell_v2 simple_cell_setup" or connection option, we read the [database] /connection
"nova-manage cell_v2 map_cell0" without passing in the
--database_
URL from nova.conf, try to split the URL and then create a
default connection based on the name of the original connection,
so if you're cell database's name is 'nova' you'd end up with
'nova_cell0' for the cell0 database name in the URL.
The problem is the database connection URL has credentials in the
netloc and if the password has special characters in it, those can
mess up the URL split, like splitting on ? which is normally denoting
the beginning of the path in a URL.
This change handles special characters in the password by using
a nice DB connection URL parsing utility method available in
sqlalchemy to get the database name out of the connection URL string
so we can replace it properly with the _cell0 suffix.
Adds a release note as this bug causes issues when upgrading.
Conflicts:
nova/ tests/unit/ test_nova_ manage. py
NOTE(mriedem): The conflict is due to ddt not being used in Newton.
Change-Id: I7a7678e4af8160 e6f48b96095154f ca6ca48ff09 1c01b0864d7275b 57d7203e5a) 38ff5b88ef94aaa f642765e73)
Closes-Bug: #1673613
(cherry picked from commit 9a9a620ea2d06e5
(cherry picked from commit b501fa7a9269432