)]}'
{"playbooks/container-status.yaml":[{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"3ce4b6122b13ceaac7251cbb83a9ad4a1a8fdcff","unresolved":false,"context_lines":[{"line_number":7,"context_line":"        Detect failed containers and raise an error."},{"line_number":8,"context_line":"      groups:"},{"line_number":9,"context_line":"        - prep"},{"line_number":10,"context_line":"        - pre-deployment"},{"line_number":11,"context_line":"        - pre-upgrade"},{"line_number":12,"context_line":"        - post-deployment"},{"line_number":13,"context_line":"        - post-upgrade"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dfbec78f_ce62d83e","line":10,"updated":"2019-05-10 13:14:47.000000000","message":"I won\u0027t add this validations into the prep as we need at least an installed undercloud and a deployed overcloud if you want to run it on the Overcloud Hosts.","commit_id":"953d3e54784c8542e6fc845d8871a7e018f35d8d"}],"roles/container-status/tasks/main.yaml":[{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"6df3ef0600cac6765c6e30cbaa38ae8ec5212218","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"- name: Set container_cli fact from the inventory"},{"line_number":3,"context_line":"  set_fact:"},{"line_number":4,"context_line":"    container_cli: \"{{ hostvars[inventory_hostname].container_cli }}\""},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"- name: Get failed containers for podman"},{"line_number":7,"context_line":"  shell: \u003e"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dfbec78f_6ecc0c61","line":4,"updated":"2019-05-10 13:06:23.000000000","message":"This will only work for the Overcloud and will fail while playing the task for the Undercloud.\nThe tripleo-ansible-inventory contains only the container_cli used by the overcloud. For the Undercloud,\nthe information is coming from the undercloud.conf.","commit_id":"953d3e54784c8542e6fc845d8871a7e018f35d8d"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"3ce4b6122b13ceaac7251cbb83a9ad4a1a8fdcff","unresolved":false,"context_lines":[{"line_number":2,"context_line":"- name: Set container_cli fact from the inventory"},{"line_number":3,"context_line":"  set_fact:"},{"line_number":4,"context_line":"    container_cli: \"{{ hostvars[inventory_hostname].container_cli }}\""},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"- name: Get failed containers for podman"},{"line_number":7,"context_line":"  shell: \u003e"},{"line_number":8,"context_line":"    CLI\u003d{{ container_cli|default(\u0027podman\u0027, true) }}"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dfbec78f_ee655c46","line":5,"updated":"2019-05-10 13:14:47.000000000","message":"You could possibly use something like that [1] to determine if a Overcloud is deployed before to run it on the Overcloud Hosts.\n\n[1] - https://opendev.org/openstack/tripleo-validations/src/branch/master/roles/openshift-on-openstack/tasks/openshift-nw-requirements.yaml#L2-L13","commit_id":"953d3e54784c8542e6fc845d8871a7e018f35d8d"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"3e556beb262b2e5e374e818cc372b84088bb78ab","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"- name: Set container_cli fact from the inventory"},{"line_number":3,"context_line":"  set_fact:"},{"line_number":4,"context_line":"    container_cli: \"{{ hostvars[inventory_hostname].container_cli }}\""},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"- name: Get failed containers for podman"},{"line_number":7,"context_line":"  shell: \u003e"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"dfbec78f_bb866cb8","line":4,"updated":"2019-05-16 10:31:50.000000000","message":"As I said it will only work while running this on the Overcloud nodes, but not on the Undercloud because\nyou won\u0027t have any container_cli variable coming from the tripleo-ansible-inventory. For the Undercloud,\nyou will need to get this information from the undercloud.conf file.","commit_id":"898dc4fe834ea4b40af4d04a0816094cc4120fd1"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"3e556beb262b2e5e374e818cc372b84088bb78ab","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  set_fact:"},{"line_number":4,"context_line":"    container_cli: \"{{ hostvars[inventory_hostname].container_cli }}\""},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"- name: Get failed containers for podman"},{"line_number":7,"context_line":"  shell: \u003e"},{"line_number":8,"context_line":"    CLI\u003d{{ container_cli|default(\u0027podman\u0027, true) }}"},{"line_number":9,"context_line":"    {% raw %}"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"dfbec78f_5b9170f0","line":6,"updated":"2019-05-16 10:31:50.000000000","message":"I think you will need a \u0027become: True\u0027 here.","commit_id":"898dc4fe834ea4b40af4d04a0816094cc4120fd1"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"dd84b2087cb16040dd6c74e66056dba922f76709","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    container_cli: \"{{ hostvars[inventory_hostname].container_cli | default(\u0027\u0027, true) }}\""},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"- name: Set container_cli fact from undercloud.conf"},{"line_number":7,"context_line":"  when: container_cli is empty"},{"line_number":8,"context_line":"  block:"},{"line_number":9,"context_line":"    - name: Get the path of tripleo undercloud config file"},{"line_number":10,"context_line":"      become: true"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"5faad753_5ac11754","line":7,"updated":"2019-09-09 13:52:38.000000000","message":"The correct syntax here is \"container_cli|length \u003c 1\"","commit_id":"c33b613e7e965ec7ec2ab611863bbd95fb008be0"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"dd84b2087cb16040dd6c74e66056dba922f76709","unresolved":false,"context_lines":[{"line_number":14,"context_line":"    - name: Get container client from undercloud.conf"},{"line_number":15,"context_line":"      ini:"},{"line_number":16,"context_line":"        path: \"{{ tripleo_undercloud_conf_file }}\""},{"line_number":17,"context_line":"        section: \"DEFAULT\""},{"line_number":18,"context_line":"        key: \"container_cli\""},{"line_number":19,"context_line":"      register: container_cli"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":7,"id":"5faad753_fab563ef","line":17,"updated":"2019-09-09 13:52:38.000000000","message":"Should be unquoted","commit_id":"c33b613e7e965ec7ec2ab611863bbd95fb008be0"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"dd84b2087cb16040dd6c74e66056dba922f76709","unresolved":false,"context_lines":[{"line_number":15,"context_line":"      ini:"},{"line_number":16,"context_line":"        path: \"{{ tripleo_undercloud_conf_file }}\""},{"line_number":17,"context_line":"        section: \"DEFAULT\""},{"line_number":18,"context_line":"        key: \"container_cli\""},{"line_number":19,"context_line":"      register: container_cli"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: Get failed containers for podman"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"5faad753_1abb9fe2","line":18,"updated":"2019-09-09 13:52:38.000000000","message":"Here too","commit_id":"c33b613e7e965ec7ec2ab611863bbd95fb008be0"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"dd84b2087cb16040dd6c74e66056dba922f76709","unresolved":false,"context_lines":[{"line_number":22,"context_line":"  changed_when: false"},{"line_number":23,"context_line":"  become: true"},{"line_number":24,"context_line":"  shell: \u003e"},{"line_number":25,"context_line":"    CLI\u003d{{ container_cli|default(\u0027podman\u0027, true) }}"},{"line_number":26,"context_line":"    {% raw %}"},{"line_number":27,"context_line":"    $CLI ps -a --filter \u0027status\u003dexited\u0027 --format \u0027{{ .Names }} {{ .Status }}\u0027"},{"line_number":28,"context_line":"    {% endraw %}"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"5faad753_bacfeb7d","line":25,"updated":"2019-09-09 13:52:38.000000000","message":"Here it should be container_cli.value if it comes from the undercloud.conf file","commit_id":"c33b613e7e965ec7ec2ab611863bbd95fb008be0"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"b70f99b921df7b9fdd31c4e6508e4276b14da48c","unresolved":false,"context_lines":[{"line_number":41,"context_line":"- name: Fail if we detect failed containers"},{"line_number":42,"context_line":"  fail:"},{"line_number":43,"context_line":"    msg: \"Failed container detected: {{ item }}.\""},{"line_number":44,"context_line":"  when: item is match(\".* Exited \\(0\\) .* ago\")"},{"line_number":45,"context_line":"  loop: \"{{ failed_containers.stdout_lines }}\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3fa7e38b_1cbcb7b9","line":44,"updated":"2019-09-23 12:09:27.000000000","message":"why would we mark containers exiting with 0 as failing? I don\u0027t understand.","commit_id":"baab95eda03a1346b5bf5f084aa11c95d5397ac7"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"5ca026a3ab41fc7889a46275efc23e9597aa78a3","unresolved":false,"context_lines":[{"line_number":41,"context_line":"- name: Fail if we detect failed containers"},{"line_number":42,"context_line":"  fail:"},{"line_number":43,"context_line":"    msg: \"Failed container detected: {{ item }}.\""},{"line_number":44,"context_line":"  when: item is match(\".* Exited \\(0\\) .* ago\")"},{"line_number":45,"context_line":"  loop: \"{{ failed_containers.stdout_lines }}\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3fa7e38b_e2281187","line":44,"in_reply_to":"3fa7e38b_1cbcb7b9","updated":"2019-09-23 15:19:12.000000000","message":"good point. seems like this would be normal output for our short lived containers (inits, db sync, etc).","commit_id":"baab95eda03a1346b5bf5f084aa11c95d5397ac7"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"a314c859503545f76c83f6772602ed9b49bbe2d1","unresolved":false,"context_lines":[{"line_number":41,"context_line":"- name: Fail if we detect failed containers"},{"line_number":42,"context_line":"  fail:"},{"line_number":43,"context_line":"    msg: \"Failed container detected: {{ item }}.\""},{"line_number":44,"context_line":"  when: item is match(\".* Exited \\(0\\) .* ago\")"},{"line_number":45,"context_line":"  loop: \"{{ failed_containers.stdout_lines }}\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3fa7e38b_83db587a","line":44,"in_reply_to":"3fa7e38b_68fb9b78","updated":"2019-09-24 05:40:16.000000000","message":"hm, did I miss a \"not\" in that condition? damn.\n\nRegarding \"using systemd\": yes, but no. There\u0027s already another check that ensures systemd status. This one ensures at the lowest possible level we don\u0027t have failed containers, even for the \"short-lived\" like initdb and boostrap. Systemd wouldn\u0027t know about them.","commit_id":"baab95eda03a1346b5bf5f084aa11c95d5397ac7"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"556079a1e3829a47cd5e1844eae105ccd2516331","unresolved":false,"context_lines":[{"line_number":41,"context_line":"- name: Fail if we detect failed containers"},{"line_number":42,"context_line":"  fail:"},{"line_number":43,"context_line":"    msg: \"Failed container detected: {{ item }}.\""},{"line_number":44,"context_line":"  when: item is match(\".* Exited \\(0\\) .* ago\")"},{"line_number":45,"context_line":"  loop: \"{{ failed_containers.stdout_lines }}\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3fa7e38b_63c73c98","line":44,"in_reply_to":"3fa7e38b_83db587a","updated":"2019-09-24 05:45:51.000000000","message":"pfff... had the \"not\" locally, probably missed to `git review\u0027 it...","commit_id":"baab95eda03a1346b5bf5f084aa11c95d5397ac7"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"5011042842cb321c811135af949bb88c9b3251d9","unresolved":false,"context_lines":[{"line_number":41,"context_line":"- name: Fail if we detect failed containers"},{"line_number":42,"context_line":"  fail:"},{"line_number":43,"context_line":"    msg: \"Failed container detected: {{ item }}.\""},{"line_number":44,"context_line":"  when: item is match(\".* Exited \\(0\\) .* ago\")"},{"line_number":45,"context_line":"  loop: \"{{ failed_containers.stdout_lines }}\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3fa7e38b_68fb9b78","line":44,"in_reply_to":"3fa7e38b_e2281187","updated":"2019-09-24 04:04:51.000000000","message":"to me, we should use systemd to get the container status. This is the most reliable option that we have when podman is used.","commit_id":"baab95eda03a1346b5bf5f084aa11c95d5397ac7"}]}
