Agent Parser Virtual Canary Deploy
Use this skill only for the current model-api canary decision.
Current Facts
- only
model-apirollout matters right now;appandschedulerare intentionally down - keep one known-good
model-apitask alive onprivate_compute_2buntilvirtualis proven aws ecs execute-commandfromdevdirequires the local Session Manager plugin; a missing plugin is a local workstation blocker, not a task/runtime signal- the long-lived known-good control task was launched without ECS Exec enabled, so do not plan on shelling into that task directly
- there is no spare GPU capacity for an additional debug task; preserve the control task and inspect from the backing EC2 host instead
- known compute subnets:
subnet-0af4a9e336878ee2a(private_compute_2a)subnet-0169a334caa29e008(private_compute_2b)
- target virtual subnets:
subnet-0f705226bc734fc46(virtual-2a)subnet-07d3762965d56bf9c(virtual-2b)
- service security group:
sg-0211049d27ab2d3d5 - capacity provider:
agent-parser-gpu-ec2 - EFS file system:
fs-0f194741f7f2c89ce - EFS already has roughly
18 GiBof model artifacts - one task on
private_compute_2bcan reach Hugging Face and start - a sibling placement on
private_compute_2astill times out to Hugging Face - live proof from the healthy
private_compute_2btask:vllmusesHF_HOME=/root/.cache/huggingfacerefs/maincurrently points to snapshotc20223635762e1c871ad0ccb60c8ee5ba337b9aconfig.jsonexists under that exact snapshot path- older shell history values such as
68a6be06-c973-4e79-9e36-ccc3a6569bf1should be treated as stale until proven live again
- later proof from command invocation:
/root/.cache/huggingfaceis mounted asnfs4 127.0.0.1:/huggingface, which is consistent with an EFS-backed mount exposed inside the container
- final proof:
agent-parser-model-api:23can start successfully onvirtual-2a- both
vllmandmodel-apicontainers reachedRUNNING - a clean service redeploy on
:23later converged to one running service task invirtual-2a - the working service task kept
vllmHEALTHY;model-apimay still report ECS health asUNKNOWNeven while the task is serving
Preferred Canary Strategy
- do not hardcode a snapshot hash into
--model - keep
--modelasQwen/Qwen3.5-9B - keep
HF_HOME=/root/.cache/huggingface - add
HF_HUB_OFFLINE=1 - add
TRANSFORMERS_OFFLINE=1 - once
:23is proven, prefer a clean service-only rollout over keeping a parallel standalone debug task alive
Decision Frame
- do not switch the main service to
virtualfirst - do not discard the working
private_compute_2btask beforevirtualproof exists - without spare GPU, accept that the first
virtualproof is a service replacement rather than a parallel canary - if no spare GPU exists, use SSM
send-commandto the backing EC2 instance and inspect the livevllmcontainer withdocker exec - run one virtual subnet at a time; start with
virtual-2b, then repeat onvirtual-2a - sidecar Docker networking is a lower-priority hypothesis than subnet/AZ path drift because
awsvpctasks share the task ENI path - the canary goal is to prove whether the same task definition can start on
virtual, not to finish the full cutover - standalone
family:agent-parser-model-apitasks do not get adopted by the ECS service later; they must be removed before a clean service rollout - standalone tasks launched with the same capacity provider can still influence managed scaling and lead to extra GPU instances during debugging
Direct Workflow
- on
devdi, capture the current live task definition fromagent-parser-model-api - register a new task definition revision only if the
vllmenvironment must change - if proof is still needed, run a single standalone task in
virtual-2aorvirtual-2band verifyvllmplusmodel-apistartup - once proof exists, stop the standalone task before touching the service again
- scale the service to
0, stop leftover service tasks, and wait until the service is empty and stable - update the service to the proven task definition and restore
desired-count=1 - only after clean service convergence should you scale beyond one task
Direct Command Pattern
Use direct aws ecs CLI from devdi.
- avoid
deployment/deploy.sh - avoid render/deploy helpers unless the task definition itself must change
- prefer querying the live service/task definition instead of re-deriving values from memory
Success Criteria
- the replacement
virtual-2bcanary reachesRUNNING vllmandmodel-apicontainers both stay healthy long enough to inspect- the failure mode is clearly classified as one of:
- pure outbound drift
- EFS/path/bootstrap drift
- sidecar runtime failure unrelated to subnet egress
Output Contract
Return:
- the canary task ARN
- the actual subnet/AZ placement
- whether startup failure happened before or after
vllmmodel initialization - whether the next step should be
service cutover,offline/env fix, ornetwork diff