hashicorp / terraform-docs-agents

Content for Terraform's agents documentation.
terraform-docs-agents.vercel.app
Mozilla Public License 2.0
7 stars 15 forks source link

SIGTERM with timeout=3m still doesn't deregister the agent from the pool #47

Open alankan-finocomp opened 1 year ago

alankan-finocomp commented 1 year ago

Hi :wave:

base image: hashicorp/tfc-agent:1.7

I am trying to follow this doc to make my agent container exits gracefully.

I am using Ansible docker container with the following configs:

- name: Stop it
  community.docker.docker_container:
    name: tfc-agent
    image: tfc-agent
    # https://developer.hashicorp.com/terraform/cloud-docs/agents/agents#stop-the-agent; `recreate: true` => force kill
    state: stopped 
    stop_timeout: 180 # 3m

By default, SIGTERM should be sent so it should behave exactly as documented, however, TFC doesn't deregister it as expected... image

What's worse, my subscription has only 1 quota for agent and there is no delete button on UI. I have no choice but remove the entire pool and redo from scratch...

Is there anything I have missed or misconfigured?