)]}'
{"tasks/common/load_roles_from_inventory.yaml":[{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"ceaac3b8fb0335666b20070bba529eac36be5c97","unresolved":false,"context_lines":[{"line_number":20,"context_line":"- name: store roles and register controller role name"},{"line_number":21,"context_line":"  set_fact:"},{"line_number":22,"context_line":"    oc_roles: \"{{ oc_roles + inventory_roles }}\""},{"line_number":23,"context_line":"    controller_role_name: \"{{ inventory_roles | map(\u0027regex_search\u0027, \u0027^[A-Za-z0-9]*[Cc]ontroller[A-Za-z0-9]*$\u0027) | select(\u0027string\u0027) | list | last | default(\u0027\u0027) }}\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"- name: store sorted roles with controller first(default)"},{"line_number":26,"context_line":"  set_fact:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"ff570b3c_bb7d7ae8","line":23,"range":{"start_line":23,"start_character":82,"end_line":23,"end_character":95},"updated":"2020-06-04 15:15:14.000000000","message":"OT: is this a valid assumption?","commit_id":"4dd38076cda4c4aa32f7944daeaa400f9a1b807f"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"d2a3d9f7690a3ff5781c860c0e0916e9070426c0","unresolved":false,"context_lines":[{"line_number":20,"context_line":"- name: store roles and register controller role name"},{"line_number":21,"context_line":"  set_fact:"},{"line_number":22,"context_line":"    oc_roles: \"{{ oc_roles + inventory_roles }}\""},{"line_number":23,"context_line":"    controller_role_name: \"{{ inventory_roles | map(\u0027regex_search\u0027, \u0027^[A-Za-z0-9]*[Cc]ontroller[A-Za-z0-9]*$\u0027) | select(\u0027string\u0027) | list | last | default(\u0027\u0027) }}\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"- name: store sorted roles with controller first(default)"},{"line_number":26,"context_line":"  set_fact:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"ff570b3c_89d49e21","line":23,"range":{"start_line":23,"start_character":82,"end_line":23,"end_character":95},"in_reply_to":"ff570b3c_bb7d7ae8","updated":"2020-06-05 11:01:07.000000000","message":"For our test environments I would say it is...even in tht, all the roles which perform as controllers are named starting by Controller. It\u0027s true that a customer could change the role name as \"ThingThatControlsAll\" but tripleo-upgrade is mostly thought for testing purposes atm.","commit_id":"4dd38076cda4c4aa32f7944daeaa400f9a1b807f"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"ceaac3b8fb0335666b20070bba529eac36be5c97","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    controllers_from_inventory: \"{{ (inventory_hostmap[controller_role_name] | default(\u0027\u0027)) | list }}\""},{"line_number":50,"context_line":"  set_fact:"},{"line_number":51,"context_line":"    controllers_ordered: \"{{ controllers_from_inventory|intersect([pcmkr_bootstrap_node]) + controllers_from_inventory|difference([pcmkr_bootstrap_node]) }}\""},{"line_number":52,"context_line":"  when: not update_cell|bool"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"- name: create hosts per role fact"},{"line_number":55,"context_line":"  set_fact:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"ff570b3c_3b004a34","line":52,"updated":"2020-06-04 15:15:14.000000000","message":"should this have the \u0027controller_role_name|length \u003e 0\u0027 when condition too?","commit_id":"4dd38076cda4c4aa32f7944daeaa400f9a1b807f"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"d2a3d9f7690a3ff5781c860c0e0916e9070426c0","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    controllers_from_inventory: \"{{ (inventory_hostmap[controller_role_name] | default(\u0027\u0027)) | list }}\""},{"line_number":50,"context_line":"  set_fact:"},{"line_number":51,"context_line":"    controllers_ordered: \"{{ controllers_from_inventory|intersect([pcmkr_bootstrap_node]) + controllers_from_inventory|difference([pcmkr_bootstrap_node]) }}\""},{"line_number":52,"context_line":"  when: not update_cell|bool"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"- name: create hosts per role fact"},{"line_number":55,"context_line":"  set_fact:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"ff570b3c_a999a26d","line":52,"in_reply_to":"ff570b3c_3b004a34","updated":"2020-06-05 11:01:07.000000000","message":"I guess not, otherwise controllers_ordered won\u0027t be set and the oc_roles_hosts fact would fail. And, in the case as you suggest, the condition would be added in both tasks, then we wouldn\u0027t have the oc_roles_hosts fact set which is used all over the role (basically its a dict that stores Role: [hosts]. \n\nIf I understand correctly the purpose of the patch, we just want not to fail if a stack doesn\u0027t have controllers but the oc_roles_hosts should get still defined, for example: { ComputeDCN: [compute-0, compute-1]} so we can upgrade this role further in the tripleo-upgrade code.","commit_id":"4dd38076cda4c4aa32f7944daeaa400f9a1b807f"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"ceaac3b8fb0335666b20070bba529eac36be5c97","unresolved":false,"context_lines":[{"line_number":55,"context_line":"  set_fact:"},{"line_number":56,"context_line":"    oc_roles_hosts: \"{{ oc_roles_hosts | combine({ item : controllers_ordered if item \u003d\u003d controller_role_name else inventory_hostmap[item]|list }) }}\""},{"line_number":57,"context_line":"  loop: \"{{ inventory_roles }}\""},{"line_number":58,"context_line":"  when: not update_cell | bool"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"- name: create hosts per role fact for cells"},{"line_number":61,"context_line":"  set_fact:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"ff570b3c_7bf6425f","line":58,"updated":"2020-06-04 15:15:14.000000000","message":"and this","commit_id":"4dd38076cda4c4aa32f7944daeaa400f9a1b807f"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"fce2967dfeda53511cd4b4125163aaf8ba95d0a8","unresolved":false,"context_lines":[{"line_number":20,"context_line":"- name: store roles and register controller role name"},{"line_number":21,"context_line":"  set_fact:"},{"line_number":22,"context_line":"    oc_roles: \"{{ oc_roles + inventory_roles }}\""},{"line_number":23,"context_line":"    controller_role_name: \"{{ inventory_roles | map(\u0027regex_search\u0027, \u0027^[A-Za-z0-9]*[Cc]ontroller[A-Za-z0-9]*$\u0027) | select(\u0027string\u0027) | list | last | default(\u0027\u0027) }}\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"- name: store sorted roles with controller first(default)"},{"line_number":26,"context_line":"  set_fact:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf51134e_6ed24902","line":23,"updated":"2020-06-22 17:31:05.000000000","message":"This keeps working as it used to:\n\nTASK [tripleo-upgrade : store roles and register controller role name] *********\ntask path: /home/rhos-ci/jenkins/workspace/DFG-upgrades-ffu-ffu-upgrade-13-16.1_director-rhel-virthost-3cont_2comp-ipv6-vxlan-HA-no-ceph/infrared/plugins/tripleo-upgrade/infrared_plugin/roles/tripleo-upgrade/tasks/common/load_roles_from_inventory.yaml:20\nSaturday 20 June 2020  04:09:10 +0000 (0:00:00.562)       0:02:35.264 ********* \nok: [undercloud-0] \u003d\u003e {\n    \"ansible_facts\": {\n        \"controller_role_name\": \"Controller\", \n        \"oc_roles\": [\n            \"Compute\", \n            \"Controller\"\n        ]\n    }, \n    \"changed\": false\n}","commit_id":"07c2aa35743b06e5aa048f7284a5577cec947350"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"fce2967dfeda53511cd4b4125163aaf8ba95d0a8","unresolved":false,"context_lines":[{"line_number":41,"context_line":"  register: pcmkr_bootstrap_node_out"},{"line_number":42,"context_line":"  when:"},{"line_number":43,"context_line":"    - not update_cell|bool"},{"line_number":44,"context_line":"    - controller_role_name|length \u003e 0"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"- name: Create ordered Controller\u0027s host set (bootstrap node first)"},{"line_number":47,"context_line":"  vars:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf51134e_2efe916a","line":44,"updated":"2020-06-22 17:31:05.000000000","message":"This too:\n\nTASK [tripleo-upgrade : Retrieve the pacemaker bootstrap controller node.] *****\ntask path: /home/rhos-ci/jenkins/workspace/DFG-upgrades-ffu-ffu-upgrade-13-16.1_director-rhel-virthost-3cont_2comp-ipv6-vxlan-HA-no-ceph/infrared/plugins/tripleo-upgrade/infrared_plugin/roles/tripleo-upgrade/tasks/common/load_roles_from_inventory.yaml:37\nSaturday 20 June 2020  04:09:11 +0000 (0:00:00.103)       0:02:35.969 ********* \n [WARNING]: Consider using \u0027become\u0027, \u0027become_method\u0027, and \u0027become_user\u0027 rather\nthan running sudo\n\nchanged: [undercloud-0 -\u003e 192.168.24.17] \u003d\u003e {\n    \"changed\": true, \n    \"cmd\": \"sudo hiera -c /etc/puppet/hiera.yaml pacemaker_short_bootstrap_node_name\", \n    \"delta\": \"0:00:00.171511\", \n    \"end\": \"2020-06-20 04:09:20.317635\", \n    \"rc\": 0, \n    \"start\": \"2020-06-20 04:09:20.146124\"\n}\n\nSTDOUT:\n\ncontroller-0","commit_id":"07c2aa35743b06e5aa048f7284a5577cec947350"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"fce2967dfeda53511cd4b4125163aaf8ba95d0a8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"- name: Create ordered Controller\u0027s host set (bootstrap node first)"},{"line_number":47,"context_line":"  vars:"},{"line_number":48,"context_line":"    pcmkr_bootstrap_node: \"{{ (pcmkr_bootstrap_node_out|default(omit)).get(\u0027stdout\u0027, \u0027\u0027) }}\""},{"line_number":49,"context_line":"    controllers_from_inventory: \"{{ (inventory_hostmap[controller_role_name] | default(\u0027\u0027)) | list }}\""},{"line_number":50,"context_line":"  set_fact:"},{"line_number":51,"context_line":"    controllers_ordered: \"{{ controllers_from_inventory|intersect([pcmkr_bootstrap_node]) + controllers_from_inventory|difference([pcmkr_bootstrap_node]) }}\""},{"line_number":52,"context_line":"  when: not update_cell|bool"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf51134e_8eeebdb1","line":49,"updated":"2020-06-22 17:31:05.000000000","message":"And this:\n\nTASK [tripleo-upgrade : Create ordered Controller\u0027s host set (bootstrap node first)] ***\ntask path: /home/rhos-ci/jenkins/workspace/DFG-upgrades-ffu-ffu-upgrade-13-16.1_director-rhel-virthost-3cont_2comp-ipv6-vxlan-HA-no-ceph/infrared/plugins/tripleo-upgrade/infrared_plugin/roles/tripleo-upgrade/tasks/common/load_roles_from_inventory.yaml:46\nSaturday 20 June 2020  04:09:21 +0000 (0:00:09.695)       0:02:45.665 ********* \nok: [undercloud-0] \u003d\u003e {\n    \"ansible_facts\": {\n        \"controllers_ordered\": [\n            \"controller-0\", \n            \"controller-1\", \n            \"controller-2\"\n        ]\n    }, \n    \"changed\": false\n}","commit_id":"07c2aa35743b06e5aa048f7284a5577cec947350"}]}
