enableExecuteCommand not propagated to Tasks #7548
Labels
closed-for-staleness
ecs
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
I am unable to successfully set enableExecuteCommand=true to my Tasks in my ECS Cluster.
Expected Behavior
The Tasks started from Force new deployment should be able to be placed on the existing Container Instances after updating the service with --enable-execute-command. The Tasks started by Code Pipeline also should be successfully placed.
Current Behavior
I am successfully executing:
aws ecs update-service --cluster <my-cluster> --service <my-service> --region us-west-2 --enable-execute-command
But when I Force new deployment from the AWS Console I get:
service <my-service> was unable to place a task because no container instance met all of its requirements. The closest matching container-instance <my-instance> is missing an attribute required by your task.
I tried running
ecs-cli check-attributes --task-def <my-task-def>:<latest-revision> --container-instances <my-container-inst> --cluster <my-cluster>
but it returns "None" for missing attributes.Since I am running Blue/Green deployment I decided to try to update the Tasks with Code Pipeline, but after building the container the Deployment gets stuck - the newly created Task is in state PROVISIONING, more EC2 instances get spawned by my ASG but the Task never gets deployed. When I do
aws ecs describe-tasks --cluster <my-cluster> --tasks <newly-started-task-from-code-pipeline>
I get
"enableExecuteCommand": false,
which make me think that there is a bug somewhere in --enable-execute-command for Blue/Green Deployments.
The moment I turn back enableExecuteCommand to false in my Service the Tasks (in both cases I describe) get immediately placed on the cluster.
I also tried running this tool amazon-ecs-exec-checker but everything else but "Exec Enabled for Task" is green.
I also tried manually to compare the attributes required by my Task Definition and the ones I have on my Container Instance and everything seems to be present.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CLI version used
aws-cli/2.4.15 Python/3.8.8 Linux/5.15.0-56-generic exe/x86_64.ubuntu.20 prompt/off
Environment details (OS name and version, etc.)
Ubuntu 20.04
The text was updated successfully, but these errors were encountered: