Bug 218880 - [ssh][nls] request ssh keepalive to be configurable per connection
Summary: [ssh][nls] request ssh keepalive to be configurable per connection
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Martin Oberhuber CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: bugday, contributed
Depends on: 155026
Blocks:
  Show dependency tree
 
Reported: 2008-02-13 16:28 EST by Martin Oberhuber CLA
Modified: 2011-05-25 07:40 EDT (History)
2 users (show)

See Also:


Attachments
patch for bug 218880 (7.21 KB, patch)
2008-02-18 08:51 EST, Johnson Ma CLA
no flags Details | Diff
updated patch for bug218880 (16.81 KB, patch)
2008-03-07 19:38 EST, Johnson Ma CLA
mober.at+eclipse: iplog+
Details | Diff
Updated patch with minor stylistic changes (24.43 KB, patch)
2008-03-12 08:07 EDT, Martin Oberhuber CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2008-02-13 16:28:38 EST
+++ This bug was initially created as a clone of Bug #155026 +++

RSE ssh sessions to build.eclipse.org time out after 1 hour or so of inactivity.
When the user tries to use RSE after that time, e.g. type somehting in the ssh shell, there is a short delay and then an error message "connection...canceled" is shown.

RSE 3.0M5 added a hard-coded keepalive interval of 5 minutes as per bug 155026. This should be made user-configurable per connection.
Comment 1 Johnson Ma CLA 2008-02-17 20:57:25 EST
is there anyone working on this bug?
If not, I would like to contribute a fix to it soon.
Comment 2 Johnson Ma CLA 2008-02-18 08:51:13 EST
Created attachment 89976 [details]
patch for bug 218880

added a keepalive field  to the ssh setting page, and set the default value to 5 minutes.
call session.setServerAlive before connecting if the value is > 0.
Comment 3 Johnson Ma CLA 2008-02-18 08:58:23 EST
More on the patch:
I only added the keepalive config parameter to tm.terminal.ssh.

But i did not change the GUI for org.eclipse.rse.internal.connectorservice.ssh.
Since the ssh setting page for RSE is only asking for user name and password. Even did not ask for port, timeout...etc. So no point to only add keepalive here.   
Comment 4 Patrik Valtorta CLA 2008-02-22 06:54:08 EST
I'm using TM 2.0.2, but can not find where I can set the keepalive or timeout parameter. Can someone help me please?
Comment 5 Martin Oberhuber CLA 2008-02-22 07:07:41 EST
As you see from the bug status, this is not yet implemented so you don't have keepalives in 2.0.2. 
As you see in the target milestone of bug 155026, the hardcoded keepalives were added for TM 3.0M5 so even those are not in 2.0.2
Comment 6 Martin Oberhuber CLA 2008-02-28 16:39:19 EST
Patch looks good, just a few minor things:

1.) In the Copyright Headers of the files you're changing, please add a line
    listing your name and the change you are making. E.g.

    * Johnson Ma (Wind River) - [218880] Add UI setting for ssh keepalives

2.) As part of our due diligence as committers, we must ensure that all
    contributions are rightfully made under the EPL. That means, you need
    to verify that you have the right to contribute under the EPL and that
    you did not reference any 3rd party sources other than EPL sources.

    In the TM Project, we do this by asking contributors attach a corresponding
    note here on bugzilla, so could you please go ahead and add a comment here
    with the legal notice according to
   http://www.eclipse.org/dsdp/tm/development/committer_howto.php#external_contrib

3.) Since some users might not know what KeepAlive is, I'd love to see a 
    ToolTip with your new field, explaining what it is. The tooltip should
    also specify e.g. "(0 to disable)"

4.) Your patch only adds the Keepalive UI Setting for the Terminal. There is 
    also an SSH component of RSE which is independent of the Terminal. We'll
    have to add a corresponding UI setting there as well, e.g. in the form
    of a PropertySet as it's done for the FTP configuration in
    FTPConnectorService#getPropertySet()
Comment 7 Johnson Ma CLA 2008-03-07 19:38:21 EST
Created attachment 91947 [details]
updated patch for bug218880

I, {Johnson Ma}, declare that I developed attached code from scratch, without referencing any 3rd party materials except material licensed under the EPL. {I am authorized by my employer to make this contribution under the EPL.}
Comment 8 Martin Oberhuber CLA 2008-03-12 08:07:03 EDT
Created attachment 92294 [details]
Updated patch with minor stylistic changes

Thanks for the excellent patch. I've added a few more stylistic changes:

  * Updated copyright year 2008
  * Changed verbiage of keepalive tooltip
  * Added translatable label for RSE Properties
  * Created String constants for property keys (these are API since persisted!)
  * Added Javadoc for ISshSettings
Comment 9 Martin Oberhuber CLA 2008-03-12 08:08:51 EDT
Patch committed:

[218880] Apply patch from Johnson Ma: UI for SSH keepalives

Added comments on bug 186560 regarding translation (localization) of the Property Keys.
Comment 10 Martin Oberhuber CLA 2011-05-25 07:40:22 EDT
Comment on attachment 91947 [details]
updated patch for bug218880

This contribution was eventually used.