)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":30491,"name":"Radosław Piliszek","display_name":"Radek","email":"radek@piliszek.it","username":"yoctozepto","status":"self-employed techologist, collaborating mostly with 7bulls.com"},"change_message_id":"1db7096fe974242cbba9ec3c71070eeb3bad15ad","unresolved":false,"context_lines":[{"line_number":11,"context_line":"The nova documentation [1] states that the upgrade checks should be run"},{"line_number":12,"context_line":"after the DB schema migration and online data migrations have been"},{"line_number":13,"context_line":"performed. Currently, kolla ansible executes the upgrade check before"},{"line_number":14,"context_line":"starting the upgrade process, which is wrong can could fail."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"[1] https://docs.openstack.org/nova/latest/reference/upgrade-checks.html"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9fb8cfa7_77cafc4f","line":14,"range":{"start_line":14,"start_character":45,"end_line":14,"end_character":48},"updated":"2019-06-18 16:04:47.000000000","message":"\"and\"","commit_id":"392ccdde5f265a6098a1e45cf13e7939cf9bd2e6"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"ec7e0721538297b7591d6cfa241ea02b1941e177","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"15debdc6_3b3316a8","updated":"2022-01-12 09:26:11.000000000","message":"Seems that we might need to revive this, but slightly differently.\n\nRun the upgrade check using a new container (with new code, as we do for DB migrations), before the DB migration.","commit_id":"e929370e0d7e01b124134fd9790071d4a331367f"}],"ansible/roles/nova/tasks/upgrade.yml":[{"author":{"_account_id":19316,"name":"Eduardo Gonzalez","email":"dabarren@gmail.com","username":"egonzalez90"},"change_message_id":"dcaddb1173e7c0c6c3effafe121db85183818fac","unresolved":false,"context_lines":[{"line_number":12,"context_line":"    action: \"remove_container\""},{"line_number":13,"context_line":"    name: \"nova_consoleauth\""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- name: Check nova upgrade status"},{"line_number":16,"context_line":"  become: true"},{"line_number":17,"context_line":"  command: docker exec -t nova_api nova-status upgrade check"},{"line_number":18,"context_line":"  register: nova_upgrade_check_stdout"},{"line_number":19,"context_line":"  when: inventory_hostname \u003d\u003d groups[\u0027nova-api\u0027][0]"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: Upgrade status check result"},{"line_number":22,"context_line":"  fail:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"9fb8cfa7_1e186b7f","line":19,"range":{"start_line":15,"start_character":0,"end_line":19,"end_character":51},"updated":"2019-06-19 09:52:33.000000000","message":"should also be executed before upgrade to ensure everything is in place before upgrade, ie: nova cells, min schema version, etc\n\nIf something required is missing and we run the db upgrade, could result in database corruption and unable to upgrade, while if we ensure the failure happens before upgrade we haven\u0027t touch anything in nova side yet and is safe","commit_id":"a5f21c85294cb8b2a87a439964476eeea4bb092f"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"6ed6e48effb9a32b0009cb3284092d9914d38c74","unresolved":false,"context_lines":[{"line_number":12,"context_line":"    action: \"remove_container\""},{"line_number":13,"context_line":"    name: \"nova_consoleauth\""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- name: Check nova upgrade status"},{"line_number":16,"context_line":"  become: true"},{"line_number":17,"context_line":"  command: docker exec -t nova_api nova-status upgrade check"},{"line_number":18,"context_line":"  register: nova_upgrade_check_stdout"},{"line_number":19,"context_line":"  when: inventory_hostname \u003d\u003d groups[\u0027nova-api\u0027][0]"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: Upgrade status check result"},{"line_number":22,"context_line":"  fail:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"9fb8cfa7_24bbe2e5","line":19,"range":{"start_line":15,"start_character":0,"end_line":19,"end_character":51},"in_reply_to":"9fb8cfa7_1e186b7f","updated":"2019-06-19 11:18:35.000000000","message":"That\u0027s how I would like this command to work. Unfortunately it is more of a post upgrade check than a pre upgrade check. https://docs.openstack.org/nova/latest/reference/upgrade-checks.html#guidelines","commit_id":"a5f21c85294cb8b2a87a439964476eeea4bb092f"},{"author":{"_account_id":19316,"name":"Eduardo Gonzalez","email":"dabarren@gmail.com","username":"egonzalez90"},"change_message_id":"5a73d7e71a38d058a1e5e98b36e54f9361a57a08","unresolved":false,"context_lines":[{"line_number":12,"context_line":"    action: \"remove_container\""},{"line_number":13,"context_line":"    name: \"nova_consoleauth\""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- name: Check nova upgrade status"},{"line_number":16,"context_line":"  become: true"},{"line_number":17,"context_line":"  command: docker exec -t nova_api nova-status upgrade check"},{"line_number":18,"context_line":"  register: nova_upgrade_check_stdout"},{"line_number":19,"context_line":"  when: inventory_hostname \u003d\u003d groups[\u0027nova-api\u0027][0]"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: Upgrade status check result"},{"line_number":22,"context_line":"  fail:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"9fb8cfa7_fb06b220","line":19,"range":{"start_line":15,"start_character":0,"end_line":19,"end_character":51},"in_reply_to":"9fb8cfa7_24bbe2e5","updated":"2019-06-20 09:02:26.000000000","message":"Haven\u0027t check existing checks, but when cells v2 and placement api were introduced all was pre upgrade checks. Ie: check if placement db is created, nova cell is created, etc.\n\nFrom the docs: Checks are \"typically\" meant to be run before re-starting and upgrading to new service code.\n\nWhere typically doesn\u0027t mean always and can exist some cases where the check should be executed before (as new db required or something in the future).\n\nThis is the reason why I prefer running check before and after, one for catch pre requirements and second to ensure everything is ok after upgrade","commit_id":"a5f21c85294cb8b2a87a439964476eeea4bb092f"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"013927d01012693e06a9a6b054846632d3edea70","unresolved":false,"context_lines":[{"line_number":12,"context_line":"    action: \"remove_container\""},{"line_number":13,"context_line":"    name: \"nova_consoleauth\""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- name: Check nova upgrade status"},{"line_number":16,"context_line":"  become: true"},{"line_number":17,"context_line":"  command: docker exec -t nova_api nova-status upgrade check"},{"line_number":18,"context_line":"  register: nova_upgrade_check_stdout"},{"line_number":19,"context_line":"  when: inventory_hostname \u003d\u003d groups[\u0027nova-api\u0027][0]"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: Upgrade status check result"},{"line_number":22,"context_line":"  fail:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"9fb8cfa7_5108ff2b","line":19,"range":{"start_line":15,"start_character":0,"end_line":19,"end_character":51},"in_reply_to":"9fb8cfa7_fb06b220","updated":"2019-06-20 11:15:34.000000000","message":"I can bring this up again with the nova team, but my understanding is that the checks are supposed to be run after the DB sync and data migrations. If they depend on some change that happens during those operations then the check will fail.\n\nThe upgrade check does not currently check the DB version, but I raised a bug [1] on this and it has been picked up by the nova team. If they fix it then running the checks before DB sync would fail.\n\n[1] https://bugs.launchpad.net/nova/+bug/1833278","commit_id":"a5f21c85294cb8b2a87a439964476eeea4bb092f"}]}
