Page MenuHomePhabricator
Paste P7783

endpoint failure in cxserver deployment
ActivePublic

Authored by KartikMistry on Nov 9 2018, 12:20 PM.
kartik@deploy1001:/srv/deployment/cxserver/deploy$ scap deploy 'Update cxserver to 01686f6 (T208831)'
12:16:23 Started deploy [cxserver/deploy@fc21164]
12:16:23 Deploying Rev: HEAD = fc2116474adfb15b16ede856699dee843dc50d13
12:16:23 Started deploy [cxserver/deploy@fc21164]: Update cxserver to 01686f6 (T208831)
12:16:23
== CANARY ==
:* scb2001.codfw.wmnet
cxserver/deploy: fetch stage(s): 100% (ok: 1; fail: 0; left: 0)
cxserver/deploy: config_deploy stage(s): 100% (ok: 1; fail: 0; left: 0)
12:17:02 ['/usr/bin/scap', 'deploy-local', '-v', '--repo', 'cxserver/deploy', '-g', 'canary', 'promote', '--refresh-config'] on scb2001.codfw.wmnet returned [1]: Linking config files at: /srv/deployment/cxserver/deploy-cache/revs/fc2116474adfb15b16ede856699dee843dc50d13/.git/config-files
Executing check 'depool'
Check 'depool' completed, output: Warning: error while checking the pooled state on 10.192.17.6:9090: Net::ReadTimeout
Restarting service 'cxserver'
Port 8080 not up. Waiting 3.00s
Port 8080 up in 3.00s
Executing check 'endpoints'
Check 'endpoints' failed: /v2/translate/{from}/{to}{/provider} (Machine translate an HTML fragment using TestClient, adapt the links to target language wiki.) is CRITICAL: Test Machine translate an HTML fragment using TestClient, adapt the links to target language wiki. returned the unexpected status 404 (expecting: 200); /v1/mt/{from}/{to}{/provider} (Machine translate an HTML fragment using TestClient.) is CRITICAL: Test Machine translate an HTML fragment using TestClient. returned the unexpected status 404 (expecting: 200)
Executing check 'repool'
Check 'repool' completed, output:
cxserver/deploy: promote and restart_service stage(s): 100% (ok: 0; fail: 1; left: 0)
12:17:02 1 targets had deploy errors
12:17:02 1 targets failed
12:17:02 1 of 1 canary targets failed, exceeding limit
Rollback all deployed groups? [Y/n]: Y

Event Timeline

Only route that explicitly returns 404 is fetchPage.

I believe TestClient needs to be added to the config.yaml or config.prod.yaml. The tests when run from command line automatically load config.dev.yaml, but that does not happen in production.

Not sure why the HTTP code is 404 though and not 500.

Only route that explicitly returns 404 is fetchPage.

I believe TestClient needs to be added to the config.yaml or config.prod.yaml. The tests when run from command line automatically load config.dev.yaml, but that does not happen in production.

Yes, the yaml file in production should have the following lines for mt key

TestClient:
  languages: config/TestClient.yaml

Not sure why the HTTP code is 404 though and not 500.

From v1.js, getMTClient

if ( !provider ) {
	res.status( 404 ).end( 'Provider not supported' );
	return;
}