)]}'
{"doc/source/kubernetes-roles.rst":[{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"7a0c9d69f34872ecb477b190b37dcb547b0cf8e2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Kubernetes Roles"},{"line_number":2,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":".. zuul:autorole:: wait-for-pods"}],"source_content_type":"text/x-rst","patch_set":3,"id":"df33271e_7da9db79","line":4,"range":{"start_line":4,"start_character":0,"end_line":4,"end_character":32},"updated":"2020-03-23 20:18:51.000000000","message":"Add another line above this similar to this\n\n  ..zuul:autorole:: collect-kubernetes-logs","commit_id":"84f2951ef553b49a312afcbaa745be418e9c1a9b"}],"roles/collect-kubernetes-logs/tasks/main.yaml":[{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"5250d3262b7f0c5aea919a5706047da6eef02ec9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"- name: List pods"},{"line_number":2,"context_line":"  shell: \"kubectl get pod"},{"line_number":3,"context_line":"  # We can\u0027t use the default \u0027item\u0027 because roles may be used in"},{"line_number":4,"context_line":"  # higher level loops and \u0027item\u0027 could conflict in that case.s -o\u003dcustom-columns\u003dNAME:.metadata.name | awk \u0027NR !\u003d 1 {print $1}\u0027\""},{"line_number":5,"context_line":"  register: podlist"},{"line_number":6,"context_line":"  ignore_errors: true"},{"line_number":7,"context_line":"    "}],"source_content_type":"text/x-yaml","patch_set":1,"id":"df33271e_1d57ef04","line":4,"range":{"start_line":4,"start_character":67,"end_line":4,"end_character":73},"updated":"2020-03-23 19:49:25.000000000","message":"I think this should be part for the Shell command. There seems to be missing quotes too.  Also do we really need that?  Could we just use -oname and use command instead of shell then","commit_id":"4fe30bc0517da08211da37a48e26526040db995a"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"5250d3262b7f0c5aea919a5706047da6eef02ec9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"  # higher level loops and \u0027item\u0027 could conflict in that case.s -o\u003dcustom-columns\u003dNAME:.metadata.name | awk \u0027NR !\u003d 1 {print $1}\u0027\""},{"line_number":5,"context_line":"  register: podlist"},{"line_number":6,"context_line":"  ignore_errors: true"},{"line_number":7,"context_line":"    "},{"line_number":8,"context_line":"- name: Create pod describe dir"},{"line_number":9,"context_line":"  file:"},{"line_number":10,"context_line":"    path: \"{{ ansible_user_dir }}/zuul-output/logs/pods\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"df33271e_9d4adf52","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":4},"updated":"2020-03-23 19:49:25.000000000","message":"Let’s get rid of this white space","commit_id":"4fe30bc0517da08211da37a48e26526040db995a"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"5250d3262b7f0c5aea919a5706047da6eef02ec9","unresolved":false,"context_lines":[{"line_number":9,"context_line":"  file:"},{"line_number":10,"context_line":"    path: \"{{ ansible_user_dir }}/zuul-output/logs/pods\""},{"line_number":11,"context_line":"    state: directory"},{"line_number":12,"context_line":"    "},{"line_number":13,"context_line":"- name: Save pod descriptions"},{"line_number":14,"context_line":"  loop: \"{{ podlist.stdout_lines | default([]) }}\""},{"line_number":15,"context_line":"  loop_control:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"df33271e_dd75879a","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":4},"updated":"2020-03-23 19:49:25.000000000","message":"Clefs clean this up too","commit_id":"4fe30bc0517da08211da37a48e26526040db995a"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"5250d3262b7f0c5aea919a5706047da6eef02ec9","unresolved":false,"context_lines":[{"line_number":14,"context_line":"  loop: \"{{ podlist.stdout_lines | default([]) }}\""},{"line_number":15,"context_line":"  loop_control:"},{"line_number":16,"context_line":"    loop_var: pod_name"},{"line_number":17,"context_line":"  shell: \"kubectl describe po {{ pod_name }} \u0026\u003e {{ ansible_user_dir }}/zuul-output/logs/pods/{{ pod_name }}.txt\""},{"line_number":18,"context_line":"  args:"},{"line_number":19,"context_line":"    executable: /bin/bash"},{"line_number":20,"context_line":"  ignore_errors: true"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"df33271e_dd9aa7c3","line":17,"range":{"start_line":17,"start_character":27,"end_line":17,"end_character":29},"updated":"2020-03-23 19:49:25.000000000","message":"If you use -oname it already include the pod/ prefix so we can drop it","commit_id":"4fe30bc0517da08211da37a48e26526040db995a"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"5250d3262b7f0c5aea919a5706047da6eef02ec9","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    dest: \"{{ ansible_user_dir }}/zuul-output/logs/pods\""},{"line_number":25,"context_line":"    mode: u\u003drwX,g\u003drX,o\u003drX"},{"line_number":26,"context_line":"    recurse: yes"},{"line_number":27,"context_line":"    "},{"line_number":28,"context_line":"- name: Create kubelet log dir"},{"line_number":29,"context_line":"  file:"},{"line_number":30,"context_line":"    path: \"{{ ansible_user_dir }}/zuul-output/logs/kubelet_logs\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"df33271e_fd820b4f","line":27,"updated":"2020-03-23 19:49:25.000000000","message":"Let’s remove this white space too","commit_id":"4fe30bc0517da08211da37a48e26526040db995a"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"5250d3262b7f0c5aea919a5706047da6eef02ec9","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    "},{"line_number":28,"context_line":"- name: Create kubelet log dir"},{"line_number":29,"context_line":"  file:"},{"line_number":30,"context_line":"    path: \"{{ ansible_user_dir }}/zuul-output/logs/kubelet_logs\""},{"line_number":31,"context_line":"    state: directory"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"- name: Save kubelet logs"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"df33271e_dd83c755","line":30,"range":{"start_line":30,"start_character":51,"end_line":30,"end_character":63},"updated":"2020-03-23 19:49:25.000000000","message":"Let’s replace this by kubelet","commit_id":"4fe30bc0517da08211da37a48e26526040db995a"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"5250d3262b7f0c5aea919a5706047da6eef02ec9","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    state: directory"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"- name: Save kubelet logs"},{"line_number":34,"context_line":"  shell: \"journalctl -u kubelet \u0026\u003e {{ ansible_user_dir }}/zuul-output/logs/kubelet_logs/kubelet.txt\""},{"line_number":35,"context_line":"  args:"},{"line_number":36,"context_line":"    executable: /bin/bash"},{"line_number":37,"context_line":"  ignore_errors: true"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"df33271e_bd888371","line":34,"range":{"start_line":34,"start_character":75,"end_line":34,"end_character":87},"updated":"2020-03-23 19:49:25.000000000","message":"Same here","commit_id":"4fe30bc0517da08211da37a48e26526040db995a"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"5250d3262b7f0c5aea919a5706047da6eef02ec9","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"- name: Open kubelet logs permissions"},{"line_number":41,"context_line":"  file:"},{"line_number":42,"context_line":"    dest: \"{{ ansible_user_dir }}/zuul-output/logs/kubelet_logs\""},{"line_number":43,"context_line":"    mode: u\u003drwX,g\u003drX,o\u003drX"},{"line_number":44,"context_line":"    recurse: yes"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"df33271e_1d7ecf6a","line":42,"range":{"start_line":42,"start_character":51,"end_line":42,"end_character":63},"updated":"2020-03-23 19:49:25.000000000","message":"Same here","commit_id":"4fe30bc0517da08211da37a48e26526040db995a"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"7a0c9d69f34872ecb477b190b37dcb547b0cf8e2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"- name: List pods"},{"line_number":2,"context_line":"  shell: \"kubectl get pod -o\u003dcustom-columns\u003dNAME:.metadata.name | awk \u0027NR !\u003d 1 {print $1}\u0027\""},{"line_number":3,"context_line":"  register: podlist"},{"line_number":4,"context_line":"  ignore_errors: true"},{"line_number":5,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"df33271e_5d7df71a","line":2,"range":{"start_line":2,"start_character":2,"end_line":2,"end_character":7},"updated":"2020-03-23 20:18:51.000000000","message":"if we\u0027re no longer doing shell pipes, we can use ``command``","commit_id":"84f2951ef553b49a312afcbaa745be418e9c1a9b"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"7a0c9d69f34872ecb477b190b37dcb547b0cf8e2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"- name: List pods"},{"line_number":2,"context_line":"  shell: \"kubectl get pod -o\u003dcustom-columns\u003dNAME:.metadata.name | awk \u0027NR !\u003d 1 {print $1}\u0027\""},{"line_number":3,"context_line":"  register: podlist"},{"line_number":4,"context_line":"  ignore_errors: true"},{"line_number":5,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"df33271e_1dab6f89","line":2,"range":{"start_line":2,"start_character":26,"end_line":2,"end_character":90},"updated":"2020-03-23 20:18:51.000000000","message":"let\u0027s replace this by this, which is the same thing but avoids an awk, which is just overall cleaner\n\n  kubectl get pod --no-headers -o custom-columns\u003d\u0027:metadata.name\u0027","commit_id":"84f2951ef553b49a312afcbaa745be418e9c1a9b"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"f02e59080412b4fa1c57eaf14f79e5f0e79d912f","unresolved":false,"context_lines":[{"line_number":12,"context_line":"  loop: \"{{ podlist.stdout_lines | default([]) }}\""},{"line_number":13,"context_line":"  loop_control:"},{"line_number":14,"context_line":"    loop_var: pod_name"},{"line_number":15,"context_line":"  shell: \"kubectl describe po {{ pod_name }} \u0026\u003e {{ ansible_user_dir }}/zuul-output/logs/pods/{{ pod_name }}.txt\""},{"line_number":16,"context_line":"  args:"},{"line_number":17,"context_line":"    executable: /bin/bash"},{"line_number":18,"context_line":"  ignore_errors: true"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"df33271e_1dea4f74","line":15,"range":{"start_line":15,"start_character":45,"end_line":15,"end_character":47},"updated":"2020-03-23 20:34:35.000000000","message":"Note if you didn\u0027t use this but instead did \u003e $file 2\u003e\u00261 then you wouldn\u0027t need to specify bash as the shell. Not an issue though.","commit_id":"c20150566a55e205cfb010c64329e01af9c17ca3"},{"author":{"_account_id":31746,"name":"Oleksandr Kozachenko","email":"okozachenko1203@gmail.com","username":"okozachenko"},"change_message_id":"512c4f4a12d0a8d71b086a501aef07833abdac30","unresolved":false,"context_lines":[{"line_number":12,"context_line":"  loop: \"{{ podlist.stdout_lines | default([]) }}\""},{"line_number":13,"context_line":"  loop_control:"},{"line_number":14,"context_line":"    loop_var: pod_name"},{"line_number":15,"context_line":"  shell: \"kubectl describe po {{ pod_name }} \u0026\u003e {{ ansible_user_dir }}/zuul-output/logs/pods/{{ pod_name }}.txt\""},{"line_number":16,"context_line":"  args:"},{"line_number":17,"context_line":"    executable: /bin/bash"},{"line_number":18,"context_line":"  ignore_errors: true"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"df33271e_c02c7c9b","line":15,"range":{"start_line":15,"start_character":45,"end_line":15,"end_character":47},"in_reply_to":"df33271e_1dea4f74","updated":"2020-03-23 20:46:41.000000000","message":"I agree","commit_id":"c20150566a55e205cfb010c64329e01af9c17ca3"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"f02e59080412b4fa1c57eaf14f79e5f0e79d912f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"  args:"},{"line_number":34,"context_line":"    executable: /bin/bash"},{"line_number":35,"context_line":"  ignore_errors: true"},{"line_number":36,"context_line":"  become: yes"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"- name: Open kubelet logs permissions"},{"line_number":39,"context_line":"  file:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"df33271e_dd9467eb","line":36,"updated":"2020-03-23 20:34:35.000000000","message":"Might be worth checking if we need to escalate privs for this. Many services don\u0027t actually need root to print their logs (I don\u0027t know how systemd differentiates though).","commit_id":"c20150566a55e205cfb010c64329e01af9c17ca3"},{"author":{"_account_id":31746,"name":"Oleksandr Kozachenko","email":"okozachenko1203@gmail.com","username":"okozachenko"},"change_message_id":"512c4f4a12d0a8d71b086a501aef07833abdac30","unresolved":false,"context_lines":[{"line_number":33,"context_line":"  args:"},{"line_number":34,"context_line":"    executable: /bin/bash"},{"line_number":35,"context_line":"  ignore_errors: true"},{"line_number":36,"context_line":"  become: yes"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"- name: Open kubelet logs permissions"},{"line_number":39,"context_line":"  file:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"df33271e_8019d47a","line":36,"in_reply_to":"df33271e_dd9467eb","updated":"2020-03-23 20:46:41.000000000","message":"The \"journalctl\" commands requires the root privilege.","commit_id":"c20150566a55e205cfb010c64329e01af9c17ca3"}]}
