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

Jenkins Slave Pod Retention Proposal #347

Closed

Conversation

Projects
None yet
2 participants
@adambkaplan
Copy link
Contributor

commented Jun 21, 2018

Proposal for adding a new configuration option to the plugin, enabling control over the retention of pod data.

JENKINS-48149

@carlossg carlossg requested a review from Vlatombe Jun 22, 2018

2. Use configuration option to check if pod should be deleted. Options:
1. Directly modify `KubernetesSlave`'s `_terminate` behavior.
2. Refactor such that the pod deletion behavior is guided by a `RetentionStrategy` instance.
3. Prior to disconnect, call to the slave JNLP Engine and signal that it should not attempt to reconnect to the master. [1](#footnote-1)

This comment has been minimized.

Copy link
@carlossg

carlossg Jun 22, 2018

Contributor

I don't know how to do this, maybe somebody else can chime in. You can disconnect the agent from the master but even then I think the process keeps running.
However at _terminate if the pod is still running it means it worked successfully, you could check

  • if pod is running and retention Never or On failure -> delete pod
  • if pod is running and retention Always -> maybe exec and kill pid 1 ?
  • if pod is not running and retention is Never -> delete pod
    In other cases leave pod around

This comment has been minimized.

Copy link
@adambkaplan

adambkaplan Jun 25, 2018

Author Contributor

I have an idea on how to do this if the slave pod has a JNLP agent running - I'll make a note in the implementation PR.

@carlossg
Copy link
Contributor

left a comment

LGTM see note about stopping agent

@adambkaplan

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2018

Implemented in #354

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.