)]}'
{"tripleoclient/v1/overcloud_external_update.py":[{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"366a0940de006e34047269ccbb6ff819bb47e60b","unresolved":true,"context_lines":[{"line_number":143,"context_line":"        # Run ansible:"},{"line_number":144,"context_line":"        inventory \u003d oooutils.get_tripleo_ansible_inventory("},{"line_number":145,"context_line":"            parsed_args.static_inventory, parsed_args.ssh_user, stack,"},{"line_number":146,"context_line":"            return_inventory_file_path\u003dTrue)"},{"line_number":147,"context_line":"        limit_hosts \u003d oooutils.playbook_limit_parse("},{"line_number":148,"context_line":"            limit_nodes\u003dparsed_args.limit)"},{"line_number":149,"context_line":"        playbook \u003d \u0027all\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"84f428ae_e59c7312","line":146,"updated":"2021-04-22 14:02:45.000000000","message":"Also, in the external-update command, this seems to be failing https://zuul.opendev.org/t/openstack/build/fa0e163d5d484308a1eed6a8b94fc72a/log/logs/undercloud/home/zuul/overcloud_update_prepare_containers.log\n\nThe problem is that the command doesn\u0027t really fail even if no task has been executed. I guess this is the case the reporter of https://bugzilla.redhat.com/show_bug.cgi?id\u003d1944321 faced, but it\u0027s a false positive as it really didn\u0027t run the containers prepare.","commit_id":"cb55e47d1b9f7f97d635352e9c1389614bee42bf"}],"tripleoclient/v1/overcloud_update.py":[{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"2bbf6c905c76fd0e116e5ef3e59cd4045adf3991","unresolved":true,"context_lines":[{"line_number":208,"context_line":"        playbook \u003d parsed_args.playbook"},{"line_number":209,"context_line":"        inventory \u003d oooutils.get_tripleo_ansible_inventory("},{"line_number":210,"context_line":"            parsed_args.static_inventory, parsed_args.ssh_user, stack,"},{"line_number":211,"context_line":"            return_inventory_file_path\u003dTrue)"},{"line_number":212,"context_line":"        limit_hosts \u003d oooutils.playbook_limit_parse("},{"line_number":213,"context_line":"            limit_nodes\u003dparsed_args.limit)"},{"line_number":214,"context_line":"        oooutils.run_update_ansible_action("}],"source_content_type":"text/x-python","patch_set":1,"id":"2bf93a15_fe9bad6e","line":211,"updated":"2021-04-22 11:44:08.000000000","message":"Ok, it took me a while but I finally saw what\u0027s going on here. Basically, by changing from returning the whole inventory into returning only the inventory name we are trying to use: ~/tripleo-ansible-inventory.yaml file (which is located in the Undercloud\u0027s home directory). Then, when executing the update command, for some reason we point instead to an inventory.yaml local to the mistral container from where the script is triggered:\n\nhttps://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_fa0/784416/1/check/tripleo-ci-centos-8-scenario000-multinode-oooq-container-updates-train/fa0e163/logs/undercloud/var/lib/mistral/config-download-latest/ansible-playbook-command.sh\n\nansible-playbook-3 /var/lib/mistral/990aaa71-2e83-4965-ab30-73a596aad8a4/update_steps_playbook.yaml --limit Controller --module-path /usr/share/ansible-modules --become --become-user root --inventory-file /var/lib/mistral/990aaa71-2e83-4965-ab30-73a596aad8a4/inventory.yaml \"$@\"\n\nHowever, if you open that inventory.yaml file, you won\u0027t see an inventory..but a reference to ~/tripleo-ansible-inventory.yaml:\n\nhttps://zuul.opendev.org/t/openstack/build/fa0e163d5d484308a1eed6a8b94fc72a/log/logs/undercloud/var/lib/mistral/config-download-latest/inventory.yaml\n\nWhy did this work before? Because in tripleo-common we do the following:\n\nIf the content from _inventory is not a file, then it will dump it locally (therefore in the mistral container) under an inventory.yaml file:\n\nhttps://github.com/openstack/tripleo-common/blob/stable/train/tripleo_common/actions/ansible.py#L242-L243\n\nOtherwise, it will dump whatever was in the _inventory parameter, which doesn\u0027t seem very correct:\n\nhttps://github.com/openstack/tripleo-common/blob/stable/train/tripleo_common/actions/ansible.py#L242-L243\n\nAnd this is why we find the inventory.yaml file including a reference to /home/zuul/tripleo-ansible-inventory.yaml\n\nPhew...it took me few neurons..","commit_id":"cb55e47d1b9f7f97d635352e9c1389614bee42bf"},{"author":{"_account_id":26343,"name":"Jose Luis Franco","email":"jfrancoa@redhat.com","username":"jfrancoa"},"change_message_id":"c0e2530e5c1541988260dfaf3ddcb935cb7597ed","unresolved":true,"context_lines":[{"line_number":208,"context_line":"        playbook \u003d parsed_args.playbook"},{"line_number":209,"context_line":"        inventory \u003d oooutils.get_tripleo_ansible_inventory("},{"line_number":210,"context_line":"            parsed_args.static_inventory, parsed_args.ssh_user, stack,"},{"line_number":211,"context_line":"            return_inventory_file_path\u003dTrue)"},{"line_number":212,"context_line":"        limit_hosts \u003d oooutils.playbook_limit_parse("},{"line_number":213,"context_line":"            limit_nodes\u003dparsed_args.limit)"},{"line_number":214,"context_line":"        oooutils.run_update_ansible_action("}],"source_content_type":"text/x-python","patch_set":1,"id":"9381712d_53afe986","line":211,"in_reply_to":"2bf93a15_fe9bad6e","updated":"2021-04-22 13:36:20.000000000","message":"After talking to Sergii I can see clearly what happened. In this line it\u0027s being checked if the inventory is a certain type and if the path exists:\n\nhttps://github.com/openstack/tripleo-common/blob/stable/train/tripleo_common/actions/ansible.py#L445-L446\n\nHowever, this code is being executed from the mistral executor container and self._inventory points to /home/stack/tripleo-ansible-inventory.yaml which is not available in the container itself. Therefore it moves to the next condition:\n\n        elif not isinstance(self._inventory, six.string_types):\n            self._inventory \u003d yaml.safe_dump(self._inventory)\n\n        path \u003d os.path.join(self.work_dir, \u0027inventory.yaml\u0027)\n\nsetting self._inventory to \"/home/stack/tripleo-ansible-inventory.yaml\" and few lines later it drops this content into inventory.yaml file:\n\n        with open(path, \u0027w\u0027) as inventory:\n            inventory.write(self._inventory)\n\n        self._inventory \u003d path\n        return path","commit_id":"cb55e47d1b9f7f97d635352e9c1389614bee42bf"}]}
