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

[FIXED JENKINS-38539] Turn on SO_KEEPALIVE and provide CLI option to turn it off again #110

Merged
merged 2 commits into from
Sep 28, 2016

Conversation

stephenc
Copy link
Member

See JENKINS-38539

Will need to be merged up to master also

@reviewbybees @jenkinsci/code-reviewers

…turn it off again

- Most OSes have a default SO_KEEPALIVE of 2 hours, and perform keepalive without generating any significant traffic
  The master side of the connection already has SO_KEEPALIVE enabled, this just allows both OSes to keep their own
  guidance and therefore assist when tuning the agent side is more appropriate than changing the kernel parameters on
  the master side (as the master is handling the HTTP requests of users)
- Would probably be perfectly safe to not even expose the -noKeepAlive option as the SO_KEEPALIVE should be invisible
  But there may be users that have the requirement to disable, so safer to provide the option
- Change was developed against the stable-2.x branch
@@ -189,6 +189,10 @@ public boolean verify(String s, SSLSession sslSession) {
@Option(name="-noReconnect",usage="Doesn't try to reconnect when a communication fail, and exit instead")
public boolean noReconnect = false;

@Option(name = "-noKeepAlive",
usage = "Do not open the socket to the master with SO_KEEPALIVE enabled")
Copy link
Member

Choose a reason for hiding this comment

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

This does not tell me much as a user. Why would I want that?

Copy link
Member Author

Choose a reason for hiding this comment

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

I would argue that you do not want this unless you know why you do not want it... I could make it a system property rather than a CLI option... should only be required if we have a fundamental misunderstanding of how sockets work...

Copy link
Member

Choose a reason for hiding this comment

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

I would also rephrase it a bit

Copy link
Member

Choose a reason for hiding this comment

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

@olivergondza My plan is to create a documentation page, which will clarify options and their potential impact. By now I think the current summary string is acceptable. Do you agree?

Copy link
Member

Choose a reason for hiding this comment

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

Ack

@ghost
Copy link

ghost commented Sep 27, 2016

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@rsandell
Copy link
Member

🐝

1 similar comment
@batmat
Copy link
Member

batmat commented Sep 27, 2016

🐝

@oleg-nenashev
Copy link
Member

@reviewbybees done

@ghost
Copy link

ghost commented Sep 28, 2016

This pull request has completed our internal processes and we now respectfully request the maintainers of this repository to consider our proposal contained within this pull request for merging.

@oleg-nenashev
Copy link
Member

It's in the plan for the next release and hopefully 2.19.2

@oleg-nenashev oleg-nenashev merged commit e3f3526 into stable-2.x Sep 28, 2016
@oleg-nenashev oleg-nenashev deleted the jenkins-38539 branch September 28, 2016 16:33
oleg-nenashev added a commit to jenkinsci/jenkins that referenced this pull request Oct 9, 2016
2.61 does not exist, there was an issue during the release
Changes in 2.62: https://github.com/jenkinsci/remoting/blob/stable-2.x/CHANGELOG.md#2622

* [JENKINS-38539](https://issues.jenkins-ci.org/browse/JENKINS-38539) - 
Stability: Turn on SO_KEEPALIVE and provide CLI option to turn it off again.
(jenkinsci/remoting#110)
* [JENKINS-37539](https://issues.jenkins-ci.org/browse/JENKINS-37539) - 
Prevent <code>NullPointerException</code> in <code>Engine#connect()</code> when host or port parameters are <code>null</code> or empty.
(jenkinsci/remoting#101)
* [CID-152201] - 
Fix resource leak in <code>remoting.jnlp.Main</code>.
(jenkinsci/remoting#102)
* [CID-152200,CID-152202] - 
Resource leak in Encryption Cipher I/O streams on exceptional paths.
(jenkinsci/remoting#104)
oleg-nenashev added a commit to jenkinsci/jenkins that referenced this pull request Oct 11, 2016
…2585)

2.61 does not exist, there was an issue during the release
Changes in 2.62: https://github.com/jenkinsci/remoting/blob/stable-2.x/CHANGELOG.md#2622

* [JENKINS-38539](https://issues.jenkins-ci.org/browse/JENKINS-38539) - 
Stability: Turn on SO_KEEPALIVE and provide CLI option to turn it off again.
(jenkinsci/remoting#110)
* [JENKINS-37539](https://issues.jenkins-ci.org/browse/JENKINS-37539) - 
Prevent <code>NullPointerException</code> in <code>Engine#connect()</code> when host or port parameters are <code>null</code> or empty.
(jenkinsci/remoting#101)
* [CID-152201] - 
Fix resource leak in <code>remoting.jnlp.Main</code>.
(jenkinsci/remoting#102)
* [CID-152200,CID-152202] - 
Resource leak in Encryption Cipher I/O streams on exceptional paths.
(jenkinsci/remoting#104)
oleg-nenashev added a commit to jenkinsci/jenkins that referenced this pull request Nov 6, 2016
This PR picks the latest available version of remoting stable-2.x. All the fixes have been integrated into remoting-3.0 and soaked enough.

* [JENKINS-38539](https://issues.jenkins-ci.org/browse/JENKINS-38539) - 
Stability: Turn on SO_KEEPALIVE by default and provide CLI option to turn it off again.
(jenkinsci/remoting#110)
* [JENKINS-37539](https://issues.jenkins-ci.org/browse/JENKINS-37539) - 
Prevent <code>NullPointerException</code> in <code>Engine#connect()</code> when host or port parameters are <code>null</code> or empty.
(jenkinsci/remoting#101)
* [CID-152201] - 
Fix resource leak in <code>remoting.jnlp.Main</code>.
(jenkinsci/remoting#102)
* [CID-152200,CID-152202] - 
Resource leak in Encryption Cipher I/O streams on exceptional paths.
(jenkinsci/remoting#104)
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.

5 participants