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

BAM-25528: Unset pre-stop hook for bamboo-agent #719

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

bianchi2
Copy link
Collaborator

The shutdown script isn't part of the agent image, so this pre-stop hook was always failing. In fact, a proper pre stop hook for an agent will be the one that checks if an agent is busy or not. However, there's no such feature.

This PR sets agent.shutdown.command to nil but still makes it possible to have a pre-stop hook if the command is defined in user provided values.

Copy link
Member

@nanux nanux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, how come we didn't see this failure in the tests?

@bianchi2
Copy link
Collaborator Author

@nanux a failed pre-stop hook can only be discovered through k8s events, and only when you terminate the pod. Is benign in nature. If a preStop hook fails, kubelet just kills the container.

@bianchi2 bianchi2 merged commit bcfe067 into main Nov 21, 2023
2 checks passed
@bianchi2 bianchi2 deleted the BAM-25528-bamboo-agent-shutdown branch November 21, 2023 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants