Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred (InvalidParameterException) when calling the DescribeTasks operation: Tasks cannot be empty when the cluster is deploying with no tasks running #63

Closed
xgt001 opened this issue Aug 31, 2016 · 3 comments

Comments

@xgt001
Copy link

xgt001 commented Aug 31, 2016

This happens when there is no task running in the ECS cluster during deployment. Say you have a single container service defined, with minimum health of 0, then the deployment causes the cluster to temporarily have 0 tasks running. This causes the error below to be thrown.

ecs-deploy -c blah -n blah -i blah.dkr.ecr.us-east-1.amazonaws.com/blah/blah:95e7aab8 -t 120
Using image name: blah.dkr.ecr.us-east-1.amazonaws.com/blah/blah:95e7aab8
Current task definition: arn:aws:ecs:us-east-1:blah:task-definition/blah:2
New task definition: arn:aws:ecs:us-east-1:blah:task-definition/blah:3

An error occurred (InvalidParameterException) when calling the DescribeTasks operation: Tasks cannot be empty.
Service updated successfully, new task definition running.

Verbose:

+ RUNNING=
+ :
+ '[' '' ']'
+ sleep 10
+ i=20
+ '[' 20 -lt 120 ']'
++ /usr/local/bin/aws --output json ecs list-tasks --cluster blah --service-name blah --desired-status RUNNING
++ jq -r '.taskArns[]'
+ RUNNING_TASKS=
++ /usr/local/bin/aws --output json ecs describe-tasks --cluster blah --tasks
++ jq '.tasks[]| if .taskDefinitionArn == "arn:aws:ecs:us-east-1:blah:task-definition/blah:4" then . else empty end|.lastStatus'
++ grep -e RUNNING

An error occurred (InvalidParameterException) when calling the DescribeTasks operation: Tasks cannot be empty.

This does not impact the deployment though and the service will get correctly updated.

@fillup
Copy link
Contributor

fillup commented Aug 31, 2016

Hi there, this has actually been fixed but not merged into master yet. I'll get it merged to master shortly and roll a release for it.

@fillup
Copy link
Contributor

fillup commented Aug 31, 2016

The fix has been merged into master and released as version 2.5.0

@fillup fillup closed this as completed Aug 31, 2016
@xgt001
Copy link
Author

xgt001 commented Aug 31, 2016

Fantastic! Thanks a tonne!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants