File tree Expand file tree Collapse file tree
systemvm/patches/debian/config/opt/cloud/bin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,15 +52,16 @@ def process(do_merge=True):
5252 qf .setFile (sys .argv [1 ])
5353 qf .do_merge = do_merge
5454 qf .load (None )
55-
5655 return qf
5756
5857
5958def process_file ():
6059 print "[INFO] process_file"
6160 qf = process ()
62- # Converge
63- finish_config ()
61+ # These can be safely deferred, dramatically speeding up loading times
62+ if not (os .environ .get ('DEFER_CONFIG' , False ) and sys .argv [1 ] in ('vm_dhcp_entry.json' , 'vm_metadata.json' )):
63+ # Converge
64+ finish_config ()
6465
6566
6667def process_vmpasswd ():
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ while getopts 'c:' OPTION; do
3232 c) cfg=" $OPTARG " ;;
3333esac ; done
3434
35+ export DEFER_CONFIG=true
3536while read line; do
3637 # comment
3738 if [[ $line == \# * ]]; then
@@ -78,6 +79,10 @@ done < $cfg
7879# archive the configuration file
7980mv $cfg /var/cache/cloud/processed/
8081
82+ unset DEFER_CONFIG
83+ # trigger finish_config()
84+ /opt/cloud/bin/configure.py
85+
8186# Flush kernel conntrack table
8287log_it " VR config: Flushing conntrack table"
8388conntrackd -d 2> /dev/null
You can’t perform that action at this time.
0 commit comments