)]}'
{"templates/workarounds.sh.j2":[{"author":{"_account_id":8042,"name":"Jiří Stránský","email":"jistr@redhat.com","username":"jistr"},"change_message_id":"7e48d1ebdee66f970aaab921564ac0d92a5f4449","unresolved":false,"context_lines":[{"line_number":51,"context_line":"echo {{ key }}"},{"line_number":52,"context_line":"{% if value.patch -%}"},{"line_number":53,"context_line":"apply_patch {{ value.basedir }} {{ value.id }}"},{"line_number":54,"context_line":"{% elif value.ansible is defined and  value.ansible !\u003d \u0027\u0027 -%}"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"[ -d $HOME/ansible_workarounds ] || mkdir $HOME/ansible_workarounds"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"7faddb67_6257cfcb","line":54,"range":{"start_line":54,"start_character":14,"end_line":54,"end_character":21},"updated":"2019-08-06 09:41:39.000000000","message":"I\u0027d probably name it ansible_hosts for immediate clarity but it\u0027s not a blocker.","commit_id":"f6f79ad780c5993cde481569335fbec4b25a5360"},{"author":{"_account_id":8042,"name":"Jiří Stránský","email":"jistr@redhat.com","username":"jistr"},"change_message_id":"7e48d1ebdee66f970aaab921564ac0d92a5f4449","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"[ -d $HOME/ansible_workarounds ] || mkdir $HOME/ansible_workarounds"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"cat \u003c\u003cEOF \u003e \"$HOME/ansible_workarounds/{{ key }}.yaml\""},{"line_number":59,"context_line":"- hosts: {{ value.ansible }}"},{"line_number":60,"context_line":"  tasks:"},{"line_number":61,"context_line":"    - name: {{key}} workaround"}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"7faddb67_42e3b305","line":58,"range":{"start_line":58,"start_character":0,"end_line":58,"end_character":9},"updated":"2019-08-06 09:41:39.000000000","message":"If we do\n\n    cat \u003c\u003c\u0027EOF\u0027\n\nthen the internals will be treated as single-quoted bash string and we will not have to replace(\"$\", \"\\$\"). The escaping is not only about $, but also backticks for example.\n\nNot an outright blocker but i think we should probably do the change? :)\n\nOtherwise LGTM.","commit_id":"f6f79ad780c5993cde481569335fbec4b25a5360"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"14140aa3da86c85f6b250c51400576dce7d302d8","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"[ -d $HOME/ansible_workarounds ] || mkdir $HOME/ansible_workarounds"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"cat \u003c\u003cEOF \u003e \"$HOME/ansible_workarounds/{{ key }}.yaml\""},{"line_number":59,"context_line":"- hosts: {{ value.ansible }}"},{"line_number":60,"context_line":"  tasks:"},{"line_number":61,"context_line":"    - name: {{key}} workaround"}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"7faddb67_533e248b","line":58,"range":{"start_line":58,"start_character":0,"end_line":58,"end_character":9},"in_reply_to":"7faddb67_42e3b305","updated":"2019-08-06 14:20:30.000000000","message":"Thanks a lot for your comment, I was struggling with this for some time. I\u0027ll know this for the next time.","commit_id":"f6f79ad780c5993cde481569335fbec4b25a5360"},{"author":{"_account_id":21537,"name":"Yurii Prokulevych","email":"yprokule@redhat.com","username":"yprokule"},"change_message_id":"207fa046d66efcd3b883c799db281086fc0c04d3","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    inventory_file\u003d${ansible_dir}/tripleo-inventory.yaml"},{"line_number":46,"context_line":"    if [ ! -f \"$inventory_file\" ]; then"},{"line_number":47,"context_line":"        tripleo-ansible-inventory --ansible_ssh_user heat-admin --static-yaml-inventory ${inventory_file}"},{"line_number":48,"context_line":"    fi"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    # Run ansible playbook"}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"7faddb67_ab0306be","line":47,"range":{"start_line":47,"start_character":53,"end_line":47,"end_character":63},"updated":"2019-08-12 06:47:03.000000000","message":"Not sure if this is going to work with split stack environments.","commit_id":"0d8fc84710a0dd00f109bba09491d645e83b4ee1"},{"author":{"_account_id":8042,"name":"Jiří Stránský","email":"jistr@redhat.com","username":"jistr"},"change_message_id":"66863c76bd00113c5e1b5e232e6f67d2428287a5","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    inventory_file\u003d${ansible_dir}/tripleo-inventory.yaml"},{"line_number":46,"context_line":"    if [ ! -f \"$inventory_file\" ]; then"},{"line_number":47,"context_line":"        tripleo-ansible-inventory --ansible_ssh_user heat-admin --static-yaml-inventory ${inventory_file}"},{"line_number":48,"context_line":"    fi"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    # Run ansible playbook"}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"7faddb67_ae879412","line":47,"range":{"start_line":47,"start_character":53,"end_line":47,"end_character":63},"in_reply_to":"7faddb67_15c27b54","updated":"2019-08-27 12:41:26.000000000","message":"Yea good catch, it will not work with split stack.. For split stack we need the user name configurable.","commit_id":"0d8fc84710a0dd00f109bba09491d645e83b4ee1"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"36c7374d767c927d5976b8a6258b1e77bc76f39a","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    inventory_file\u003d${ansible_dir}/tripleo-inventory.yaml"},{"line_number":46,"context_line":"    if [ ! -f \"$inventory_file\" ]; then"},{"line_number":47,"context_line":"        tripleo-ansible-inventory --ansible_ssh_user heat-admin --static-yaml-inventory ${inventory_file}"},{"line_number":48,"context_line":"    fi"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    # Run ansible playbook"}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"7faddb67_15c27b54","line":47,"range":{"start_line":47,"start_character":53,"end_line":47,"end_character":63},"in_reply_to":"7faddb67_ab0306be","updated":"2019-08-27 10:17:09.000000000","message":"Isn\u0027t there a heat-admin user in the split stack environments then? that\u0027s a fair point, however it can be addressed in a follow up review. wdyt?","commit_id":"0d8fc84710a0dd00f109bba09491d645e83b4ee1"},{"author":{"_account_id":21537,"name":"Yurii Prokulevych","email":"yprokule@redhat.com","username":"yprokule"},"change_message_id":"207fa046d66efcd3b883c799db281086fc0c04d3","unresolved":false,"context_lines":[{"line_number":69,"context_line":"  tasks:"},{"line_number":70,"context_line":"    - name: {{key}} workaround"},{"line_number":71,"context_line":"      shell: |"},{"line_number":72,"context_line":"        {{ value.command | indent( width\u003d8) }}"},{"line_number":73,"context_line":"EOF"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"if [ ! -z $1 ]"}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"7faddb67_cb0682ce","line":72,"range":{"start_line":72,"start_character":34,"end_line":72,"end_character":35},"updated":"2019-08-12 06:47:03.000000000","message":"extra space :)","commit_id":"0d8fc84710a0dd00f109bba09491d645e83b4ee1"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"36c7374d767c927d5976b8a6258b1e77bc76f39a","unresolved":false,"context_lines":[{"line_number":69,"context_line":"  tasks:"},{"line_number":70,"context_line":"    - name: {{key}} workaround"},{"line_number":71,"context_line":"      shell: |"},{"line_number":72,"context_line":"        {{ value.command | indent( width\u003d8) }}"},{"line_number":73,"context_line":"EOF"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"if [ ! -z $1 ]"}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"7faddb67_f5747f38","line":72,"range":{"start_line":72,"start_character":34,"end_line":72,"end_character":35},"in_reply_to":"7faddb67_cb0682ce","updated":"2019-08-27 10:17:09.000000000","message":"Done","commit_id":"0d8fc84710a0dd00f109bba09491d645e83b4ee1"},{"author":{"_account_id":8042,"name":"Jiří Stránský","email":"jistr@redhat.com","username":"jistr"},"change_message_id":"8beff3b6d4efdcf25e058899d85c4ad0c15dff9f","unresolved":false,"context_lines":[{"line_number":3,"context_line":"# Apply upgrade workarounds"},{"line_number":4,"context_line":"# Args:"},{"line_number":5,"context_line":"# If an argument is passed into the script, it will be passed as"},{"line_number":6,"context_line":"# the --limit option  when calling to ansible-playbook."},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"set -euo pipefail"},{"line_number":9,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":5,"id":"7faddb67_6efd1c6d","line":6,"updated":"2019-08-27 12:44:04.000000000","message":"And ansible_ssh_user will be needed too. I\u0027m beginning to wonder if positional args are good for this, or if we should add some basic argument parsing ( https://stackoverflow.com/a/14203146 ).","commit_id":"d62e35c48a4d29e21af602273fc4709a48320a0a"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"9ff53bbcf660ac70a8c4382ea950144d9a9de66f","unresolved":false,"context_lines":[{"line_number":3,"context_line":"# Apply upgrade workarounds"},{"line_number":4,"context_line":"# Args:"},{"line_number":5,"context_line":"# If an argument is passed into the script, it will be passed as"},{"line_number":6,"context_line":"# the --limit option  when calling to ansible-playbook."},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"set -euo pipefail"},{"line_number":9,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":5,"id":"7faddb67_5696794b","line":6,"in_reply_to":"7faddb67_6efd1c6d","updated":"2019-08-30 11:31:19.000000000","message":"Done and tested. Seems to work fine but some extra eyes on the new changes would be appreciated.","commit_id":"d62e35c48a4d29e21af602273fc4709a48320a0a"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"4279f6f22aa41813a13eb4be0f432e4e1700bca4","unresolved":false,"context_lines":[{"line_number":104,"context_line":"{% for bugs in workaround_var -%}"},{"line_number":105,"context_line":"{% for key, value in bugs.items() -%}"},{"line_number":106,"context_line":"echo {{ key }}"},{"line_number":107,"context_line":"{% if value.patch -%}"},{"line_number":108,"context_line":"apply_patch {{ value.basedir }} {{ value.id }}"},{"line_number":109,"context_line":"{% elif value.ansible_hosts is defined and  value.ansible_hosts !\u003d \u0027\u0027 -%}"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"[ -d $HOME/ansible_workarounds ] || mkdir $HOME/ansible_workarounds"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":6,"id":"3fa7e38b_4d4bd186","line":109,"range":{"start_line":107,"start_character":0,"end_line":109,"end_character":73},"updated":"2019-09-16 16:44:12.000000000","message":"This makes them mutually exclusive - is that intentional? Would there ever be a situation where we may want to patch something locally, then use ansible_patch to push whatever was patched out to all hosts? If so, then perhaps the elif should just be a new conditional.","commit_id":"a80073c48503fdbcbf15df93246d153215de9b7f"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"f98a334454cb7d10da02e477c5743223fde36d62","unresolved":false,"context_lines":[{"line_number":104,"context_line":"{% for bugs in workaround_var -%}"},{"line_number":105,"context_line":"{% for key, value in bugs.items() -%}"},{"line_number":106,"context_line":"echo {{ key }}"},{"line_number":107,"context_line":"{% if value.patch -%}"},{"line_number":108,"context_line":"apply_patch {{ value.basedir }} {{ value.id }}"},{"line_number":109,"context_line":"{% elif value.ansible_hosts is defined and  value.ansible_hosts !\u003d \u0027\u0027 -%}"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"[ -d $HOME/ansible_workarounds ] || mkdir $HOME/ansible_workarounds"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":6,"id":"3fa7e38b_32a8091e","line":109,"range":{"start_line":107,"start_character":0,"end_line":109,"end_character":73},"in_reply_to":"3fa7e38b_328fa9cd","updated":"2019-09-18 13:09:01.000000000","message":"OK, thanks for answering. Good to know.","commit_id":"a80073c48503fdbcbf15df93246d153215de9b7f"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"942209e3d346e45c2b0181c449324080f2f1adb8","unresolved":false,"context_lines":[{"line_number":104,"context_line":"{% for bugs in workaround_var -%}"},{"line_number":105,"context_line":"{% for key, value in bugs.items() -%}"},{"line_number":106,"context_line":"echo {{ key }}"},{"line_number":107,"context_line":"{% if value.patch -%}"},{"line_number":108,"context_line":"apply_patch {{ value.basedir }} {{ value.id }}"},{"line_number":109,"context_line":"{% elif value.ansible_hosts is defined and  value.ansible_hosts !\u003d \u0027\u0027 -%}"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"[ -d $HOME/ansible_workarounds ] || mkdir $HOME/ansible_workarounds"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":6,"id":"3fa7e38b_328fa9cd","line":109,"range":{"start_line":107,"start_character":0,"end_line":109,"end_character":73},"in_reply_to":"3fa7e38b_4d4bd186","updated":"2019-09-18 13:07:15.000000000","message":"I did it kind of intentionally, for a local application in the undercloud I would create one workaround entry (without ansible_hosts defined) and if you want to apply the same workaround in the overlcoud nodes you can create another one.  That\u0027s indeed the way we\u0027re doing it for OSP15. As we also defined sections in which this workarounds are applied (pre_undercloud_upgrade, pre_overcloud_upgrade, etc...) it really doesn\u0027t make sense to apply both locally and remotely in one workaround.","commit_id":"a80073c48503fdbcbf15df93246d153215de9b7f"}]}
