← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1406598] [NEW] nova-cells doesn't url decode transport_url

 

Public bug reported:

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 \G
*************************** 1. row ***************************
   created_at: 2014-12-30 17:30:41
   updated_at: NULL
   deleted_at: NULL
           id: 3
      api_url: NULL
weight_offset: 1
 weight_scale: 1
         name: cell_02
    is_parent: 0
      deleted: 0
transport_url: rabbit://the%3Duser:the%3Dpassword@hostname:5672//
1 row in set (0.00 sec)

- 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.

** Affects: nova
     Importance: Undecided
         Status: New

** Description changed:

  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//                  |
- +---------------------+------------+------------+----+---------+---------------+--------------+---------+-----------+---------+-----------------------------------------------------------------------+
+ mysql> select * from cells \G
+ *************************** 1. row ***************************
+    created_at: 2014-12-30 17:30:41
+    updated_at: NULL
+    deleted_at: NULL
+            id: 3
+       api_url: NULL
+ weight_offset: 1
+  weight_scale: 1
+          name: cell_02
+     is_parent: 0
+       deleted: 0
+ transport_url: rabbit://the%3Duser:the%3Dpassword@hostname:5672//
+ 1 row in set (0.00 sec)
  
  - 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.

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

Title:
  nova-cells doesn't url decode transport_url

Status in OpenStack Compute (Nova):
  New

Bug description:
  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 \G
  *************************** 1. row ***************************
     created_at: 2014-12-30 17:30:41
     updated_at: NULL
     deleted_at: NULL
             id: 3
        api_url: NULL
  weight_offset: 1
   weight_scale: 1
           name: cell_02
      is_parent: 0
        deleted: 0
  transport_url: rabbit://the%3Duser:the%3Dpassword@hostname:5672//
  1 row in set (0.00 sec)

  - 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.

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


Follow ups

References