)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":32666,"name":"Damian Dąbrowski","email":"damian@dabrowski.cloud","username":"ddabrowski"},"change_message_id":"09cb633306c8ccfff04962e33c53c072b79f4e63","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"165dd1d7_b047f4e7","updated":"2023-08-22 21:25:30.000000000","message":"i did some tests on local AIO and looks good overall\n\ni only doubt that we really need to define `nova_migrate_cell_quorum_vhost`, so leaving +1 for now","commit_id":"ef96c2fe4777ea44722f19389ab19a43cf12be4e"}],"tasks/nova_db_setup.yml":[{"author":{"_account_id":32666,"name":"Damian Dąbrowski","email":"damian@dabrowski.cloud","username":"ddabrowski"},"change_message_id":"09cb633306c8ccfff04962e33c53c072b79f4e63","unresolved":true,"context_lines":[{"line_number":78,"context_line":"  changed_when: false"},{"line_number":79,"context_line":"  when:"},{"line_number":80,"context_line":"    - \"_cell_uuid.rc \u003d\u003d 0\""},{"line_number":81,"context_line":"    - nova_migrate_cell_quorum_vhost"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"# The nova-status upgrade check command is typically run after upgrading the"},{"line_number":84,"context_line":"# controller services to new code, but is also OK to run for a greenfield"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"a5304dc2_518ab2cc","line":81,"updated":"2023-08-22 21:25:30.000000000","message":"i think it would be great to add some logic here so users won\u0027t have to worry about defining this variable during upgrade.\n\nex.\n```\n_nova_oslomsg_rpc_vhost_conf \u003d\u003d CURRENT_VHOST_NAME\n```\n\n`CURRENT_VHOST_NAME` can be fetched the same way we fetch cell UUID here: https://opendev.org/openstack/openstack-ansible-os_nova/src/branch/master/tasks/nova_db_setup.yml#L41","commit_id":"ef96c2fe4777ea44722f19389ab19a43cf12be4e"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"28dd7c01e76853dcabfaefecb5be552745f3f0dc","unresolved":true,"context_lines":[{"line_number":78,"context_line":"  changed_when: false"},{"line_number":79,"context_line":"  when:"},{"line_number":80,"context_line":"    - \"_cell_uuid.rc \u003d\u003d 0\""},{"line_number":81,"context_line":"    - nova_migrate_cell_quorum_vhost"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"# The nova-status upgrade check command is typically run after upgrading the"},{"line_number":84,"context_line":"# controller services to new code, but is also OK to run for a greenfield"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"b91d3d14_5da66cb0","line":81,"range":{"start_line":81,"start_character":0,"end_line":81,"end_character":0},"in_reply_to":"549c3fcf_d5ae7391","updated":"2023-08-23 11:07:09.000000000","message":"And, most nasty part, that we have to insert `/{vhost}` despite `{vhost}` is `/nova`, because nova does filter the value and cut all `/`. So we explicitly add this extra `/` just because otherwise it\u0027s not parsed properly anyway","commit_id":"ef96c2fe4777ea44722f19389ab19a43cf12be4e"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"b276a2d29ba2b803b1bb741dbaf7fb0a7c63105f","unresolved":true,"context_lines":[{"line_number":78,"context_line":"  changed_when: false"},{"line_number":79,"context_line":"  when:"},{"line_number":80,"context_line":"    - \"_cell_uuid.rc \u003d\u003d 0\""},{"line_number":81,"context_line":"    - nova_migrate_cell_quorum_vhost"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"# The nova-status upgrade check command is typically run after upgrading the"},{"line_number":84,"context_line":"# controller services to new code, but is also OK to run for a greenfield"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"549c3fcf_d5ae7391","line":81,"range":{"start_line":81,"start_character":0,"end_line":81,"end_character":0},"in_reply_to":"a5304dc2_518ab2cc","updated":"2023-08-23 11:04:59.000000000","message":"Yeah, I\u0027ve thought about that, but it\u0027s kinda weird to do so.\n\nSo we are applying a template to the cell. So we literally insert:\n`--transport-url {scheme}://{username}:{password}@{hostname}:{port}//{vhost}`\n\nThen, nova itself does resolve it based on the data from config file [1]\n\nSo, if you do `nova-manage cell_v2 list_cells`, you will have already resolved values:\n```\n+-------+--------------------------------------+-------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------+----------+\n|  Name |                 UUID                 |                                    Transport URL                                    |                                 Database Connection                                  | Disabled |\n+-------+--------------------------------------+-------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------+----------+\n| cell0 | 00000000-0000-0000-0000-000000000000 |                                        none:/                                       |     mysql+pymysql://nova_api:****@172.29.236.101/nova_cell0?charset\u003dutf8\u0026ssl_ca\u003d     |  False   |\n| cell1 | 871a7c7e-7d01-4ac1-ab38-255bf58c20fe | rabbit://nova:****@172.29.236.100:5671//nova?ssl\u003d1\u0026ssl_version\u003dTLSv1_2\u0026ssl_ca_file\u003d | mysql+pymysql://nova:****@172.29.236.101:3306/nova?charset\u003dutf8\u0026ssl_verify_cert\u003dtrue |  False   |\n+-------+--------------------------------------+-------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------+----------+\n```\n\nSo you can\u0027t really compare what you intend to insert there with what is already there. Unless define a variable that will construct resolved value and update it to a templated one, but that is kinda messy, imo.\n\nIf you have ideas - you\u0027re super welcome.\n\n[1] https://docs.openstack.org/nova/latest/admin/cells.html#template-urls-in-cell-mappings","commit_id":"ef96c2fe4777ea44722f19389ab19a43cf12be4e"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"d2f115aaf83b6b23661a9d3c77f86b1d0564eef5","unresolved":false,"context_lines":[{"line_number":78,"context_line":"  changed_when: false"},{"line_number":79,"context_line":"  when:"},{"line_number":80,"context_line":"    - \"_cell_uuid.rc \u003d\u003d 0\""},{"line_number":81,"context_line":"    - nova_migrate_cell_quorum_vhost"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"# The nova-status upgrade check command is typically run after upgrading the"},{"line_number":84,"context_line":"# controller services to new code, but is also OK to run for a greenfield"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"45f44d7c_aa39cb70","line":81,"range":{"start_line":81,"start_character":0,"end_line":81,"end_character":0},"in_reply_to":"b91d3d14_5da66cb0","updated":"2023-08-23 11:41:40.000000000","message":"Done","commit_id":"ef96c2fe4777ea44722f19389ab19a43cf12be4e"},{"author":{"_account_id":32666,"name":"Damian Dąbrowski","email":"damian@dabrowski.cloud","username":"ddabrowski"},"change_message_id":"7f77dc32b9a2481d14c2c9289efbc07b4d77d34b","unresolved":true,"context_lines":[{"line_number":51,"context_line":"    {{ nova_bin }}/nova-manage cell_v2 create_cell"},{"line_number":52,"context_line":"      --name {{ nova_cell1_name }}"},{"line_number":53,"context_line":"      --database_connection {scheme}://{username}:{password}@{hostname}:{port}/{path}?{query}"},{"line_number":54,"context_line":"      --transport-url {scheme}://{username}:{password}@{hostname}:{port}/{{ (not nova_oslomsg_rabbit_quorum_queues) | ternary(\u0027/{path}\u0027, \u0027{path}\u0027) }}?{query}"},{"line_number":55,"context_line":"  become: yes"},{"line_number":56,"context_line":"  become_user: \"{{ nova_system_user_name }}\""},{"line_number":57,"context_line":"  register: nova_cell1_create"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"b80917f0_e0a1cde1","line":54,"updated":"2023-08-23 22:10:13.000000000","message":"i noticed an issue, we need to use `| bool` filter for this condition, otherwise ternary doesn\u0027t work as expected when quorum queues are disabled: https://paste.openstack.org/show/bN07LiAoKbFl1X2KxNlq/","commit_id":"3e1bce92d4c2fe597e4ce223a563d16a4e97a717"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"b6d85a2139c14e75fb4d1991ac0a4ae63a59f72a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    {{ nova_bin }}/nova-manage cell_v2 create_cell"},{"line_number":52,"context_line":"      --name {{ nova_cell1_name }}"},{"line_number":53,"context_line":"      --database_connection {scheme}://{username}:{password}@{hostname}:{port}/{path}?{query}"},{"line_number":54,"context_line":"      --transport-url {scheme}://{username}:{password}@{hostname}:{port}/{{ (not nova_oslomsg_rabbit_quorum_queues) | ternary(\u0027/{path}\u0027, \u0027{path}\u0027) }}?{query}"},{"line_number":55,"context_line":"  become: yes"},{"line_number":56,"context_line":"  become_user: \"{{ nova_system_user_name }}\""},{"line_number":57,"context_line":"  register: nova_cell1_create"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"ad39ce08_96685311","line":54,"in_reply_to":"b80917f0_e0a1cde1","updated":"2023-08-28 08:11:26.000000000","message":"it\u0027s quite weird, but good catch","commit_id":"3e1bce92d4c2fe597e4ce223a563d16a4e97a717"},{"author":{"_account_id":32666,"name":"Damian Dąbrowski","email":"damian@dabrowski.cloud","username":"ddabrowski"},"change_message_id":"7f77dc32b9a2481d14c2c9289efbc07b4d77d34b","unresolved":true,"context_lines":[{"line_number":72,"context_line":"    {{ nova_bin }}/nova-manage cell_v2 update_cell"},{"line_number":73,"context_line":"      --cell_uuid {{ _cell_uuid[\u0027stdout\u0027].split()[3] }}"},{"line_number":74,"context_line":"      --database_connection {scheme}://{username}:{password}@{hostname}:{port}/{path}?{query}"},{"line_number":75,"context_line":"      --transport-url {scheme}://{username}:{password}@{hostname}:{port}/{{ (not nova_oslomsg_rabbit_quorum_queues) | ternary(\u0027/{path}\u0027, \u0027{path}\u0027) }}?{query}"},{"line_number":76,"context_line":"  become: yes"},{"line_number":77,"context_line":"  become_user: \"{{ nova_system_user_name }}\""},{"line_number":78,"context_line":"  changed_when: false"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"6239e19f_29d317b1","line":75,"updated":"2023-08-23 22:10:13.000000000","message":"i noticed an issue, we need to use `| bool` filter for this condition, otherwise ternary doesn\u0027t work as expected when quorum queues are disabled: https://paste.openstack.org/show/bN07LiAoKbFl1X2KxNlq/","commit_id":"3e1bce92d4c2fe597e4ce223a563d16a4e97a717"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"b6d85a2139c14e75fb4d1991ac0a4ae63a59f72a","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    {{ nova_bin }}/nova-manage cell_v2 update_cell"},{"line_number":73,"context_line":"      --cell_uuid {{ _cell_uuid[\u0027stdout\u0027].split()[3] }}"},{"line_number":74,"context_line":"      --database_connection {scheme}://{username}:{password}@{hostname}:{port}/{path}?{query}"},{"line_number":75,"context_line":"      --transport-url {scheme}://{username}:{password}@{hostname}:{port}/{{ (not nova_oslomsg_rabbit_quorum_queues) | ternary(\u0027/{path}\u0027, \u0027{path}\u0027) }}?{query}"},{"line_number":76,"context_line":"  become: yes"},{"line_number":77,"context_line":"  become_user: \"{{ nova_system_user_name }}\""},{"line_number":78,"context_line":"  changed_when: false"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"5216b6f7_ec6eb35c","line":75,"in_reply_to":"6239e19f_29d317b1","updated":"2023-08-28 08:11:26.000000000","message":"Done","commit_id":"3e1bce92d4c2fe597e4ce223a563d16a4e97a717"}]}
