Bug 1040124

Summary: [PERF] process erb files more efficiently in cartridge setup
Product: OpenShift Online Reporter: Andy Grimm <agrimm>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED WONTFIX QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: dmcphers, jgoulding
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-11 21:51:09 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:

Description Andy Grimm 2013-12-10 19:03:27 UTC
Currently, the v2_cart_model code processes erbs by calling @container.run_in_container_context once for each file to be processed.  For a cartridge with many environment variables or configuration files written as erb files, this can consume a considerable amount of time.  each call results in a runuser->runcon->sh->scl->ruby process tree, and calling runuser many times can really bog down a system due to pam_namespace, cgroup switching, etc.  Perhaps we could create a simple script that can process a whole list of erb files in a directory?