)]}'
{"tasks/container_create.yml":[{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"7c27f35f18d62dd4b41905aa9e07df2681a4d128","unresolved":false,"context_lines":[{"line_number":104,"context_line":"# TODO(odyssey4me): Revisit this once a fix has merged"},{"line_number":105,"context_line":"# NOTE(hwoarang) lxc-copy is only available since lxc-2.0.0 so emulate"},{"line_number":106,"context_line":"# its behavior using the old lxc-clone command"},{"line_number":107,"context_line":"- block:"},{"line_number":108,"context_line":"    - name: Create container (copy-on-write backing store)"},{"line_number":109,"context_line":"      command: \u003e"},{"line_number":110,"context_line":"        lxc-copy --snapshot -B {{ lxc_container_backing_store }}"},{"line_number":111,"context_line":"        --name {{ lxc_container_base_name }}"},{"line_number":112,"context_line":"        --newname {{ inventory_hostname }}"},{"line_number":113,"context_line":"        -L {{ properties.container_fs_size | default(lxc_container_fs_size) }}"},{"line_number":114,"context_line":"        --logfile {{ lxc_container_log_path }}/lxc-{{ inventory_hostname }}.log"},{"line_number":115,"context_line":"        --logpriority {{ (debug | bool) | ternary(\u0027DEBUG\u0027, \u0027INFO\u0027) }}"},{"line_number":116,"context_line":"      delegate_to: \"{{ physical_host }}\""},{"line_number":117,"context_line":"  rescue:"},{"line_number":118,"context_line":"    # NOTE(hwoarang) lxc-clone does not support the common"},{"line_number":119,"context_line":"    # --logfile/logpriority options so we just redirect everything to the log"},{"line_number":120,"context_line":"    # which is probably the best we can do."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"9f436f4f_f361d106","line":117,"range":{"start_line":107,"start_character":0,"end_line":117,"end_character":9},"updated":"2017-08-14 07:42:16.000000000","message":"If the block fails, we end up doing a clone.\n\nI\u0027d rather not have this silent failure recovery behavior, and instead do:\n\nblock:\n  - name: Test lxc-copy\n     command: which lxc-copy #or anything that tests lxc version\n  - name: Use Copy\n     set_fact:\n       lxc_snapshot_command: lxc-copy ...\nrescue:\n  - name: Use Clone\n     set_fact:\n       lxc_snapshot_command: lxc-clone ...\n\nThen you can go on with the command, which will not be in block.","commit_id":"9763de523323992925e2fda4152ff93884202071"},{"author":{"_account_id":23163,"name":"Markos Chandras (hwoarang)","email":"markos@chandras.me","username":"mchandras"},"change_message_id":"088dc5ecb71d260bf08bacd02fefc93e54977e07","unresolved":false,"context_lines":[{"line_number":104,"context_line":"# TODO(odyssey4me): Revisit this once a fix has merged"},{"line_number":105,"context_line":"# NOTE(hwoarang) lxc-copy is only available since lxc-2.0.0 so emulate"},{"line_number":106,"context_line":"# its behavior using the old lxc-clone command"},{"line_number":107,"context_line":"- block:"},{"line_number":108,"context_line":"    - name: Create container (copy-on-write backing store)"},{"line_number":109,"context_line":"      command: \u003e"},{"line_number":110,"context_line":"        lxc-copy --snapshot -B {{ lxc_container_backing_store }}"},{"line_number":111,"context_line":"        --name {{ lxc_container_base_name }}"},{"line_number":112,"context_line":"        --newname {{ inventory_hostname }}"},{"line_number":113,"context_line":"        -L {{ properties.container_fs_size | default(lxc_container_fs_size) }}"},{"line_number":114,"context_line":"        --logfile {{ lxc_container_log_path }}/lxc-{{ inventory_hostname }}.log"},{"line_number":115,"context_line":"        --logpriority {{ (debug | bool) | ternary(\u0027DEBUG\u0027, \u0027INFO\u0027) }}"},{"line_number":116,"context_line":"      delegate_to: \"{{ physical_host }}\""},{"line_number":117,"context_line":"  rescue:"},{"line_number":118,"context_line":"    # NOTE(hwoarang) lxc-clone does not support the common"},{"line_number":119,"context_line":"    # --logfile/logpriority options so we just redirect everything to the log"},{"line_number":120,"context_line":"    # which is probably the best we can do."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"9f436f4f_097306b3","line":117,"range":{"start_line":107,"start_character":0,"end_line":117,"end_character":9},"in_reply_to":"9f436f4f_f361d106","updated":"2017-08-14 08:17:37.000000000","message":"But how is that different from the proposed solution? In the end, the lxc-clone is still a fallback. At least the existing patchset makes it explicit in the task title that this is a fallback whereas in your solution the fact actually hides the mechanism that is being used. Do I miss something?","commit_id":"9763de523323992925e2fda4152ff93884202071"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"7c27f35f18d62dd4b41905aa9e07df2681a4d128","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    # which is probably the best we can do."},{"line_number":121,"context_line":"    - name: Create container (copy-on-write backing store) (fallback)"},{"line_number":122,"context_line":"      shell: \u003e"},{"line_number":123,"context_line":"        lxc-clone -s -B {{ lxc_container_backing_store }} {{ lxc_container_base_name }} {{ inventory_hostname }}"},{"line_number":124,"context_line":"        -L {{ properties.container_fs_size | default(lxc_container_fs_size) }} \u0026\u003e\u003e"},{"line_number":125,"context_line":"        {{ lxc_container_log_path }}/lxc-{{ inventory_hostname }}.log"},{"line_number":126,"context_line":"      delegate_to: \"{{ physical_host }}\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"9f436f4f_53f77d60","line":123,"range":{"start_line":123,"start_character":18,"end_line":123,"end_character":20},"updated":"2017-08-14 07:42:16.000000000","message":"Could we have almost the same way to write this as above?","commit_id":"9763de523323992925e2fda4152ff93884202071"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"7c27f35f18d62dd4b41905aa9e07df2681a4d128","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    - name: Create container (copy-on-write backing store) (fallback)"},{"line_number":122,"context_line":"      shell: \u003e"},{"line_number":123,"context_line":"        lxc-clone -s -B {{ lxc_container_backing_store }} {{ lxc_container_base_name }} {{ inventory_hostname }}"},{"line_number":124,"context_line":"        -L {{ properties.container_fs_size | default(lxc_container_fs_size) }} \u0026\u003e\u003e"},{"line_number":125,"context_line":"        {{ lxc_container_log_path }}/lxc-{{ inventory_hostname }}.log"},{"line_number":126,"context_line":"      delegate_to: \"{{ physical_host }}\""},{"line_number":127,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"9f436f4f_33cf592a","line":124,"range":{"start_line":124,"start_character":8,"end_line":124,"end_character":78},"updated":"2017-08-14 07:42:16.000000000","message":"Just in case this causes issues, we should use -L before the lxc_container_base_name and inventory hostname.\n\nOn top of that, not sure if we need -o and -n.\n(I am checking http://manpages.ubuntu.com/manpages/trusty/man1/lxc-clone.1.html  with lxc 1.0.3)","commit_id":"9763de523323992925e2fda4152ff93884202071"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"daaeb08fcd09b1b64d3ac85697f52a17bf497e08","unresolved":false,"context_lines":[{"line_number":105,"context_line":"# NOTE(hwoarang) lxc-copy is only available since lxc-2.0.0 so emulate"},{"line_number":106,"context_line":"# its behavior using the old lxc-clone command. This is only a problem"},{"line_number":107,"context_line":"# on openSUSE so it\u0027s safe to remove it when lxc-2.X becomes the default"},{"line_number":108,"context_line":"# option in the openstack-ansible-lxc_hosts role."},{"line_number":109,"context_line":"- block:"},{"line_number":110,"context_line":"    - name: Create container (copy-on-write backing store)"},{"line_number":111,"context_line":"      command: \u003e"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"9f436f4f_ff487087","line":108,"range":{"start_line":108,"start_character":12,"end_line":108,"end_character":48},"updated":"2017-08-14 10:05:46.000000000","message":"The default option in opensuse... it\u0027s already the default option in the lxc_hosts role ;)","commit_id":"3407b03b04fe7ec3c78a820b7a501133bf326d81"}]}
