)]}'
{"playbooks/utility-playbooks/artifact-build.yml":[{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"53d29207fe510173a39a6ec6346f05fa1cc9d380","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"- name: Group servers by architecture and distro"},{"line_number":17,"context_line":"  hosts: lxc_hosts"},{"line_number":18,"context_line":"  tasks:"},{"line_number":19,"context_line":"    - name: Group servers by architecture"},{"line_number":20,"context_line":"      group_by:"},{"line_number":21,"context_line":"        key: \"{{ lxc_key_group }}\""},{"line_number":22,"context_line":"  vars:"},{"line_number":23,"context_line":"    lxc_key_group: \"lxc_hosts_{{ ansible_distribution | lower }}_{{ ansible_distribution_release | lower }}_{{ ansible_architecture }}\""},{"line_number":24,"context_line":"  tags:"},{"line_number":25,"context_line":"    - always"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"- name: Create servers single group by architecture and distro"},{"line_number":28,"context_line":"  hosts: lxc_hosts"},{"line_number":29,"context_line":"  tasks:"},{"line_number":30,"context_line":"    # Use the \u0027add_host\u0027 module to create the repo_nodes group. The add_hosts module"},{"line_number":31,"context_line":"    # bypasses the play host loop of ansible and runs only once referencing the first"},{"line_number":32,"context_line":"    # host.  To run it on each host we have to use with_items.  Also note, we have"},{"line_number":33,"context_line":"    # to manually lookup the ansible_architecture for the \u0027item\u0027 host."},{"line_number":34,"context_line":"    - name: Prepare group of unique lxc hosts"},{"line_number":35,"context_line":"      local_action:"},{"line_number":36,"context_line":"        module: \"add_host\""},{"line_number":37,"context_line":"        name: \"{{ groups[lxc_key_group_item][0] }}\""},{"line_number":38,"context_line":"        groups: \"lxc_artifact_hosts\""},{"line_number":39,"context_line":"      # Process all nodes that don\u0027t match the architecture of repo_all[0]"},{"line_number":40,"context_line":"      when:"},{"line_number":41,"context_line":"        - hostvars[item].ansible_architecture !\u003d hostvars[groups[\"lxc_hosts\"][0]].ansible_architecture"},{"line_number":42,"context_line":"        - hostvars[item].ansible_distribution_release !\u003d hostvars[groups[\"lxc_hosts\"][0]].ansible_distribution_release"},{"line_number":43,"context_line":"        - hostvars[item].ansible_distribution !\u003d hostvars[groups[\"lxc_hosts\"][0]].ansible_distribution"},{"line_number":44,"context_line":"      with_items: \"{{ groups[\u0027lxc_hosts\u0027][1:] }}\""},{"line_number":45,"context_line":"      tags:"},{"line_number":46,"context_line":"        - always"},{"line_number":47,"context_line":"  vars:"},{"line_number":48,"context_line":"    lxc_key_group_item: \"lxc_hosts_{{ hostvars[item][\u0027ansible_distribution\u0027] | lower }}_{{ hostvars[item][\u0027ansible_distribution_release\u0027] | lower }}_{{ hostvars[item][\u0027ansible_architecture\u0027] }}\""},{"line_number":49,"context_line":"  tags:"},{"line_number":50,"context_line":"    - always"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"- name: Create artifact container"},{"line_number":53,"context_line":"  hosts: lxc_artifact_hosts, lxc_hosts[0]"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1a6eadb0_72847f5d","line":50,"range":{"start_line":16,"start_character":0,"end_line":50,"end_character":12},"updated":"2016-12-15 10:11:26.000000000","message":"I like this!\n\nIf the deployer has different lxc_hosts types, it will auto help him build what\u0027s needed for him.\n\nThe only inconvenient is that we require at least one lxc_host per type of architecture/distribution/release in the inventory, if we want to build multiple architecture (we cannot force build under trusty for xenial unless we have a xenial host/container). \n\nThis inconvenient is (for me) easily workaroundable when you have multiple inventories/multiple structures and share them in a common repo afterwards.","commit_id":"bb1ca8a6c75ab3b101fff36de8e3f4e21988904b"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"53d29207fe510173a39a6ec6346f05fa1cc9d380","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"- name: Create artifact container"},{"line_number":53,"context_line":"  hosts: lxc_artifact_hosts, lxc_hosts[0]"},{"line_number":54,"context_line":"  post_tasks:"},{"line_number":55,"context_line":"    - name: Remove base container"},{"line_number":56,"context_line":"      lxc_container:"},{"line_number":57,"context_line":"        name: \"LXC_NAME\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1a6eadb0_32bda702","line":54,"range":{"start_line":54,"start_character":2,"end_line":54,"end_character":7},"updated":"2016-12-15 10:11:26.000000000","message":"[nit] why post_ ? I tried to find the role, and was sad to not find it. Thanks for the troll :p","commit_id":"bb1ca8a6c75ab3b101fff36de8e3f4e21988904b"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"1dbbe3d6ce7d9ac778690a0ac7061adbc1d8a9a0","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"- name: Create artifact container"},{"line_number":53,"context_line":"  hosts: lxc_artifact_hosts, lxc_hosts[0]"},{"line_number":54,"context_line":"  post_tasks:"},{"line_number":55,"context_line":"    - name: Remove base container"},{"line_number":56,"context_line":"      lxc_container:"},{"line_number":57,"context_line":"        name: \"LXC_NAME\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1a6eadb0_dfe46ae1","line":54,"range":{"start_line":54,"start_character":2,"end_line":54,"end_character":7},"in_reply_to":"1a6eadb0_32bda702","updated":"2016-12-15 14:44:30.000000000","message":"The post_tasks was an oversight due to quite a few refactors.","commit_id":"bb1ca8a6c75ab3b101fff36de8e3f4e21988904b"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"53d29207fe510173a39a6ec6346f05fa1cc9d380","unresolved":false,"context_lines":[{"line_number":52,"context_line":"- name: Create artifact container"},{"line_number":53,"context_line":"  hosts: lxc_artifact_hosts, lxc_hosts[0]"},{"line_number":54,"context_line":"  post_tasks:"},{"line_number":55,"context_line":"    - name: Remove base container"},{"line_number":56,"context_line":"      lxc_container:"},{"line_number":57,"context_line":"        name: \"LXC_NAME\""},{"line_number":58,"context_line":"        state: absent"},{"line_number":59,"context_line":"    - name: Create base container"},{"line_number":60,"context_line":"      lxc_container:"},{"line_number":61,"context_line":"        name: \"LXC_NAME\""},{"line_number":62,"context_line":"        template: \"download\""},{"line_number":63,"context_line":"        state: \"started\""},{"line_number":64,"context_line":"        backing_store: \"dir\""},{"line_number":65,"context_line":"        template_options: \u003e"},{"line_number":66,"context_line":"          --dist {{ ansible_distribution | lower }}"},{"line_number":67,"context_line":"          --release {{ ansible_distribution_release | lower }}"},{"line_number":68,"context_line":"          --arch \"{{ architecture_mapping.get( ansible_architecture ) }}\""},{"line_number":69,"context_line":"          --force-cache"},{"line_number":70,"context_line":"          --server images.linuxcontainers.org"},{"line_number":71,"context_line":"          --keyserver hkp://p80.pool.sks-keyservers.net:80"},{"line_number":72,"context_line":"    - name: Prepare group of master lxc hosts"},{"line_number":73,"context_line":"      add_host:"},{"line_number":74,"context_line":"        name: \"LXC_NAME\""},{"line_number":75,"context_line":"        groups: \"lxc_container_artifact_hosts\""},{"line_number":76,"context_line":"        container_name: \"LXC_NAME\""},{"line_number":77,"context_line":"        physical_host: \"{{ inventory_hostname }}\""},{"line_number":78,"context_line":"  vars:"},{"line_number":79,"context_line":"    architecture_mapping:"},{"line_number":80,"context_line":"      x86_64: amd64"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1a6eadb0_920bdb8d","line":77,"range":{"start_line":55,"start_character":0,"end_line":77,"end_character":49},"updated":"2016-12-15 10:11:26.000000000","message":"Isn\u0027t LXC_NAME the basis when using overlays?\nWould that be safe to remove it on an existing deploy (when someone wants to build artifacts for a new version)? Shouldn\u0027t we need to have an artifact named \"LXC_NAME_{{ artifact_version | default(openstack_release) }}\"?\n\nI know it\u0027s only a utility playbook but I\u0027d rather have a variable there:\nif we run this playbook in a CI over and over again, we\u0027ll always destroy and recreate. So what we\u0027ll test at the end is the final version, where we don\u0027t need that, we could decide test the first produced version by just swapping a variable.\n\nI think it\u0027s generally ok, but it fully depends on what the deployer/the artifact builder wants.\n\nBringing variables have more flexibility.","commit_id":"bb1ca8a6c75ab3b101fff36de8e3f4e21988904b"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"1dbbe3d6ce7d9ac778690a0ac7061adbc1d8a9a0","unresolved":false,"context_lines":[{"line_number":52,"context_line":"- name: Create artifact container"},{"line_number":53,"context_line":"  hosts: lxc_artifact_hosts, lxc_hosts[0]"},{"line_number":54,"context_line":"  post_tasks:"},{"line_number":55,"context_line":"    - name: Remove base container"},{"line_number":56,"context_line":"      lxc_container:"},{"line_number":57,"context_line":"        name: \"LXC_NAME\""},{"line_number":58,"context_line":"        state: absent"},{"line_number":59,"context_line":"    - name: Create base container"},{"line_number":60,"context_line":"      lxc_container:"},{"line_number":61,"context_line":"        name: \"LXC_NAME\""},{"line_number":62,"context_line":"        template: \"download\""},{"line_number":63,"context_line":"        state: \"started\""},{"line_number":64,"context_line":"        backing_store: \"dir\""},{"line_number":65,"context_line":"        template_options: \u003e"},{"line_number":66,"context_line":"          --dist {{ ansible_distribution | lower }}"},{"line_number":67,"context_line":"          --release {{ ansible_distribution_release | lower }}"},{"line_number":68,"context_line":"          --arch \"{{ architecture_mapping.get( ansible_architecture ) }}\""},{"line_number":69,"context_line":"          --force-cache"},{"line_number":70,"context_line":"          --server images.linuxcontainers.org"},{"line_number":71,"context_line":"          --keyserver hkp://p80.pool.sks-keyservers.net:80"},{"line_number":72,"context_line":"    - name: Prepare group of master lxc hosts"},{"line_number":73,"context_line":"      add_host:"},{"line_number":74,"context_line":"        name: \"LXC_NAME\""},{"line_number":75,"context_line":"        groups: \"lxc_container_artifact_hosts\""},{"line_number":76,"context_line":"        container_name: \"LXC_NAME\""},{"line_number":77,"context_line":"        physical_host: \"{{ inventory_hostname }}\""},{"line_number":78,"context_line":"  vars:"},{"line_number":79,"context_line":"    architecture_mapping:"},{"line_number":80,"context_line":"      x86_64: amd64"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1a6eadb0_df09ca85","line":77,"range":{"start_line":55,"start_character":0,"end_line":77,"end_character":49},"in_reply_to":"1a6eadb0_920bdb8d","updated":"2016-12-15 14:44:30.000000000","message":"the LXC_NAME string is used because of LXC type images. LXC will search for and change that name when a container is deployed. If we use LXD type images this will not be required.","commit_id":"bb1ca8a6c75ab3b101fff36de8e3f4e21988904b"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"43701af5127318749bd29f8e59ff2f267332e558","unresolved":false,"context_lines":[{"line_number":52,"context_line":"- name: Create artifact container"},{"line_number":53,"context_line":"  hosts: lxc_artifact_hosts, lxc_hosts[0]"},{"line_number":54,"context_line":"  post_tasks:"},{"line_number":55,"context_line":"    - name: Remove base container"},{"line_number":56,"context_line":"      lxc_container:"},{"line_number":57,"context_line":"        name: \"LXC_NAME\""},{"line_number":58,"context_line":"        state: absent"},{"line_number":59,"context_line":"    - name: Create base container"},{"line_number":60,"context_line":"      lxc_container:"},{"line_number":61,"context_line":"        name: \"LXC_NAME\""},{"line_number":62,"context_line":"        template: \"download\""},{"line_number":63,"context_line":"        state: \"started\""},{"line_number":64,"context_line":"        backing_store: \"dir\""},{"line_number":65,"context_line":"        template_options: \u003e"},{"line_number":66,"context_line":"          --dist {{ ansible_distribution | lower }}"},{"line_number":67,"context_line":"          --release {{ ansible_distribution_release | lower }}"},{"line_number":68,"context_line":"          --arch \"{{ architecture_mapping.get( ansible_architecture ) }}\""},{"line_number":69,"context_line":"          --force-cache"},{"line_number":70,"context_line":"          --server images.linuxcontainers.org"},{"line_number":71,"context_line":"          --keyserver hkp://p80.pool.sks-keyservers.net:80"},{"line_number":72,"context_line":"    - name: Prepare group of master lxc hosts"},{"line_number":73,"context_line":"      add_host:"},{"line_number":74,"context_line":"        name: \"LXC_NAME\""},{"line_number":75,"context_line":"        groups: \"lxc_container_artifact_hosts\""},{"line_number":76,"context_line":"        container_name: \"LXC_NAME\""},{"line_number":77,"context_line":"        physical_host: \"{{ inventory_hostname }}\""},{"line_number":78,"context_line":"  vars:"},{"line_number":79,"context_line":"    architecture_mapping:"},{"line_number":80,"context_line":"      x86_64: amd64"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1a6eadb0_67afe394","line":77,"range":{"start_line":55,"start_character":0,"end_line":77,"end_character":49},"in_reply_to":"1a6eadb0_df09ca85","updated":"2016-12-19 09:55:32.000000000","message":"that\u0027s not really what I meant. L57 deletes the container named LXC_NAME. When we are using overlays, I thought our base dir was the LXC_NAME, on top of which the container named x would be built on.\nDeleting the LXC_NAME folder doesn\u0027t sound a problem but sounds terribly ineffecient on delete. Where if we could move to a \"LXC_NAME_{{artifact_version}}\" it seems better in the long run, you delete only the LXC_NAME for the artifact version if already existing.","commit_id":"bb1ca8a6c75ab3b101fff36de8e3f4e21988904b"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"53d29207fe510173a39a6ec6346f05fa1cc9d380","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        container_name: \"LXC_NAME\""},{"line_number":77,"context_line":"        physical_host: \"{{ inventory_hostname }}\""},{"line_number":78,"context_line":"  vars:"},{"line_number":79,"context_line":"    architecture_mapping:"},{"line_number":80,"context_line":"      x86_64: amd64"},{"line_number":81,"context_line":"      ppc64le: ppc64el"},{"line_number":82,"context_line":"  tags:"},{"line_number":83,"context_line":"    - always"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1a6eadb0_9232fb5d","line":81,"range":{"start_line":79,"start_character":0,"end_line":81,"end_character":22},"updated":"2016-12-15 10:11:26.000000000","message":"[nit] This is used in many places, I wonder why we don\u0027t implement this somewhere else, like in a filter or a fact.","commit_id":"bb1ca8a6c75ab3b101fff36de8e3f4e21988904b"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"53d29207fe510173a39a6ec6346f05fa1cc9d380","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    - always"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"- name: Run role"},{"line_number":86,"context_line":"  hosts: lxc_container_artifact_hosts"},{"line_number":87,"context_line":"  gather_facts: True"},{"line_number":88,"context_line":"  pre_tasks:"},{"line_number":89,"context_line":"    - name: Set dev mode fact"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1a6eadb0_680730ca","line":86,"updated":"2016-12-15 10:11:26.000000000","message":"we could probably use another connection: for this. Later patch?","commit_id":"bb1ca8a6c75ab3b101fff36de8e3f4e21988904b"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"53d29207fe510173a39a6ec6346f05fa1cc9d380","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    dev_mode: false"},{"line_number":100,"context_line":"    dev_mode_vars:"},{"line_number":101,"context_line":"      pip_lock_to_internal_repo: False"},{"line_number":102,"context_line":"      \u0027{{ image_name }}_developer_mode\u0027: true"},{"line_number":103,"context_line":"      pip_install_upper_constraints: \"https://raw.githubusercontent.com/openstack/requirements/master/upper-constraints.txt\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"  tags:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1a6eadb0_e8742069","line":102,"updated":"2016-12-15 10:11:26.000000000","message":"I\u0027m not 100% familiar with developer mode.\n\nMy understanding, is that with developer mode, we are building venv in the role instead of fetching it, and for that we are using the role\u0027s vars for the constraints.\n\nThe risk here is that we won\u0027t be using the same version of the code as the integrated build would.\n\nExample for neutron:\nIf we are using developer mode, we are using the following constraints:\nhttps://github.com/openstack/openstack-ansible-os_neutron/blob/master/defaults/main.yml#L46-L53\n\nSo we\u0027d be relying on master for networking calico on the dev mode for neutron role, where the integrated repo on the same version would be using: \nhttps://github.com/openstack/openstack-ansible/blob/master/playbooks/defaults/repo_packages/projectcalico.yml#L21\n\nAm I wrong?\nThis seems not consistent and source of failures. Same issues would appear on N branch.","commit_id":"bb1ca8a6c75ab3b101fff36de8e3f4e21988904b"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"43701af5127318749bd29f8e59ff2f267332e558","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    dev_mode: false"},{"line_number":100,"context_line":"    dev_mode_vars:"},{"line_number":101,"context_line":"      pip_lock_to_internal_repo: False"},{"line_number":102,"context_line":"      \u0027{{ image_name }}_developer_mode\u0027: true"},{"line_number":103,"context_line":"      pip_install_upper_constraints: \"https://raw.githubusercontent.com/openstack/requirements/master/upper-constraints.txt\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"  tags:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1a6eadb0_0711cfaf","line":102,"in_reply_to":"1a6eadb0_3f5d5e47","updated":"2016-12-19 09:55:32.000000000","message":"What would be your method of choice to bring the same requirements, then?","commit_id":"bb1ca8a6c75ab3b101fff36de8e3f4e21988904b"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"1dbbe3d6ce7d9ac778690a0ac7061adbc1d8a9a0","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    dev_mode: false"},{"line_number":100,"context_line":"    dev_mode_vars:"},{"line_number":101,"context_line":"      pip_lock_to_internal_repo: False"},{"line_number":102,"context_line":"      \u0027{{ image_name }}_developer_mode\u0027: true"},{"line_number":103,"context_line":"      pip_install_upper_constraints: \"https://raw.githubusercontent.com/openstack/requirements/master/upper-constraints.txt\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"  tags:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1a6eadb0_3f5d5e47","line":102,"in_reply_to":"1a6eadb0_e8742069","updated":"2016-12-15 14:44:30.000000000","message":"You\u0027re assumption are 100% correct. I added this line here so that I can build the container artifacts without a repo infrastructure. I think of this as more of an example. In the future I think this should be an option while the default is setup such that a deployer should be able to construct artifacts with their own private repo servers or mirrors.","commit_id":"bb1ca8a6c75ab3b101fff36de8e3f4e21988904b"}]}
