diff --git a/deploy/classic/bootstrap.py b/deploy/classic/bootstrap.py index 16840a2..11bb01b 100644 --- a/deploy/classic/bootstrap.py +++ b/deploy/classic/bootstrap.py @@ -70,13 +70,16 @@ def main(root): subprocess.run(['docker','run','-d','--name','azerothai-classic-world','--network','azerothai-classic','--cpus','2','--memory','3g','--user','1000:1000','-v',str(root)+':/work','-w','/work/run/bin','-p','127.0.0.1:8086:8086','azerothai-classic-builder:local','bash','-c','exec 3<>/work/run/console; exec ./mangosd -c /work/run/etc/mangosd.conf <&3'],check=True,capture_output=True) elif not state['Running']:subprocess.run(['docker','start','azerothai-classic-world'],check=True,capture_output=True) status('starting isolated Classic world; bot login disabled') - for _ in range(120): + for attempt in range(720): state=inspect('azerothai-classic-world') if not state or not state['Running']:raise RuntimeError('Classic world exited during startup; inspect container log') - log=subprocess.run(['docker','logs','--tail','60','azerothai-classic-world'],capture_output=True,text=True).stdout + log=subprocess.run(['docker','logs','--since',state['StartedAt'],'azerothai-classic-world'],capture_output=True,text=True).stdout if 'SERVER STARTUP TIME' in log or 'World initialized' in log:break + if attempt%12==0:status('Classic first startup is building caches; bot login disabled',waitedSeconds=attempt*5) time.sleep(5) - else:raise RuntimeError('Classic startup not confirmed within ten minutes') + else:raise RuntimeError('Classic startup not confirmed within sixty minutes; inspect cache progress') + # Restore full durability before any persistent characters are created. + mysql('SET GLOBAL innodb_flush_log_at_trx_commit=1; SET GLOBAL sync_binlog=1;') status('creating 50 level-one native characters; bot login disabled') with fifo.open('w') as console: for bot in roster: