)]}'
{"tasks/container_create.yml":[{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"7c838ccb372646d8d2ca0c15dc912430e6fa7d6b","unresolved":false,"context_lines":[{"line_number":172,"context_line":"  with_dict: \"{{ container_networks | default({}) }}\""},{"line_number":173,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":174,"context_line":"  tags:"},{"line_number":175,"context_line":"    - lxc-container-setup"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"- name: Run container setup script"},{"line_number":178,"context_line":"  command: \u003e"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"9ad45d7e_4a596f34","line":175,"updated":"2016-08-11 20:15:32.000000000","message":"As a point of interest - showing an alternative way to transfer files into the container without going through /proc: https://lists.linuxcontainers.org/pipermail/lxc-users/2015-April/009002.html","commit_id":"2d452894457f15d519386bfd6dd192f54269edae"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"cf3f6526c1d10690d793d25b8f27f683d9a4a6a4","unresolved":false,"context_lines":[{"line_number":228,"context_line":"  tags:"},{"line_number":229,"context_line":"    - lxc-container-setup"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"- name: LXC host config for container"},{"line_number":232,"context_line":"  template:"},{"line_number":233,"context_line":"    src: \"container-setup.sh.j2\""},{"line_number":234,"context_line":"    dest: \"/proc/{{ container_pid.stdout }}/root/opt/container-setup.sh\""}],"source_content_type":"text/x-yaml","patch_set":18,"id":"7a8ec9b2_0b7d146e","line":231,"range":{"start_line":231,"start_character":8,"end_line":231,"end_character":37},"updated":"2016-09-15 00:05:02.000000000","message":"Place/Drop container setup script?\n\nThe current name makes it sound like it\u0027s doing the host config, which it isn\u0027t.\n\nThe same with the above two tasks.","commit_id":"19afbc760743a014c77e4282ef62a08984182abf"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"bec896d99fbf6289ddd2197468e97e554563db9d","unresolved":false,"context_lines":[{"line_number":228,"context_line":"  tags:"},{"line_number":229,"context_line":"    - lxc-container-setup"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"- name: LXC host config for container"},{"line_number":232,"context_line":"  template:"},{"line_number":233,"context_line":"    src: \"container-setup.sh.j2\""},{"line_number":234,"context_line":"    dest: \"/proc/{{ container_pid.stdout }}/root/opt/container-setup.sh\""}],"source_content_type":"text/x-yaml","patch_set":18,"id":"7a8ec9b2_6ec0667d","line":231,"range":{"start_line":231,"start_character":8,"end_line":231,"end_character":37},"in_reply_to":"7a8ec9b2_0b7d146e","updated":"2016-09-15 00:36:46.000000000","message":"Done","commit_id":"19afbc760743a014c77e4282ef62a08984182abf"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"cf3f6526c1d10690d793d25b8f27f683d9a4a6a4","unresolved":false,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"- name: Run container setup script"},{"line_number":244,"context_line":"  command: \u003e"},{"line_number":245,"context_line":"    lxc-attach --name \"{{ inventory_hostname }}\" -- /opt/container-setup.sh"},{"line_number":246,"context_line":"  register: container_setup"},{"line_number":247,"context_line":"  changed_when: false"},{"line_number":248,"context_line":"  failed_when: container_setup.rc !\u003d 0"}],"source_content_type":"text/x-yaml","patch_set":18,"id":"7a8ec9b2_ab5ee00f","line":245,"range":{"start_line":245,"start_character":4,"end_line":245,"end_character":75},"updated":"2016-09-15 00:05:02.000000000","message":"Not sure how much value it would add, but we should do it for consistency - add:\n\n    --logfile {{ lxc_container_log_path }}/lxc-{{ inventory_hostname }}.log\n    --logpriority {{ (debug | bool) | ternary(\u0027DEBUG\u0027, \u0027INFO\u0027) }}","commit_id":"19afbc760743a014c77e4282ef62a08984182abf"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"bec896d99fbf6289ddd2197468e97e554563db9d","unresolved":false,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"- name: Run container setup script"},{"line_number":244,"context_line":"  command: \u003e"},{"line_number":245,"context_line":"    lxc-attach --name \"{{ inventory_hostname }}\" -- /opt/container-setup.sh"},{"line_number":246,"context_line":"  register: container_setup"},{"line_number":247,"context_line":"  changed_when: false"},{"line_number":248,"context_line":"  failed_when: container_setup.rc !\u003d 0"}],"source_content_type":"text/x-yaml","patch_set":18,"id":"7a8ec9b2_6e47861d","line":245,"range":{"start_line":245,"start_character":4,"end_line":245,"end_character":75},"in_reply_to":"7a8ec9b2_ab5ee00f","updated":"2016-09-15 00:36:46.000000000","message":"Done","commit_id":"19afbc760743a014c77e4282ef62a08984182abf"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"cad487fbb3e50c1383abfebd8f9ed858883ab0f0","unresolved":false,"context_lines":[{"line_number":252,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":253,"context_line":"  register: container_setup"},{"line_number":254,"context_line":"  until: container_setup|success"},{"line_number":255,"context_line":"  retries: 5"},{"line_number":256,"context_line":"  delay: 10"},{"line_number":257,"context_line":"  tags:"},{"line_number":258,"context_line":"    - lxc-container-setup"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"7a8ec9b2_c105cbc2","line":255,"updated":"2016-09-15 01:15:17.000000000","message":"are the retries really necessary WRT lxc_container_commands?","commit_id":"a7c200457fd5fc6c5b9d666087289094e957ced1"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"3948808b90c6ce87b8961ebcf28c8a1362c251bf","unresolved":false,"context_lines":[{"line_number":252,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":253,"context_line":"  register: container_setup"},{"line_number":254,"context_line":"  until: container_setup|success"},{"line_number":255,"context_line":"  retries: 5"},{"line_number":256,"context_line":"  delay: 10"},{"line_number":257,"context_line":"  tags:"},{"line_number":258,"context_line":"    - lxc-container-setup"}],"source_content_type":"text/x-yaml","patch_set":20,"id":"7a8ec9b2_01d253d2","line":255,"in_reply_to":"7a8ec9b2_c105cbc2","updated":"2016-09-15 01:36:35.000000000","message":"no, they were added for debug purposes. I will remove them. good catch.","commit_id":"a7c200457fd5fc6c5b9d666087289094e957ced1"},{"author":{"_account_id":14805,"name":"Jimmy McCrory","email":"jimmy.mccrory@gmail.com","username":"jimmy-mccrory"},"change_message_id":"52bb97f9dc5fba33bbce479f6d039cc8577b6847","unresolved":false,"context_lines":[{"line_number":216,"context_line":"- name: Drop container network file (routes)"},{"line_number":217,"context_line":"  template:"},{"line_number":218,"context_line":"    src: \"{{ lxc_container_interface }}\""},{"line_number":219,"context_line":"    dest: \"/proc/{{ container_pid.stdout }}/root{{ lxc_container_interface_target }}\""},{"line_number":220,"context_line":"    owner: \"root\""},{"line_number":221,"context_line":"    group: \"root\""},{"line_number":222,"context_line":"    mode: \"0644\""}],"source_content_type":"text/x-yaml","patch_set":21,"id":"7a8ec9b2_a41c4dc2","line":219,"range":{"start_line":219,"start_character":51,"end_line":219,"end_character":81},"updated":"2016-09-15 02:29:33.000000000","message":"Should this be lxc_container_default_route_interfaces ?","commit_id":"c080f466be681e4fa890b2a4b56a095daf13edf0"}],"templates/container-setup.sh.j2":[{"author":{"_account_id":2799,"name":"Andy McCrae","email":"andy.mccrae@googlemail.com","username":"andrew-mccrae"},"change_message_id":"479b779e55a89636de3190294815c12eaed4f24e","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"{% if container_networks is defined and container_networks %}"},{"line_number":14,"context_line":"{%   for item in container_networks.iteritems() %}"},{"line_number":15,"context_line":"echo -e \u0027{{ lxc_container_interface }}\u0027 | tee {{ lxc_container_interface_target }}"},{"line_number":16,"context_line":"{%     if item.value is defined %}"},{"line_number":17,"context_line":"{%       if item.value.static_routes is defined %}"},{"line_number":18,"context_line":"echo -e \u0027{{ lxc_container_default_route_interfaces.route_setup }}\u0027 | tee {{ lxc_container_default_route_interfaces.route_file }}"}],"source_content_type":"text/x-jinja2","patch_set":6,"id":"9ad45d7e_f7ba8c09","line":15,"range":{"start_line":15,"start_character":12,"end_line":15,"end_character":35},"updated":"2016-08-12 18:16:13.000000000","message":"In my testing this doesn\u0027t re-evaluate for each loop meaning only the last additional network is added (e.g. for neutron hosts it\u0027ll be the br-vlan interface, for cinder-api it\u0027ll be br-storage).\n\nThis causes failures, the script that gets generated just has the same interface x times (where x is the expected number of interfaces).\n\ne.g:\n\n#!/usr/bin/env bash\nset -ev\n\n# Generate the lxc container create prep commands\n\n\n\necho -e \u0027### start generated network for [ eth11 ] ###\nauto eth11\niface eth11 inet manual\n### end generated network for [ eth11 ] ###\n\u0027 | tee /etc/network/interfaces.d/eth11.cfg\necho -e \u0027### start generated network for [ eth11 ] ###\nauto eth11\niface eth11 inet manual\n### end generated network for [ eth11 ] ###\n\u0027 | tee /etc/network/interfaces.d/eth11.cfg\necho -e \u0027### start generated network for [ eth11 ] ###\nauto eth11\niface eth11 inet manual\n### end generated network for [ eth11 ] ###\n\u0027 | tee /etc/network/interfaces.d/eth11.cfg\necho -e \u0027### start generated network for [ eth11 ] ###\nauto eth11\niface eth11 inet manual\n### end generated network for [ eth11 ] ###\n\u0027 | tee /etc/network/interfaces.d/eth11.cfg","commit_id":"707e6b7a7613130c2da7a7f21779caf03d19bb4a"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"cf3f6526c1d10690d793d25b8f27f683d9a4a6a4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"# Generate the lxc container create prep commands"},{"line_number":5,"context_line":"{{ lxc_container_commands }}"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"{% for item in lxc_container_bind_mounts %}"},{"line_number":8,"context_line":"{%   if item[\u0027container_directory\u0027] is defined %}"},{"line_number":9,"context_line":"# Create dir \"{{ item[\u0027container_directory\u0027] }}\""},{"line_number":10,"context_line":"mkdir -p \"{{ item[\u0027container_directory\u0027] }}\""}],"source_content_type":"text/x-jinja2","patch_set":18,"id":"7a8ec9b2_4b4c7c42","line":7,"range":{"start_line":7,"start_character":15,"end_line":7,"end_character":40},"updated":"2016-09-15 00:05:02.000000000","message":"This should be:\n\nlxc_container_default_bind_mounts | union(lxc_container_bind_mounts)","commit_id":"19afbc760743a014c77e4282ef62a08984182abf"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"cf3f6526c1d10690d793d25b8f27f683d9a4a6a4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"# Generate the lxc container create prep commands"},{"line_number":5,"context_line":"{{ lxc_container_commands }}"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"{% for item in lxc_container_bind_mounts %}"},{"line_number":8,"context_line":"{%   if item[\u0027container_directory\u0027] is defined %}"},{"line_number":9,"context_line":"# Create dir \"{{ item[\u0027container_directory\u0027] }}\""},{"line_number":10,"context_line":"mkdir -p \"{{ item[\u0027container_directory\u0027] }}\""}],"source_content_type":"text/x-jinja2","patch_set":18,"id":"7a8ec9b2_8b5684d0","line":7,"range":{"start_line":7,"start_character":15,"end_line":7,"end_character":40},"updated":"2016-09-15 00:05:02.000000000","message":"This should be:\n\nlxc_container_default_bind_mounts | union(lxc_container_bind_mounts)","commit_id":"19afbc760743a014c77e4282ef62a08984182abf"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"bec896d99fbf6289ddd2197468e97e554563db9d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"# Generate the lxc container create prep commands"},{"line_number":5,"context_line":"{{ lxc_container_commands }}"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"{% for item in lxc_container_bind_mounts %}"},{"line_number":8,"context_line":"{%   if item[\u0027container_directory\u0027] is defined %}"},{"line_number":9,"context_line":"# Create dir \"{{ item[\u0027container_directory\u0027] }}\""},{"line_number":10,"context_line":"mkdir -p \"{{ item[\u0027container_directory\u0027] }}\""}],"source_content_type":"text/x-jinja2","patch_set":18,"id":"7a8ec9b2_4e73aa80","line":7,"range":{"start_line":7,"start_character":15,"end_line":7,"end_character":40},"in_reply_to":"7a8ec9b2_4b4c7c42","updated":"2016-09-15 00:36:46.000000000","message":"Done","commit_id":"19afbc760743a014c77e4282ef62a08984182abf"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"cad487fbb3e50c1383abfebd8f9ed858883ab0f0","unresolved":false,"context_lines":[{"line_number":2,"context_line":"set -ev"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# Generate the lxc container create prep commands"},{"line_number":5,"context_line":"{{ lxc_container_commands }}"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"{% for item in lxc_container_default_bind_mounts | union(lxc_container_bind_mounts) %}"},{"line_number":8,"context_line":"{%   if item[\u0027container_directory\u0027] is defined %}"}],"source_content_type":"text/x-jinja2","patch_set":20,"id":"7a8ec9b2_e161e7a9","line":5,"updated":"2016-09-15 01:15:17.000000000","message":"anything idempotent in these is potentially problematic since the task has retries on it.","commit_id":"a7c200457fd5fc6c5b9d666087289094e957ced1"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"3948808b90c6ce87b8961ebcf28c8a1362c251bf","unresolved":false,"context_lines":[{"line_number":2,"context_line":"set -ev"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# Generate the lxc container create prep commands"},{"line_number":5,"context_line":"{{ lxc_container_commands }}"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"{% for item in lxc_container_default_bind_mounts | union(lxc_container_bind_mounts) %}"},{"line_number":8,"context_line":"{%   if item[\u0027container_directory\u0027] is defined %}"}],"source_content_type":"text/x-jinja2","patch_set":20,"id":"7a8ec9b2_e1f1e76b","line":5,"in_reply_to":"7a8ec9b2_e161e7a9","updated":"2016-09-15 01:36:35.000000000","message":"fixed as retries have been removed.","commit_id":"a7c200457fd5fc6c5b9d666087289094e957ced1"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"ea0b52d8a3b689d568306a406e1ca5098063293a","unresolved":false,"context_lines":[{"line_number":2,"context_line":"set -ev"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# Generate the lxc container create prep commands"},{"line_number":5,"context_line":"{{ lxc_container_commands }}"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"{% for item in lxc_container_default_bind_mounts | union(lxc_container_bind_mounts) %}"},{"line_number":8,"context_line":"{%   if item[\u0027container_directory\u0027] is defined %}"}],"source_content_type":"text/x-jinja2","patch_set":20,"id":"7a8ec9b2_0127b364","line":5,"in_reply_to":"7a8ec9b2_e161e7a9","updated":"2016-09-15 01:16:00.000000000","message":"not itempotent, that should say","commit_id":"a7c200457fd5fc6c5b9d666087289094e957ced1"}],"tests/host_vars/container1.yml":[{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"cf3f6526c1d10690d793d25b8f27f683d9a4a6a4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"  - \"lxc.mount.entry\u003d/openstack/{{ inventory_hostname }} opt/test1 none bind 0 0\""},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"lxc_container_commands: |"},{"line_number":7,"context_line":"  [[ ! -d \"/opt/test1\" ]] \u0026\u0026 mkdir -p \"/opt/test1\""}],"source_content_type":"text/x-yaml","patch_set":18,"id":"7a8ec9b2_6bd93883","side":"PARENT","line":7,"range":{"start_line":7,"start_character":2,"end_line":7,"end_character":29},"updated":"2016-09-15 00:05:02.000000000","message":"Is this  a necessary change? If so, why? The reason may affect any existing configs done by deployers and the integrated build.","commit_id":"6d9694e2060669b4f14b031f9a04cfc1dba8052a"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"4bd5ac7d76073312d5702d5290c865970d449752","unresolved":false,"context_lines":[{"line_number":4,"context_line":"  - \"lxc.mount.entry\u003d/openstack/{{ inventory_hostname }} opt/test1 none bind 0 0\""},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"lxc_container_commands: |"},{"line_number":7,"context_line":"  [[ ! -d \"/opt/test1\" ]] \u0026\u0026 mkdir -p \"/opt/test1\""}],"source_content_type":"text/x-yaml","patch_set":18,"id":"7a8ec9b2_8ef212d1","side":"PARENT","line":7,"range":{"start_line":7,"start_character":2,"end_line":7,"end_character":29},"in_reply_to":"7a8ec9b2_0e27e264","updated":"2016-09-15 00:38:48.000000000","message":"Yeah, I realise that it end up being the same, but the additional characters make for a nice test that the command execution can handle a more complex set of commands.","commit_id":"6d9694e2060669b4f14b031f9a04cfc1dba8052a"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"bec896d99fbf6289ddd2197468e97e554563db9d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"  - \"lxc.mount.entry\u003d/openstack/{{ inventory_hostname }} opt/test1 none bind 0 0\""},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"lxc_container_commands: |"},{"line_number":7,"context_line":"  [[ ! -d \"/opt/test1\" ]] \u0026\u0026 mkdir -p \"/opt/test1\""}],"source_content_type":"text/x-yaml","patch_set":18,"id":"7a8ec9b2_0e27e264","side":"PARENT","line":7,"range":{"start_line":7,"start_character":2,"end_line":7,"end_character":29},"in_reply_to":"7a8ec9b2_6bd93883","updated":"2016-09-15 00:36:46.000000000","message":"this is not needed and will exit 1 if the dir exists. mkdir -p will achieve the same result and is more predictable.","commit_id":"6d9694e2060669b4f14b031f9a04cfc1dba8052a"}]}
