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

Missing 'force' parameter on service deletion #220

Closed
asaf400 opened this issue Sep 3, 2020 · 5 comments
Closed

Missing 'force' parameter on service deletion #220

asaf400 opened this issue Sep 3, 2020 · 5 comments
Labels
affects_2.10 bug This issue/PR relates to a bug feature This issue/PR relates to a feature request has_pr module module needs_info This issue requires further information. Please answer any outstanding questions needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly needs_triage plugins plugin (any type)

Comments

@asaf400
Copy link
Contributor

asaf400 commented Sep 3, 2020

on this line:

return self.ecs.delete_service(cluster=cluster, service=service)

Ansible calls boto3's ECS.Client.delete_service API Functions, documented here:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs.html#ECS.Client.delete_service

The module should add support to call the boto3 function with 'force' parameter, which allows deletion of a service even if:

  • Scale isn't 0

  • Target Group has already been delete, resulting in this error:
    '{'Code': 'InvalidParameterException', 'Message': 'The target group arn:aws:elasticloadbalancing:<REGION>:<ACCOUNT>:targetgroup/<target_group_name>/<randomID> does not exist.'}'

the force parameter is only relevant for 'absent' state, as that is the only state that uses 'delete_service function

COMPONENT NAME

ecs_service

ISSUE TYPE
  • Bug Report
@ansibullbot ansibullbot added affects_2.10 feature This issue/PR relates to a feature request has_pr needs_info This issue requires further information. Please answer any outstanding questions needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly needs_triage labels Sep 22, 2020
@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link

@asaf400: Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information.

Here are the items we could not find in your description:

  • ansible version

Please set the description of this issue with this template:
https://raw.githubusercontent.com/ansible/ansible/devel/.github/ISSUE_TEMPLATE/bug_report.md

click here for bot help

@ansibullbot
Copy link

@asaf400 This issue is waiting for your response. Please respond or the issue will be closed.

click here for bot help

@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Nov 16, 2020
@ansibullbot
Copy link

@asaf400 You have not responded to information requests in this issue so we will assume it no longer affects you. If you are still interested in this, please create a new issue with the requested information.

click here for bot help

ansible-zuul bot pushed a commit that referenced this issue Oct 22, 2021
Allow ECS.Client.delete_service to force delete a service

SUMMARY
Change allows ansible to forcefully delete a service,
required when deleting a service with >0 scale, or no target group
ISSUE TYPE
#220
COMPONENT NAME
ecs_service

Reviewed-by: None <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 bug This issue/PR relates to a bug feature This issue/PR relates to a feature request has_pr module module needs_info This issue requires further information. Please answer any outstanding questions needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly needs_triage plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

2 participants