question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`_cleanup_stale_resources()` deregisters unrelated ECS task definitions

See original GitHub issue

We observe that Dask Cloud Provider deregisters ECS task definitions that it did not create. This screenshot shows task definitions that:

  1. Dask Cloud Provider did not create
  2. Do not get marked as INACTIVE (i.e. unregistered) when Dask Cloud Provider hasn’t been run

image

We haven’t fully characterized this, but it appears that the current version of _cleanup_stale_resources() is too aggressive in its de-registering of task definitions.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
capdevccommented, Sep 1, 2020

@jacobtomlinson

This bit a user of dask-cloudprovider at my company. I don’t think the tags on task definitions are being checked in the same way that they are on clusters.

from: https://github.com/dask/dask-cloudprovider/blob/64aad0b702a9aa309d0de22b568a58e0199e711c/dask_cloudprovider/providers/aws/ecs.py#L1258-L1274

It looks like any task without a tag for “cluster” (line 1265) matches line 1269 and gets deregistered. If all that’s supposed to happen is checking for tasks tagged with a cluster not in the active list, then it’s a pretty easy local fix right in that code block to flip the None check and or. I assume it’s supposed to be checking for the DEAFULT_TAGS as well?

0reactions
AndrewHannigancommented, Jan 17, 2021

@jacobtomlinson @martindurant I have an open PR for this when you have a chance to review.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deregistering a task definition revision - AWS Documentation
When you deregister a task definition revision, it's immediately marked as INACTIVE . Existing tasks and services that reference an INACTIVE task definition...
Read more >
How do you delete an AWS ECS Task Definition?
Once all versions are deregistered (inactive), the Task Definition itself will also be deregistered but it and all inactive versions remain.
Read more >
Cleanup the ECS cluster - AWS App Mesh Workshop
Cleanup the ECS cluster. Delete the services running in your cluster. # Define variables # CLUSTER_NAME=$(jq < cfn-output.json -r '.
Read more >
Uninstall the ECS integration | New Relic Documentation
Manual uninstall · Delete the services: aws ecs delete-service --service "newrelic-infra" --cluster " YOUR_CLUSTER_NAME ". Copy · List the task definition for the ......
Read more >
class ECS. Client - Boto3 Docs 1.26.34 documentation
When you add, update, or remove the service registries configuration, Amazon ECS starts a new deployment. New tasks are registered and deregistered to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found