)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f7463d321b4182e7d4a6d1537c188aa1c6d4061","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow templated cell_mapping URLs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The way we store DB and MQ URLs in the API database causes issues for"},{"line_number":10,"context_line":"some deployments (and deployment tools) which want to use per-host"},{"line_number":11,"context_line":"credentials or remote hostnames. Since all the URLs loaded from the"},{"line_number":12,"context_line":"database are the same on all systems, this becomes very difficult and"},{"line_number":13,"context_line":"some have even resorted to using client-based aliasing underneath Nova"},{"line_number":14,"context_line":"and just providing URLs that reference those aliases."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_ee309aeb","line":11,"range":{"start_line":10,"start_character":40,"end_line":11,"end_character":31},"updated":"2018-06-26 20:56:04.000000000","message":"Does this help resolve bug 1717915?","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ceebb644490f1868f84bba6d4771dc503dec5dc7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow templated cell_mapping URLs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The way we store DB and MQ URLs in the API database causes issues for"},{"line_number":10,"context_line":"some deployments (and deployment tools) which want to use per-host"},{"line_number":11,"context_line":"credentials or remote hostnames. Since all the URLs loaded from the"},{"line_number":12,"context_line":"database are the same on all systems, this becomes very difficult and"},{"line_number":13,"context_line":"some have even resorted to using client-based aliasing underneath Nova"},{"line_number":14,"context_line":"and just providing URLs that reference those aliases."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_29d0ccf6","line":11,"range":{"start_line":10,"start_character":40,"end_line":11,"end_character":31},"in_reply_to":"5f7c97a3_c986f865","updated":"2018-06-26 21:31:48.000000000","message":"It is if you are specifying multiple MQ URLs via the transport_url config option (comma-delimited). But this doesn\u0027t fix that issue, we just have to be aware of it. I\u0027m also not totally sure if that bug is valid. Looks like it\u0027s had some debug / investigation and been marked incomplete for now.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3c6f399f3bceae929283b103984f586d1c876afe","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Allow templated cell_mapping URLs"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The way we store DB and MQ URLs in the API database causes issues for"},{"line_number":10,"context_line":"some deployments (and deployment tools) which want to use per-host"},{"line_number":11,"context_line":"credentials or remote hostnames. Since all the URLs loaded from the"},{"line_number":12,"context_line":"database are the same on all systems, this becomes very difficult and"},{"line_number":13,"context_line":"some have even resorted to using client-based aliasing underneath Nova"},{"line_number":14,"context_line":"and just providing URLs that reference those aliases."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_c986f865","line":11,"range":{"start_line":10,"start_character":40,"end_line":11,"end_character":31},"in_reply_to":"5f7c97a3_ee309aeb","updated":"2018-06-26 21:13:04.000000000","message":"No, I don\u0027t think that\u0027s related.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f7463d321b4182e7d4a6d1537c188aa1c6d4061","unresolved":false,"context_lines":[{"line_number":14,"context_line":"and just providing URLs that reference those aliases."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This makes our CellMapping object load the URLs out of the database,"},{"line_number":17,"context_line":"and apply variable substitution from the CONF-resident base URLs"},{"line_number":18,"context_line":"for any fields provided. Such functionality will let operators"},{"line_number":19,"context_line":"define per-host credentials in [database]/connection, for example,"},{"line_number":20,"context_line":"and have those applied to the database_connection URLs loaded from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_ee8c1a81","line":17,"updated":"2018-06-26 20:56:04.000000000","message":"Is this related or dependent on https://review.openstack.org/#/c/539035/ which was released in oslo.db 4.34.0? If so, we need to bump lower-constraints.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ceebb644490f1868f84bba6d4771dc503dec5dc7","unresolved":false,"context_lines":[{"line_number":14,"context_line":"and just providing URLs that reference those aliases."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This makes our CellMapping object load the URLs out of the database,"},{"line_number":17,"context_line":"and apply variable substitution from the CONF-resident base URLs"},{"line_number":18,"context_line":"for any fields provided. Such functionality will let operators"},{"line_number":19,"context_line":"define per-host credentials in [database]/connection, for example,"},{"line_number":20,"context_line":"and have those applied to the database_connection URLs loaded from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_e9c0942d","line":17,"in_reply_to":"5f7c97a3_09887068","updated":"2018-06-26 21:31:48.000000000","message":"\u003e It\u0027s related only in that the referenced change was merged so they\n \u003e could work around nova in more ways. This doesn\u0027t depend on that,\n \u003e and should eliminate the need for it.\n\nYeah I realized that once I read Mike\u0027s comments in this change.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3c6f399f3bceae929283b103984f586d1c876afe","unresolved":false,"context_lines":[{"line_number":14,"context_line":"and just providing URLs that reference those aliases."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This makes our CellMapping object load the URLs out of the database,"},{"line_number":17,"context_line":"and apply variable substitution from the CONF-resident base URLs"},{"line_number":18,"context_line":"for any fields provided. Such functionality will let operators"},{"line_number":19,"context_line":"define per-host credentials in [database]/connection, for example,"},{"line_number":20,"context_line":"and have those applied to the database_connection URLs loaded from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_09887068","line":17,"in_reply_to":"5f7c97a3_ee8c1a81","updated":"2018-06-26 21:13:04.000000000","message":"It\u0027s related only in that the referenced change was merged so they could work around nova in more ways. This doesn\u0027t depend on that, and should eliminate the need for it.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"}],"doc/source/admin/configuration/schedulers.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f7463d321b4182e7d4a6d1537c188aa1c6d4061","unresolved":false,"context_lines":[{"line_number":787,"context_line":""},{"line_number":788,"context_line":".. list-table:: Host weighting options"},{"line_number":789,"context_line":"   :header-rows: 1"},{"line_number":790,"context_line":"   :widths: 15, 50, 15"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"   * - Section"},{"line_number":793,"context_line":"     - Option"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_2edc5272","line":790,"updated":"2018-06-26 20:56:04.000000000","message":"Why was this changed?","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3c6f399f3bceae929283b103984f586d1c876afe","unresolved":false,"context_lines":[{"line_number":787,"context_line":""},{"line_number":788,"context_line":".. list-table:: Host weighting options"},{"line_number":789,"context_line":"   :header-rows: 1"},{"line_number":790,"context_line":"   :widths: 15, 50, 15"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"   * - Section"},{"line_number":793,"context_line":"     - Option"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_293becd0","line":790,"in_reply_to":"5f7c97a3_2edc5272","updated":"2018-06-26 21:13:04.000000000","message":"Heh because I meant to change mine and was looking at this file for examples. Mah bad.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"}],"doc/source/user/cells.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f7463d321b4182e7d4a6d1537c188aa1c6d4061","unresolved":false,"context_lines":[{"line_number":337,"context_line":"re-run this command to map them from the top-level so they can be"},{"line_number":338,"context_line":"utilized."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"Template URLs in Cell Mappings"},{"line_number":341,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"The URLs provided in the cell mappings for ``--database_connection`` and"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_ae5f02e3","line":340,"updated":"2018-06-26 20:56:04.000000000","message":"Should probably mention somewhere in here that this capability is only supported starting with 18.0.0 Rocky.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f7463d321b4182e7d4a6d1537c188aa1c6d4061","unresolved":false,"context_lines":[{"line_number":383,"context_line":"of ``rabbit://{username}:{password}@otherhost/{path}`` will generate a full URL"},{"line_number":384,"context_line":"of ``rabbit://bob:s3kret@otherhost/nova`` when used with the above example."},{"line_number":385,"context_line":""},{"line_number":386,"context_line":".. note: The ``[database]/connection`` and ``[DEFAULT]/transport_url`` values are not"},{"line_number":387,"context_line":"   reloaded from the configuration file during a SIGHUP, which means that a full"},{"line_number":388,"context_line":"   service restart will be required to notice changes in a cell mapping record"},{"line_number":389,"context_line":"   if variables are changed."}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_aedce217","line":386,"range":{"start_line":386,"start_character":45,"end_line":386,"end_character":68},"updated":"2018-06-26 20:56:04.000000000","message":"Hmm, will this work if I\u0027m using:\n\n[oslo_messaging_rabbit]/rabbit_hosts and listing multiple hosts? See bug 1717915. Note that rabbit_hosts is deprecated in favor of [DEFAULT]/transport_url but I\u0027m not sure we have the same functionality when using it in a cell mapping with multiple hosts. The bug is confusing.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f7463d321b4182e7d4a6d1537c188aa1c6d4061","unresolved":false,"context_lines":[{"line_number":383,"context_line":"of ``rabbit://{username}:{password}@otherhost/{path}`` will generate a full URL"},{"line_number":384,"context_line":"of ``rabbit://bob:s3kret@otherhost/nova`` when used with the above example."},{"line_number":385,"context_line":""},{"line_number":386,"context_line":".. note: The ``[database]/connection`` and ``[DEFAULT]/transport_url`` values are not"},{"line_number":387,"context_line":"   reloaded from the configuration file during a SIGHUP, which means that a full"},{"line_number":388,"context_line":"   service restart will be required to notice changes in a cell mapping record"},{"line_number":389,"context_line":"   if variables are changed."}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_0e6e3663","line":386,"range":{"start_line":386,"start_character":0,"end_line":386,"end_character":8},"updated":"2018-06-26 20:56:04.000000000","message":"This note doesn\u0027t show up because you have it as a comment here, it needs to be:\n\n.. note:: The ...\n\n\nhttp://logs.openstack.org/63/578163/1/check/build-openstack-sphinx-docs/d63360a/html/user/cells.html#template-urls-in-cell-mappings","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3c6f399f3bceae929283b103984f586d1c876afe","unresolved":false,"context_lines":[{"line_number":383,"context_line":"of ``rabbit://{username}:{password}@otherhost/{path}`` will generate a full URL"},{"line_number":384,"context_line":"of ``rabbit://bob:s3kret@otherhost/nova`` when used with the above example."},{"line_number":385,"context_line":""},{"line_number":386,"context_line":".. note: The ``[database]/connection`` and ``[DEFAULT]/transport_url`` values are not"},{"line_number":387,"context_line":"   reloaded from the configuration file during a SIGHUP, which means that a full"},{"line_number":388,"context_line":"   service restart will be required to notice changes in a cell mapping record"},{"line_number":389,"context_line":"   if variables are changed."}],"source_content_type":"text/x-rst","patch_set":1,"id":"5f7c97a3_89ca409d","line":386,"range":{"start_line":386,"start_character":45,"end_line":386,"end_character":68},"in_reply_to":"5f7c97a3_aedce217","updated":"2018-06-26 21:13:04.000000000","message":"Nope, but I\u0027m about to push PS2 with support for that syntax.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ceebb644490f1868f84bba6d4771dc503dec5dc7","unresolved":false,"context_lines":[{"line_number":337,"context_line":"re-run this command to map them from the top-level so they can be"},{"line_number":338,"context_line":"utilized."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"Template URLs in Cell Mappings"},{"line_number":341,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"Starting in the Rocky release, the URLs provided in the cell mappings"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_89332061","line":340,"updated":"2018-06-26 21:31:48.000000000","message":"Per my comments in the release note in PS1, I think it would be good to document some known use cases, reasons and/or examples of why someone would do this. It\u0027s easier to reason about once I understand the use case.","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b7d237061d58644d3bf12e5e8b19c6abae9302e3","unresolved":false,"context_lines":[{"line_number":337,"context_line":"re-run this command to map them from the top-level so they can be"},{"line_number":338,"context_line":"utilized."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"Template URLs in Cell Mappings"},{"line_number":341,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"Starting in the Rocky release, the URLs provided in the cell mappings"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_21d52948","line":340,"in_reply_to":"5f7c97a3_4104e514","updated":"2018-06-27 19:44:43.000000000","message":"\u003e Reading again a couple times, I guess you just mean examples of why you might want different urls per host in general, and in the absence of those more-complicated-to-explain things? I guess I can use the different-credentials-per-host scenario as an example if that helps.\n\nYup.","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6f56d7bf715993d924535bf85075849f47e6b9a6","unresolved":false,"context_lines":[{"line_number":337,"context_line":"re-run this command to map them from the top-level so they can be"},{"line_number":338,"context_line":"utilized."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"Template URLs in Cell Mappings"},{"line_number":341,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"Starting in the Rocky release, the URLs provided in the cell mappings"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_a42723b6","line":340,"in_reply_to":"5f7c97a3_89332061","updated":"2018-06-26 21:40:40.000000000","message":"Wouldn\u0027t that be best done in the documentation of transport_url itself, or in oslo.messaging or something? It\u0027s not a cells thing so I don\u0027t think burying it here makes any sense, other than to explain how it might affect the parsing of the cell_mapping urls.","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b695233298471a5496445c1339429091ac775a8e","unresolved":false,"context_lines":[{"line_number":337,"context_line":"re-run this command to map them from the top-level so they can be"},{"line_number":338,"context_line":"utilized."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"Template URLs in Cell Mappings"},{"line_number":341,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"Starting in the Rocky release, the URLs provided in the cell mappings"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_efc07d80","line":340,"in_reply_to":"5f7c97a3_a42723b6","updated":"2018-06-27 17:40:01.000000000","message":"The templating thing is definitely cells related since it\u0027s unique to nova allowing it and working with templated URLs.","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ea2e867f7ccf2783857f7e35f4cf19e2668e833","unresolved":false,"context_lines":[{"line_number":337,"context_line":"re-run this command to map them from the top-level so they can be"},{"line_number":338,"context_line":"utilized."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"Template URLs in Cell Mappings"},{"line_number":341,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"Starting in the Rocky release, the URLs provided in the cell mappings"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_4104e514","line":340,"in_reply_to":"5f7c97a3_efc07d80","updated":"2018-06-27 19:39:56.000000000","message":"Since you referenced Mike\u0027s comments I thought you meant examples of why you\u0027d do the bind address stuff per-host. My other thought was that you meant the multi-netloc transport_url.\n\nReading again a couple times, I guess you just mean examples of why you might want different urls per host in general, and in the absence of those more-complicated-to-explain things?\n\nI guess I can use the different-credentials-per-host scenario as an example if that helps.","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"40224f0e83fff96714796db293679de238ca5170","unresolved":false,"context_lines":[{"line_number":393,"context_line":".. note:: The ``[DEFAULT]/transport_url`` option can contain an"},{"line_number":394,"context_line":"   extended syntax for the \"netloc\" part of the url"},{"line_number":395,"context_line":"   (i.e. `userA:passwordA@hostA:portA,userB:passwordB:hostB:portB`). In this"},{"line_number":396,"context_line":"   case, substitions of the form ``username1``, ``username2``, etc will be"},{"line_number":397,"context_line":"   honored and can be used in the template URL."},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"The templating of these URLs may be helpful in order to provide each service host"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_c01254b4","line":396,"range":{"start_line":396,"start_character":9,"end_line":396,"end_character":20},"updated":"2018-07-09 23:16:31.000000000","message":"substitutions?","commit_id":"50658eee4fe26a55854642119beeff46c0d0108a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"29a50ec06d73c6edc812e0e79e74494115963660","unresolved":false,"context_lines":[{"line_number":419,"context_line":"(as stored in the mapping) to connect to the cell databases. However, consider"},{"line_number":420,"context_line":"template URLs like the following::"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":" mysql+pymysql://{username}:{password}@mycell1dbhost/nova"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"and::"},{"line_number":425,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_e14091a5","line":422,"range":{"start_line":422,"start_character":39,"end_line":422,"end_character":52},"updated":"2018-06-27 20:04:46.000000000","message":"Did you mean to change this from mycell1dbhost and drop nova_cell0?","commit_id":"50658eee4fe26a55854642119beeff46c0d0108a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ef4d27886cc27c0ca0610b2e071c2b0d0f1351ed","unresolved":false,"context_lines":[{"line_number":419,"context_line":"(as stored in the mapping) to connect to the cell databases. However, consider"},{"line_number":420,"context_line":"template URLs like the following::"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":" mysql+pymysql://{username}:{password}@mycell1dbhost/nova"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"and::"},{"line_number":425,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_01202db1","line":422,"range":{"start_line":422,"start_character":39,"end_line":422,"end_character":52},"in_reply_to":"5f7c97a3_e14091a5","updated":"2018-06-27 20:16:41.000000000","message":"Yes, because this is the cell1 mapping.","commit_id":"50658eee4fe26a55854642119beeff46c0d0108a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"29a50ec06d73c6edc812e0e79e74494115963660","unresolved":false,"context_lines":[{"line_number":428,"context_line":"Using the first service and cell1 mapping, the calculated URL that will actually"},{"line_number":429,"context_line":"be used for connecting to that database will be::"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":" mysql+pymysql://service1:foo@mycell1dbhost/nova"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"References"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_a114d9a0","line":431,"range":{"start_line":431,"start_character":30,"end_line":431,"end_character":43},"updated":"2018-06-27 20:04:46.000000000","message":"A bit confused on how you\u0027re giving cell0 examples and then change to api and cell1/cell2 db URLs...","commit_id":"50658eee4fe26a55854642119beeff46c0d0108a"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"40224f0e83fff96714796db293679de238ca5170","unresolved":false,"context_lines":[{"line_number":428,"context_line":"Using the first service and cell1 mapping, the calculated URL that will actually"},{"line_number":429,"context_line":"be used for connecting to that database will be::"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":" mysql+pymysql://service1:foo@mycell1dbhost/nova"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"References"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_ab6db9cb","line":431,"range":{"start_line":431,"start_character":30,"end_line":431,"end_character":43},"in_reply_to":"5f7c97a3_81151d4f","updated":"2018-07-09 23:16:31.000000000","message":"I found this series of examples confusing too until I reviewed the unit tests. Combined with the explanation from Dan, I see that the point of the cell0 examples are showing the \"base\" urls that the variable values are pulled from and the next examples show how cell database urls are generated based on the template + variable values.","commit_id":"50658eee4fe26a55854642119beeff46c0d0108a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ef4d27886cc27c0ca0610b2e071c2b0d0f1351ed","unresolved":false,"context_lines":[{"line_number":428,"context_line":"Using the first service and cell1 mapping, the calculated URL that will actually"},{"line_number":429,"context_line":"be used for connecting to that database will be::"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":" mysql+pymysql://service1:foo@mycell1dbhost/nova"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"References"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_81151d4f","line":431,"range":{"start_line":431,"start_character":30,"end_line":431,"end_character":43},"in_reply_to":"5f7c97a3_a114d9a0","updated":"2018-06-27 20:16:41.000000000","message":"The cell0 url is in the config file, as the default connection. The templates are in the cell mappings for cell1 and cell2. The calculated URL for cell1 is the cell1 template, with the values parsed out of the configuration file for this service, which happens to point to cell0.","commit_id":"50658eee4fe26a55854642119beeff46c0d0108a"}],"nova/objects/cell_mapping.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f7463d321b4182e7d4a6d1537c188aa1c6d4061","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import nova.conf"},{"line_number":14,"context_line":"from oslo_log import log as logging"},{"line_number":15,"context_line":"from oslo_utils import versionutils"},{"line_number":16,"context_line":"import six.moves.urllib.parse as urlparse"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_ce083e92","line":13,"updated":"2018-06-26 20:56:04.000000000","message":"nit: this is a nova import, not a 3rd party import, so it should go in the nova group below","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f7463d321b4182e7d4a6d1537c188aa1c6d4061","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @staticmethod"},{"line_number":64,"context_line":"    def _format_url(url, default):"},{"line_number":65,"context_line":"        default_url \u003d urlparse.urlparse(default)"},{"line_number":66,"context_line":"        subs \u003d {"},{"line_number":67,"context_line":"            \u0027username\u0027: default_url.username,"},{"line_number":68,"context_line":"            \u0027password\u0027: default_url.password,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_aeef0285","line":65,"range":{"start_line":65,"start_character":31,"end_line":65,"end_character":39},"updated":"2018-06-26 20:56:04.000000000","message":"I\u0027m not totally sure if this will work properly for database connection URLs. See I7a7678e4af8160e6f48b96095154fca6ca48ff09 where we had to use a DB URL parsing utility from sqlalchemy to handle special characters in the URL.\n\nShould probably at least make sure the same test URLs from test_map_cell0_default_database_special_characters work on this stuff.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d7388363183e7ceb05ab994c6e59d421ade25eb","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @staticmethod"},{"line_number":64,"context_line":"    def _format_url(url, default):"},{"line_number":65,"context_line":"        default_url \u003d urlparse.urlparse(default)"},{"line_number":66,"context_line":"        subs \u003d {"},{"line_number":67,"context_line":"            \u0027username\u0027: default_url.username,"},{"line_number":68,"context_line":"            \u0027password\u0027: default_url.password,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_b65deb7d","line":65,"range":{"start_line":65,"start_character":31,"end_line":65,"end_character":39},"in_reply_to":"5f7c97a3_09fe3005","updated":"2018-06-28 14:20:10.000000000","message":"\u003e Actually, I call BS on this. The bug against python asserts that\n \u003e the password should be url-encoded, which I think is the only sane\n \u003e thing. If you had other reserved and positionally-adjacent\n \u003e characters in the password (\"@\", \"/\", \":\") you couldn\u0027t really do\n \u003e anything sane. Thus I think this (and the previous bug and our fix\n \u003e for it) is just swapping one implementation\u0027s behavior for an\n \u003e invalid situation for another.\n \u003e \n \u003e https://bugs.python.org/issue18140\n\nOK, that\u0027s fair, so if people have special characters like : or ? or ] or [ in their password in the URL, we expect / require them to url-encode them, right? But then don\u0027t we need to decode them somewhere? I think that\u0027s the piece I\u0027m missing.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"6790a74e078189c12cd6d47a25da060f3ee9a28b","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @staticmethod"},{"line_number":64,"context_line":"    def _format_url(url, default):"},{"line_number":65,"context_line":"        default_url \u003d urlparse.urlparse(default)"},{"line_number":66,"context_line":"        subs \u003d {"},{"line_number":67,"context_line":"            \u0027username\u0027: default_url.username,"},{"line_number":68,"context_line":"            \u0027password\u0027: default_url.password,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_1fa2e29a","line":65,"range":{"start_line":65,"start_character":31,"end_line":65,"end_character":39},"in_reply_to":"5f7c97a3_09fe3005","updated":"2018-06-26 23:02:49.000000000","message":"the URLs within nova are not as crazy as the ones in the wild so whatever passes the tests is fine.   not sure why you wouldn\u0027t just use SQLAlchemy\u0027s URL utilities though if this is definitely a SQLAlchemy URL.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1b5b18c4c6fb3aadec472fac34e003ce99947bd0","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @staticmethod"},{"line_number":64,"context_line":"    def _format_url(url, default):"},{"line_number":65,"context_line":"        default_url \u003d urlparse.urlparse(default)"},{"line_number":66,"context_line":"        subs \u003d {"},{"line_number":67,"context_line":"            \u0027username\u0027: default_url.username,"},{"line_number":68,"context_line":"            \u0027password\u0027: default_url.password,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_32b4a7f0","line":65,"range":{"start_line":65,"start_character":31,"end_line":65,"end_character":39},"in_reply_to":"5f7c97a3_1fa2e29a","updated":"2018-06-27 13:28:35.000000000","message":"It\u0027s not, this is the transport url as well, and it has non-standard formatting, so I\u0027d rather be able to utilize the same code for both unless there\u0027s a good reason.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3c6f399f3bceae929283b103984f586d1c876afe","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @staticmethod"},{"line_number":64,"context_line":"    def _format_url(url, default):"},{"line_number":65,"context_line":"        default_url \u003d urlparse.urlparse(default)"},{"line_number":66,"context_line":"        subs \u003d {"},{"line_number":67,"context_line":"            \u0027username\u0027: default_url.username,"},{"line_number":68,"context_line":"            \u0027password\u0027: default_url.password,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_c9bef8d2","line":65,"range":{"start_line":65,"start_character":31,"end_line":65,"end_character":39},"in_reply_to":"5f7c97a3_aeef0285","updated":"2018-06-26 21:13:04.000000000","message":"Guh, well, that is going to suck if I need to do parsing differently for each. I\u0027ll let Mike chime in here I guess.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4b250f39aa15416611eb47a193b39abcbdfaab0e","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @staticmethod"},{"line_number":64,"context_line":"    def _format_url(url, default):"},{"line_number":65,"context_line":"        default_url \u003d urlparse.urlparse(default)"},{"line_number":66,"context_line":"        subs \u003d {"},{"line_number":67,"context_line":"            \u0027username\u0027: default_url.username,"},{"line_number":68,"context_line":"            \u0027password\u0027: default_url.password,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_09fe3005","line":65,"range":{"start_line":65,"start_character":31,"end_line":65,"end_character":39},"in_reply_to":"5f7c97a3_c9bef8d2","updated":"2018-06-26 21:33:21.000000000","message":"Actually, I call BS on this. The bug against python asserts that the password should be url-encoded, which I think is the only sane thing. If you had other reserved and positionally-adjacent characters in the password (\"@\", \"/\", \":\") you couldn\u0027t really do anything sane. Thus I think this (and the previous bug and our fix for it) is just swapping one implementation\u0027s behavior for an invalid situation for another.\n\nhttps://bugs.python.org/issue18140","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f7463d321b4182e7d4a6d1537c188aa1c6d4061","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    @staticmethod"},{"line_number":79,"context_line":"    def _format_db_url(url):"},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            return CellMapping._format_url(url, CONF.database.connection)"},{"line_number":82,"context_line":"        except Exception:"},{"line_number":83,"context_line":"            LOG.exception(\u0027Failed to parse [database]/connection to \u0027"},{"line_number":84,"context_line":"                          \u0027format cell mapping\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_0ef4f653","line":81,"range":{"start_line":81,"start_character":47,"end_line":81,"end_character":72},"updated":"2018-06-26 20:56:04.000000000","message":"This can be None since I can create my cell mapping by passing the value on the command line rather than in config.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f7463d321b4182e7d4a6d1537c188aa1c6d4061","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    @staticmethod"},{"line_number":88,"context_line":"    def _format_mq_url(url):"},{"line_number":89,"context_line":"        try:"},{"line_number":90,"context_line":"            return CellMapping._format_url(url, CONF.transport_url)"},{"line_number":91,"context_line":"        except Exception:"},{"line_number":92,"context_line":"            LOG.exception(\u0027Failed to parse [DEFAULT]/transport_url to \u0027"},{"line_number":93,"context_line":"                          \u0027format cell mapping\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_ee1c1ac3","line":90,"range":{"start_line":90,"start_character":53,"end_line":90,"end_character":66},"updated":"2018-06-26 20:56:04.000000000","message":"This could be None I believe if you\u0027re using this option:\n\nhttps://docs.openstack.org/nova/latest/configuration/config.html#oslo_messaging_rabbit.rabbit_hosts\n\nor this one:\n\nhttps://docs.openstack.org/nova/latest/configuration/config.html#oslo_messaging_rabbit.rabbit_host\n\nI don\u0027t know exactly if those get automatically translated to CONF.transport_url.\n\nAlso, I suppose you\u0027re using that value because \u0027nova-manage cell_v2 create_cell\u0027 uses it, but I can create a cell mapping without using CONF.transport_url by passing in my --transport-url. So you should probably check for None...","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ceebb644490f1868f84bba6d4771dc503dec5dc7","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # NOTE(danms): oslo.messaging has an extended format for the URL"},{"line_number":79,"context_line":"        # which we need to support:"},{"line_number":80,"context_line":"        #   scheme://user:pass@host:port[,user1:pass@host1:port, ...]/path"},{"line_number":81,"context_line":"        # Encode these values, if they exist, as indexed keys like"},{"line_number":82,"context_line":"        # username1, password1, hostname1, port1."},{"line_number":83,"context_line":"        if \u0027,\u0027 in default_url.netloc:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_2903ec43","line":80,"updated":"2018-06-26 21:31:48.000000000","message":"We might want to use TransportURL.parse from oslo.messaging:\n\nhttps://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/transport.py#L458\n\nI\u0027m using that here:\n\nhttps://review.openstack.org/#/c/569858/","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6f56d7bf715993d924535bf85075849f47e6b9a6","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # NOTE(danms): oslo.messaging has an extended format for the URL"},{"line_number":79,"context_line":"        # which we need to support:"},{"line_number":80,"context_line":"        #   scheme://user:pass@host:port[,user1:pass@host1:port, ...]/path"},{"line_number":81,"context_line":"        # Encode these values, if they exist, as indexed keys like"},{"line_number":82,"context_line":"        # username1, password1, hostname1, port1."},{"line_number":83,"context_line":"        if \u0027,\u0027 in default_url.netloc:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_846ea7c5","line":80,"in_reply_to":"5f7c97a3_2903ec43","updated":"2018-06-26 21:40:40.000000000","message":"I dunno, I\u0027d have to go dig through the code to see how much of the library we end up tickling in that path. I don\u0027t want to run through building a bunch of messaging objects every time we load the cell mapping, as we could be doing that pretty often as part of joined loads. That library has so many hidden places where they register conf options super late at runtime and stuff, which makes me hesitant to use internals like that.\n\nThe only reason, IMHO, would be to get the ipv6 parsing implementation for free, but it\u0027s not that complex (nor that robust) so I don\u0027t know that it\u0027s worth it.","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ceebb644490f1868f84bba6d4771dc503dec5dc7","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                    \u0027port\u0027: None,"},{"line_number":93,"context_line":"                }"},{"line_number":94,"context_line":"                if \u0027@\u0027 in netloc:"},{"line_number":95,"context_line":"                    userpass, hostport \u003d netloc.split(\u0027@\u0027)"},{"line_number":96,"context_line":"                else:"},{"line_number":97,"context_line":"                    hostport \u003d netloc"},{"line_number":98,"context_line":"                    userpass \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_a994dce8","line":95,"range":{"start_line":95,"start_character":55,"end_line":95,"end_character":56},"updated":"2018-06-26 21:31:48.000000000","message":"Could this be part of the password?","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ceebb644490f1868f84bba6d4771dc503dec5dc7","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                else:"},{"line_number":97,"context_line":"                    hostport \u003d netloc"},{"line_number":98,"context_line":"                    userpass \u003d \u0027\u0027"},{"line_number":99,"context_line":"                if \u0027:\u0027 in hostport:"},{"line_number":100,"context_line":"                    these[\u0027hostname\u0027], these[\u0027port\u0027] \u003d hostport.split(\u0027:\u0027)"},{"line_number":101,"context_line":"                else:"},{"line_number":102,"context_line":"                    these[\u0027hostname\u0027] \u003d hostport"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_0950702b","line":99,"updated":"2018-06-26 21:31:48.000000000","message":"What if it\u0027s an IPv6 address?","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ceebb644490f1868f84bba6d4771dc503dec5dc7","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                    these[\u0027hostname\u0027], these[\u0027port\u0027] \u003d hostport.split(\u0027:\u0027)"},{"line_number":101,"context_line":"                else:"},{"line_number":102,"context_line":"                    these[\u0027hostname\u0027] \u003d hostport"},{"line_number":103,"context_line":"                if \u0027:\u0027 in userpass:"},{"line_number":104,"context_line":"                    these[\u0027username\u0027], these[\u0027password\u0027] \u003d userpass.split(\u0027:\u0027)"},{"line_number":105,"context_line":"                else:"},{"line_number":106,"context_line":"                    these[\u0027username\u0027] \u003d userpass"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_4983c8a9","line":103,"updated":"2018-06-26 21:31:48.000000000","message":"I don\u0027t know if it\u0027s valid to have things like :, ?, @ in passwords in a URL, but if so it could screw this up.","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ad7e44549150aa77517c98c1e3cb87e64cea8513","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                    these[\u0027hostname\u0027], these[\u0027port\u0027] \u003d hostport.split(\u0027:\u0027)"},{"line_number":101,"context_line":"                else:"},{"line_number":102,"context_line":"                    these[\u0027hostname\u0027] \u003d hostport"},{"line_number":103,"context_line":"                if \u0027:\u0027 in userpass:"},{"line_number":104,"context_line":"                    these[\u0027username\u0027], these[\u0027password\u0027] \u003d userpass.split(\u0027:\u0027)"},{"line_number":105,"context_line":"                else:"},{"line_number":106,"context_line":"                    these[\u0027username\u0027] \u003d userpass"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_84a307ff","line":103,"in_reply_to":"5f7c97a3_4983c8a9","updated":"2018-06-26 21:41:55.000000000","message":"I assert that it\u0027s not, supported by the python bug linked in the other comment.","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ceebb644490f1868f84bba6d4771dc503dec5dc7","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    @staticmethod"},{"line_number":114,"context_line":"    def _format_db_url(url):"},{"line_number":115,"context_line":"        if CONF.database.connection is None and \u0027{\u0027 in url:"},{"line_number":116,"context_line":"            LOG.error(\u0027Cell mapping database_connection is a template, but \u0027"},{"line_number":117,"context_line":"                      \u0027[database]/connection is not set\u0027)"},{"line_number":118,"context_line":"            return url"},{"line_number":119,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_a9c61c15","line":116,"updated":"2018-06-26 21:31:48.000000000","message":"Might want to throw some kind of identifier in here for the cell in question. We might not have uuid or name fields set by this point though.","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ad7e44549150aa77517c98c1e3cb87e64cea8513","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    @staticmethod"},{"line_number":114,"context_line":"    def _format_db_url(url):"},{"line_number":115,"context_line":"        if CONF.database.connection is None and \u0027{\u0027 in url:"},{"line_number":116,"context_line":"            LOG.error(\u0027Cell mapping database_connection is a template, but \u0027"},{"line_number":117,"context_line":"                      \u0027[database]/connection is not set\u0027)"},{"line_number":118,"context_line":"            return url"},{"line_number":119,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_a49ac3c1","line":116,"in_reply_to":"5f7c97a3_a9c61c15","updated":"2018-06-26 21:41:55.000000000","message":"Yeah, not safe because of the order in which we do this, and I don\u0027t want to log the template in case it has sensitive stuff in it.","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ceebb644490f1868f84bba6d4771dc503dec5dc7","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    def _format_mq_url(url):"},{"line_number":128,"context_line":"        if CONF.transport_url is None and \u0027{\u0027 in url:"},{"line_number":129,"context_line":"            LOG.error(\u0027Cell mapping transport_url is a template, but \u0027"},{"line_number":130,"context_line":"                      \u0027[DEFAULT/transport_url is not set\u0027)"},{"line_number":131,"context_line":"            return url"},{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            return CellMapping._format_url(url, CONF.transport_url)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_69cc8433","line":130,"range":{"start_line":130,"start_character":24,"end_line":130,"end_character":31},"updated":"2018-06-26 21:31:48.000000000","message":"missing ]","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"}],"nova/tests/unit/objects/test_cell_mapping.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f7463d321b4182e7d4a6d1537c188aa1c6d4061","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    @mock.patch.object(cell_mapping.CellMapping, \u0027_get_by_uuid_from_db\u0027)"},{"line_number":132,"context_line":"    def test_formatted_db_url(self, mock_get):"},{"line_number":133,"context_line":"        url \u003d \u0027sqlite://bob:s3kret@localhost:123/nova?munchies\u003ddoritos#baz\u0027"},{"line_number":134,"context_line":"        varurl \u003d (\u0027{scheme}://not{username}:{password}@\u0027"},{"line_number":135,"context_line":"                  \u0027{hostname}:1{port}/{path}?{query}\u0026flavor\u003dcoolranch\u0027"},{"line_number":136,"context_line":"                  \u0027#{fragment}\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_2eb1b28f","line":133,"updated":"2018-06-26 20:56:04.000000000","message":"We likely need more permutations on the types of urls we could get with special characters, see test_map_cell0_default_database_special_characters.\n\nA URL with an IPv6 address for the host also comes to mind as something that could goof up parsing.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ceebb644490f1868f84bba6d4771dc503dec5dc7","unresolved":false,"context_lines":[{"line_number":165,"context_line":"               \u0027bob:s3kret@localhost:123\u0027"},{"line_number":166,"context_line":"               \u0027/nova?munchies\u003ddoritos#baz\u0027)"},{"line_number":167,"context_line":"        varurl \u003d (\u0027{scheme}://not{username2}:{password1}@\u0027"},{"line_number":168,"context_line":"                  \u0027{hostname2}:1{port1}/{path}?{query}\u0026flavor\u003dcoolranch\u0027"},{"line_number":169,"context_line":"                  \u0027#{fragment}\u0027)"},{"line_number":170,"context_line":"        self.flags(transport_url\u003durl)"},{"line_number":171,"context_line":"        db_mapping \u003d get_db_mapping(transport_url\u003dvarurl)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_89448074","line":168,"updated":"2018-06-26 21:31:48.000000000","message":"I still think it would be good to have a test where we have a non-templated URL with an IPv6 address for the hostname to make sure parsing is correct, especially in the multiple host case where we\u0027re doing some manual parsing.","commit_id":"866dce9e4ac9164e332cb4194586506a7d2633a8"}],"releasenotes/notes/cell-mapping-formatted-urls-4f5ee779a70960b8.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c46bf0b231e0dbcdbd3307ef8f597d912dd58c1a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The URLs in cell mapping records may now include variables that are filled"},{"line_number":5,"context_line":"    from the corresponding default URL specified in the host\u0027s configuration"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5f7c97a3_e9e1742c","line":2,"updated":"2018-06-26 21:03:40.000000000","message":"Is this something we\u0027d want to backport? If so, we likely don\u0027t want to say it\u0027s a feature - from Mike\u0027s comments, it sounds more like a bug fix / security hardening. It would be ops-only so no user-visible impact, and backward compatible b default since anyone with existing cells mappings doesn\u0027t have templated URLs.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3c6f399f3bceae929283b103984f586d1c876afe","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The URLs in cell mapping records may now include variables that are filled"},{"line_number":5,"context_line":"    from the corresponding default URL specified in the host\u0027s configuration"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5f7c97a3_e9c41462","line":2,"in_reply_to":"5f7c97a3_e9e1742c","updated":"2018-06-26 21:13:04.000000000","message":"I dunno, I think we probably shouldn\u0027t backport it. It\u0027s definitely a feature in my mind, which is why I put it here.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2f7463d321b4182e7d4a6d1537c188aa1c6d4061","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The URLs in cell mapping records may now include variables that are filled"},{"line_number":5,"context_line":"    from the corresponding default URL specified in the host\u0027s configuration"},{"line_number":6,"context_line":"    file. This allows per-host credentials, as well as other values to be set"},{"line_number":7,"context_line":"    in the config file which will affect the URL of a cell, as calculated when"},{"line_number":8,"context_line":"    loading the record. For ``database_connection``, the ``[database]/connection``"},{"line_number":9,"context_line":"    URL is used as the base. For ``transport_url``, the ``[DEFAULT]/transport_url``"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5f7c97a3_6e41ea62","line":6,"range":{"start_line":6,"start_character":10,"end_line":6,"end_character":42},"updated":"2018-06-26 20:56:04.000000000","message":"I\u0027m a little bit lost on this, maybe there should be an example in the doc? Today I create my cell1 mapping with a given db url and it\u0027s the same everywhere. With this thing, what happens now?\n\nI create the cell1 mapping with a templated URL, let\u0027s say just using {hostname}, and then I have 3 controller nodes with 3 separate DBs and on each controller those are configured to point at a specific host database or what?","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"eafd09aadca64f36b35562e9a6a52f17adcaf442","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The URLs in cell mapping records may now include variables that are filled"},{"line_number":5,"context_line":"    from the corresponding default URL specified in the host\u0027s configuration"},{"line_number":6,"context_line":"    file. This allows per-host credentials, as well as other values to be set"},{"line_number":7,"context_line":"    in the config file which will affect the URL of a cell, as calculated when"},{"line_number":8,"context_line":"    loading the record. For ``database_connection``, the ``[database]/connection``"},{"line_number":9,"context_line":"    URL is used as the base. For ``transport_url``, the ``[DEFAULT]/transport_url``"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5f7c97a3_c907d8c8","line":6,"range":{"start_line":6,"start_character":10,"end_line":6,"end_character":42},"in_reply_to":"5f7c97a3_6e41ea62","updated":"2018-06-26 21:07:07.000000000","message":"I should have read Mike\u0027s comments first:\n\n\u003e Another common host-specifc need is the ability to have separate database usernames per host. Full compliance with ANSSI for example requires this; we have also made use of the tripleo.cnf file to work around this but it would be better to be able to write the username/password into the conf file knowing that this username/password won\u0027t be stored in the database and used elsewhere. ANSSI is requiring usernames/passwords to be local to a certain server as a security measure, limiting the scope of an individual password. It is unlikely that storing these username/passwords in the database itself would be ANSSI compliant as that defeats the purpose.\n\nSo in my scenario above, I\u0027ve got a single cell1 database but granted access to 3 separate users, and on my 3 controllers nodes I\u0027ve configured the database connection URL with specific users per host to access the database, so in case one is compromised I can reject access to the cell1 database for that specific user and leave the others running, yeah? I would take some of the comments / use cases / examples from Mike\u0027s comment and apply those to the new docs.","commit_id":"f0617c2a6d0d147c8901ade2635aa71bbee5321b"}]}
