)]}'
{"deployment/ovn/ovn-controller-container-puppet.yaml":[{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"b853002eadd3427de8a17eec1d50849b710869b9","unresolved":true,"context_lines":[{"line_number":326,"context_line":"          when:"},{"line_number":327,"context_line":"            - step|int \u003d\u003d 1"},{"line_number":328,"context_line":"          block:"},{"line_number":329,"context_line":"            - name: Check if ovn_controller is running in docker"},{"line_number":330,"context_line":"              command: docker ps | grep ovn_controller"},{"line_number":331,"context_line":"              register: ovn_controller_running"},{"line_number":332,"context_line":"              failed_when: false"},{"line_number":333,"context_line":"              changed_when: false"},{"line_number":334,"context_line":"            - name: Disable autorestart on ovn_controller container"},{"line_number":335,"context_line":"              command:  docker update --restart\u003dno ovn_controller"},{"line_number":336,"context_line":"              when: ovn_controller_running.rc \u003d\u003d 0"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"de616775_6e23d1df","line":333,"range":{"start_line":329,"start_character":0,"end_line":333,"end_character":33},"updated":"2021-01-28 11:48:47.000000000","message":"Won\u0027t this always be the case if we\u0027re on RHEL7, so we could move the subsequent tasks into a block after line 340-348 (Gather missing facts) which only runs on the same conditions as lines 358/359.\n\nIn fact it should probably be after the step 0 block which does the hybrid state switch just to ensure that it\u0027s more intuitively ordered in this file.","commit_id":"a0b61ddf8b9c9e355e4f00c508e6a6f6269601e2"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"42aec53e5294d94d6574ff02f617796faae7b5f6","unresolved":true,"context_lines":[{"line_number":327,"context_line":"          when:"},{"line_number":328,"context_line":"            - step|int \u003d\u003d 1"},{"line_number":329,"context_line":"          block:"},{"line_number":330,"context_line":"            - name: Check ovn_controller is running in docker"},{"line_number":331,"context_line":"              shell: |"},{"line_number":332,"context_line":"                docker ps | grep ovn_controller"},{"line_number":333,"context_line":"              register: ovn_controller_running"},{"line_number":334,"context_line":"              failed_when: false"},{"line_number":335,"context_line":"            - name: Disable autorestart on ovn_controller container"},{"line_number":336,"context_line":"              command: docker update --restart\u003dno ovn_controller"},{"line_number":337,"context_line":"              when: ovn_controller_running.rc \u003d\u003d 0"},{"line_number":338,"context_line":"            - name: Tell ovn_controller to clean up and stop"},{"line_number":339,"context_line":"              shell: |"},{"line_number":340,"context_line":"                docker exec -u root ovn_controller bash -c \"if [ -f /usr/bin/ovn-appctl ] ; then ovn-appctl -t ovn-controller exit ; else ovs-appctl -t ovn-controller exit ; fi\""},{"line_number":341,"context_line":"              when: ovn_controller_running.rc \u003d\u003d 0"},{"line_number":342,"context_line":"        # nova_hybrid_state"},{"line_number":343,"context_line":"        - name: Gather missing facts"},{"line_number":344,"context_line":"          setup:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"7f24813d_c746c07b","line":341,"range":{"start_line":330,"start_character":0,"end_line":341,"end_character":50},"updated":"2021-02-02 11:43:07.000000000","message":"This can be done quicker in a single task, and will be properly idempotent too:\n\n- name: If ovn controller is present, drain it and exit it\n  shell: |-\n    set -o pipefail\n    exit_code\u003d0\n    if docker ps | grep ovn_controller; then\n      docker update --restart\u003dno ovn_controller\n      docker exec -u root ovn_controller bash -c \"if [ -f /usr/bin/ovn-appctl ] ; then ovn-appctl -t ovn-controller exit ; else ovs-appctl -t ovn-controller exit ; fi\"\n      exit_code\u003d3\n    fi\n    exit ${exit_code}\n  register: _ovn_container_stop\n  changed_when: _ovn_container_stop.rc \u003d\u003d 3\n  failed_when: _ovn_container_stop.rc not in [0,3]","commit_id":"379acbb9d7da2d83b7b1eb71e3a0915e288472d9"}]}
