mirror of https://github.com/apache/cloudstack.git
vRouter defer configure: Resolve merge conflicts
This commit is contained in:
parent
a2eb0f23a9
commit
330a0c7f2b
|
|
@ -52,15 +52,16 @@ def process(do_merge=True):
|
|||
qf.setFile(sys.argv[1])
|
||||
qf.do_merge = do_merge
|
||||
qf.load(None)
|
||||
|
||||
return qf
|
||||
|
||||
|
||||
def process_file():
|
||||
print "[INFO] process_file"
|
||||
qf = process()
|
||||
# Converge
|
||||
finish_config()
|
||||
# These can be safely deferred, dramatically speeding up loading times
|
||||
if not (os.environ.get('DEFER_CONFIG', False) and sys.argv[1] in ('vm_dhcp_entry.json', 'vm_metadata.json')):
|
||||
# Converge
|
||||
finish_config()
|
||||
|
||||
|
||||
def process_vmpasswd():
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ while getopts 'c:' OPTION; do
|
|||
c) cfg="$OPTARG" ;;
|
||||
esac; done
|
||||
|
||||
export DEFER_CONFIG=true
|
||||
while read line; do
|
||||
#comment
|
||||
if [[ $line == \#* ]]; then
|
||||
|
|
@ -78,6 +79,10 @@ done < $cfg
|
|||
# archive the configuration file
|
||||
mv $cfg /var/cache/cloud/processed/
|
||||
|
||||
unset DEFER_CONFIG
|
||||
# trigger finish_config()
|
||||
/opt/cloud/bin/configure.py
|
||||
|
||||
# Flush kernel conntrack table
|
||||
log_it "VR config: Flushing conntrack table"
|
||||
conntrackd -d 2> /dev/null
|
||||
|
|
|
|||
Loading…
Reference in New Issue