drain old web slot before blue-green shutdown
This commit is contained in:
@@ -26,6 +26,9 @@ test('all backend business services have blue-green runtime contracts', async ()
|
||||
assert.match(script, /connect_routing_aliases "\$candidate" "\$ROUTING_ALIAS" "\$NACOS_SERVICE"/)
|
||||
assert.match(script, /file,file-service:file/)
|
||||
assert.match(script, /docker stop --time "\$STOP_TIMEOUT" "\$active_container"/)
|
||||
assert.match(script, /DRAIN_SECONDS="\$\{BLUE_GREEN_DRAIN_SECONDS:-30\}"/)
|
||||
assert.match(script, /蓝绿切换后连接排空/)
|
||||
assert.match(script, /sleep "\$DRAIN_SECONDS"/)
|
||||
assert.match(script, /mv -f "\$STATE_FILE\.tmp" "\$STATE_FILE"/)
|
||||
})
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@ async function runBlueGreen(health) {
|
||||
PATH: `${bin}${delimiter}${process.env.PATH ?? ''}`,
|
||||
BLUE_GREEN_STATE_ROOT: stateRoot,
|
||||
BLUE_GREEN_STABILIZATION_SECONDS: '0',
|
||||
BLUE_GREEN_DRAIN_SECONDS: '0',
|
||||
DEPLOY_HEALTH_TIMEOUT_SECONDS: '2',
|
||||
DEPLOY_HEALTH_POLL_SECONDS: '1',
|
||||
MOCK_LOG: log,
|
||||
|
||||
Reference in New Issue
Block a user