Comment 0 for bug 1406598

Revision history for this message
Mike Dorman (mdorman-m) wrote :

When creating a cell using the nova-manage cell create command, the transport_url generated in the database is url-encoded (i.e. '=' is changed to '%3D', etc.) That's propably the correct behavior, since the connection string is stored as URL.

However, nova-cells doesn't properly decode that string. So for transport_url credentials that contain url-encodable characters, nova-cells uses the url encoded string, rather than the actual correct credentials.

Steps to reproduce:

- Create a cell using nova-manage with credentials containing url-encodable characters:

nova-manage cell create --name=cell_02 --cell_type=child --username='the=user' --password='the=password' --hostname='hostname' --port=5672 --virtual_host=/ --woffset=1 --wscale=1

- nova.cells table now contains a url-encoded transport_url:

mysql> select * from cells;
+---------------------+------------+------------+----+---------+---------------+--------------+---------+-----------+---------+-----------------------------------------------------------------------+
| created_at | updated_at | deleted_at | id | api_url | weight_offset | weight_scale | name | is_parent | deleted | transport_url |
+---------------------+------------+------------+----+---------+---------------+--------------+---------+-----------+---------+-----------------------------------------------------------------------+
| 2014-12-30 17:18:53 | NULL | NULL | 2 | NULL | 1 | 1 | cell_02 | 0 | 0 | rabbit://the%3Duser:the%3Dpassword@hostname:5672// |
+---------------------+------------+------------+----+---------+---------------+--------------+---------+-----------+---------+-----------------------------------------------------------------------+

- nova-cells uses the literal credentials 'the%3Duser' and 'the%3Dpassword' to connect to RMQ, rather than the correct 'the=user' and 'the=password' credentials.