The Bamboo Agents run via the Tanuki Service Wrapper, which is responsible for managing the stop/start/restart functions of the application. Currently, a stop command sent to the Agent's Java application via the wrapper results in a hard stop, regardless of the agent's current activity. This can lead to disruptions when the agent is executing builds or deployment jobs.
To address this issue, a feature addition is proposed: the implementation of a graceful stop functionality. This feature would allow the Bamboo Agent to capture a special kill signal, enabling it to complete ongoing tasks before stopping. It is also essential for the wrapper to comprehend and transmit this signal.
Incorporating this feature might require changes to the bamboo-agent.sh script, such as the inclusion of a graceful_stop option. This adjustment would ease the introduction of a proper shutdown script – like the /shutdown-wait.sh used by the Bamboo Server docker container – and the implementation of a correct preStop hook through Helm charts for the Bamboo Agents.
This proposed feature is expected to enhance the reliability and flexibility of the Bamboo Agents, particularly in environments where tasks are frequently initiated and terminated.
- depended on by
-
BAM-25528 The shutdown-wait.sh script is placed in the the repository and not found in the Bamboo agent pod
-
- Closed
-