)]}'
{"tasks/upgrade/main.yml":[{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"7c9cc94685f42bfe27c19bd6efe527b4105866a9","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        chdir: \"{{ working_dir }}\""},{"line_number":139,"context_line":"      when: workload_launch|bool"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    - include_tasks: overcloud_upgrade_run.yml"},{"line_number":142,"context_line":"      tags: overcloud_upgrade_run"},{"line_number":143,"context_line":"      loop: \"{{ oc_roles|default([\u0027all\u0027]) }}\""},{"line_number":144,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":2,"id":"1fa4df85_0114a29f","line":141,"updated":"2020-02-25 17:07:36.000000000","message":"I\u0027m thinking that it doesn\u0027t really make sense to keep a single task in a separete yaml file, does it? maybe I can just move it here and remove the overcloud_upgrade_run.yml","commit_id":"931af8edce0390c00072eb37f6914b3ccbfda01d"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"f78fac0b655306a318da70da96a1dd1b8b6632cd","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        chdir: \"{{ working_dir }}\""},{"line_number":139,"context_line":"      when: workload_launch|bool"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    - include_tasks: overcloud_upgrade_run.yml"},{"line_number":142,"context_line":"      tags: overcloud_upgrade_run"},{"line_number":143,"context_line":"      loop: \"{{ oc_roles|default([\u0027all\u0027]) }}\""},{"line_number":144,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":2,"id":"1fa4df85_3ce6a146","line":141,"in_reply_to":"1fa4df85_0114a29f","updated":"2020-02-25 17:28:47.000000000","message":"Yeah, that makes sense.","commit_id":"931af8edce0390c00072eb37f6914b3ccbfda01d"},{"author":{"_account_id":8297,"name":"Sofer Athlan-Guyot","email":"sathlang@redhat.com","username":"chem"},"change_message_id":"b25ef6c2dc1587fe3c006844e54488a4a1a934a8","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        chdir: \"{{ working_dir }}\""},{"line_number":139,"context_line":"      when: workload_launch|bool"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    - include_tasks: overcloud_upgrade_run.yml"},{"line_number":142,"context_line":"      tags: overcloud_upgrade_run"},{"line_number":143,"context_line":"      loop: \"{{ oc_roles|default([\u0027all\u0027]) }}\""},{"line_number":144,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":2,"id":"1fa4df85_65ea2276","line":141,"in_reply_to":"1fa4df85_3ce6a146","updated":"2020-02-27 10:29:18.000000000","message":"Hum ... looking at it it\u0027s very similar to what we do in update. The twist that we can do //role update, as well [1].\n\nSo I\u0027m thinking that after this review we could think about refactor all this in common.\n\nSo maybe keeping it as a separate file is a good idea, so that the refactor will be more obvious.\n\njust a though.\n\n[1] when this is merged https://review.opendev.org/#/c/702931/","commit_id":"931af8edce0390c00072eb37f6914b3ccbfda01d"}],"tasks/upgrade/overcloud_upgrade_run.yml":[{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"4748f994f833ed4dabd111e066d9af4f56494087","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"- name: \"run overcloud major upgrade for the roles {{ item }}\""},{"line_number":3,"context_line":"  shell: |"},{"line_number":4,"context_line":"    set -o pipefail"},{"line_number":5,"context_line":"    bash {{ overcloud_upgrade_run_script_base }}-{{ item }}.sh 2\u003e\u00261 {{ timestamper_cmd }} \u003e \\"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_003db7b7","line":2,"range":{"start_line":2,"start_character":45,"end_line":2,"end_character":50},"updated":"2020-02-14 10:57:36.000000000","message":"nit: This should be singular now.","commit_id":"84de47ec38371dfde7f9e2ee6ed136de15748a8b"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"4748f994f833ed4dabd111e066d9af4f56494087","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    bash {{ overcloud_upgrade_run_script_base }}-{{ item }}.sh 2\u003e\u00261 {{ timestamper_cmd }} \u003e \\"},{"line_number":6,"context_line":"        {{ working_dir }}/overcloud_upgrade_run_{{ item }}.log"},{"line_number":7,"context_line":"  register: overcloud_upgrade_nodes"},{"line_number":8,"context_line":"  failed_when: false"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"- name: \"was the overcloud upgrade for role {{ item }} successful.\""},{"line_number":11,"context_line":"  fail: msg\u003d\"Overcloud upgrade composable failed in {{ item }}... :(\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_60758b85","line":8,"range":{"start_line":8,"start_character":2,"end_line":8,"end_character":20},"updated":"2020-02-14 10:57:36.000000000","message":"This causes the result to always be \u0027success\u0027 which is not what you want. Have the next task fail when the rc !\u003d 0. Something like this is quite efficient because it will only loop through the failures:\n\n    - name: \"Show failure message for any roles that failed\"\n      fail:\n        msg: \"The overcloud upgrade for {{ item.item }} failed\"\n      loop: \"{{ overcloud_upgrade_nodes.results | selectattr(\u0027rc\u0027, \u0027ne\u0027, 1) | list }}\"","commit_id":"84de47ec38371dfde7f9e2ee6ed136de15748a8b"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"019cb0a02e935a1f33ada7797760b55a4ea0668d","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    bash {{ overcloud_upgrade_run_script_base }}-{{ item }}.sh 2\u003e\u00261 {{ timestamper_cmd }} \u003e \\"},{"line_number":6,"context_line":"        {{ working_dir }}/overcloud_upgrade_run_{{ item }}.log"},{"line_number":7,"context_line":"  register: overcloud_upgrade_nodes"},{"line_number":8,"context_line":"  failed_when: false"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"- name: \"was the overcloud upgrade for role {{ item }} successful.\""},{"line_number":11,"context_line":"  fail: msg\u003d\"Overcloud upgrade composable failed in {{ item }}... :(\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_9f01e4b7","line":8,"range":{"start_line":8,"start_character":2,"end_line":8,"end_character":20},"in_reply_to":"3fa7e38b_60758b85","updated":"2020-02-17 20:44:54.000000000","message":"I don\u0027t understand why do we need to loop over overcloud_upgrade_nodes.results if the command above is being run now only once, now that the loop: \"{{ oc_roles|default([\u0027all\u0027]) }}\" has been removed... What\u0027s overcloud_upgrade_nodes.results containing?","commit_id":"84de47ec38371dfde7f9e2ee6ed136de15748a8b"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"36c9ab72900d69b115a41d34d6a6805d7c99b1fb","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    bash {{ overcloud_upgrade_run_script_base }}-{{ item }}.sh 2\u003e\u00261 {{ timestamper_cmd }} \u003e \\"},{"line_number":6,"context_line":"        {{ working_dir }}/overcloud_upgrade_run_{{ item }}.log"},{"line_number":7,"context_line":"  register: overcloud_upgrade_nodes"},{"line_number":8,"context_line":"  failed_when: false"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"- name: \"was the overcloud upgrade for role {{ item }} successful.\""},{"line_number":11,"context_line":"  fail: msg\u003d\"Overcloud upgrade composable failed in {{ item }}... :(\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_4553966f","line":8,"range":{"start_line":8,"start_character":2,"end_line":8,"end_character":20},"in_reply_to":"3fa7e38b_9f01e4b7","updated":"2020-02-18 10:31:14.000000000","message":"Oh duh, silly me - I was looking at the \u0027before\u0027, not the \u0027after\u0027.\n\nAnyway, the point is that \u0027when: overcloud_upgrade_nodes is failed\u0027 will never meet the conditional if \u0027faled_when: false\u0027 is applied here because you\u0027ve told ansible to never fail the task.\n\nEither you need to you \u0027ignore_errors: true\u0027 here (which is not great), or you need to change the conditional in the task below to check for something like \u0027when: overcloud_upgrade_nodes.rc !\u003d 0\u0027.","commit_id":"84de47ec38371dfde7f9e2ee6ed136de15748a8b"}]}
