Bug 1810985

Summary: [RFE] Improve update speed by reducing the number of skipped tasks during ansible run.
Product: Red Hat OpenStack Reporter: Sofer Athlan-Guyot <sathlang>
Component: openstack-tripleo-heat-templatesAssignee: Sofer Athlan-Guyot <sathlang>
Status: CLOSED CURRENTRELEASE QA Contact: Jason Grosso <jgrosso>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: augol, jpretori, mariel, mburns
Target Milestone: betaKeywords: FutureFeature, Triaged
Target Release: 17.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-14.3.1-0.20220719171716.feca772.el9ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-30 09:40:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sofer Athlan-Guyot 2020-03-06 10:53:04 UTC
Description of problem:  During update, we do this:

 - generate ansible tasks with step conditional attached
 - run all the tasks inside a step0 to step5 loop 

This means that every step 1 tasks is hit 6 times and only run once. The other 5 times it's skipped. It seems that even skipped task make a ssh connection which make the overall cost even higher.

This make the log less readable, a simple grep doesn't work as expected as you can hit the skipped tasks as well.

We need to "invert" the logic here.

We should collect all conditionals and generate one playbook by step. Like this, we don't change the interface (step conditional) but we only run each task in each step once.