Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [linuxtools-dev] LTTng 2.0 connection type

Hi Anna

Thank you very much for your input and patch. See below for my answers
and comments. For your patch, please refer to my comment on the bug
report.

SSH/SFTP reference
-------------------------------
In the source code I don't have a direct reference to any SSH and SFTP
source code of RSE. The reference to SSH and SFTP happens through the
extension definition "org.eclipse.rse.core.systemTypes in the
plugin.xml. I define a systemType for LTTng 2.0. It defines
subsystemConfigurationIds that uses "ssh.shells" and "ssh.files".
Additionally, in the NewConnectionDialog.java implementation only
these subSystem types are considered.

Connection independent use of LTTng 2.0 trace control:
-------------------------------------------------------------------------------
To use LTTng 2.0 "through any connection that has files and shells
subsystems" (as you mentioned) is the ultimate goal of the
implementation. I had that in mind when I designed it, however I
wanted to make it work for one specific and known type first. Now,
since it works for SSH/SFTP we can see how to support other types of
subsystems. For the files subsystem I don't see any problems. For the
independent shell support, the current implementation has a problem.
The implementation for executing commands (method executeCommand() in
class CommandShell, package
org.eclipse.linuxtools.internal.lttng2.ui.views.control.remote) works
currently only with the SSH command shell implementation of RSE. It
expects a specific shell output format after sending a command (e.g.
it expects that the command line is echoed back). As an experiment I
tried it with the local host shell implementation of RSE and it
failed.

So, to support other RSE shell implementations, this class (in
particular method executeCommand()) has to be adapted. I'm currently
doing some prototypes and hope to find a solution. Do you have by any
chance code examples that solves that problem?

Further considerations:
-------------------------------
Once the LTTng 2.0 tracer control is independent of the shell and
files subsystems, I think we should also change the way new
connections are created from the Control View. There won't be any need
to limit the creation of a host to the LTTng 2.0 system type. It
should allow for creating hosts using any shell and files subsystem
combination. This should be looked at too.

Please let me know what you think.

Best Regards
Bernd

On Thu, Jun 14, 2012 at 6:39 PM, Anna Dushistova
<anna.dushistova@xxxxxxxxx> wrote:
> I filed a bug for it and attached a patch for further discussions:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=382684
>
> Anna.
>
> On Thu, Jun 14, 2012 at 2:41 AM, Anna Dushistova
> <anna.dushistova@xxxxxxxxx> wrote:
>> Hi Bernd,
>>
>> I looked through the code and didn't notice any use of ssh/sftp
>> specific classes/methods.
>> I personally would like to be able to use LTTng 2.0 through any
>> connection that has
>> files and shells/terminals subsystems, be it over SSH or TCF or anything else.
>> I implemented something like this in org.eclipse.cdt.launch.remote[1].
>> We could do the same
>> for LTTng 2.0 if there are no restrictions from the remote side.
>> What do you think?
>>
>> [1] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java
>> , see methods like getSuitableConnections(),
>> getSubsystemWithShellService()...
>>
>> Anna.
>>
>> On Wed, Jun 13, 2012 at 5:55 PM, Bernd Hufmann <bhufmann@xxxxxxxxx> wrote:
>>> Hi Anna
>>>
>>> You're right the LTTng 2.0 connection type also needs a sftp_server to
>>> be available on the remote side. This is used for importing traces
>>> from the remote node. I've already updated the user documentation on
>>> the wiki.
>>>
>>> The LTTng 2.0 connection type (RSE system type) uses internally the
>>> RSE subsystem type ssh.shells for executing LTTng 2.0 commands. It
>>> also uses ssh.files for importing traces from the remote system to the
>>> Eclipse workspace. The type ssh.files uses a sftp implementation
>>> internally.
>>>
>>> As a test, I disabled sftp on my test remote host. The first time I
>>> try to connect I get an exception with a message that sftp_server is
>>> not installed. Then, when I do the connection the second time I don't
>>> get this exception and the shell subsystem connects. Once the
>>> connection is established I was able to use the tracer control. Of
>>> course importing of traces fails. However, having to deal with
>>> exception is not very convenient.
>>>
>>> I have to investigate further how the LTTng 2.0 tracer control in
>>> Eclipse can support the RSE scp implementation that you suggested as
>>> an alternative to sftp. I'll get back to you when I know more.
>>>
>>> Best Regards
>>> Bernd
>>>
>>> On Wed, Jun 13, 2012 at 3:41 AM, Anna Dushistova
>>> <anna.dushistova@xxxxxxxxx> wrote:
>>>> Hi All,
>>>>
>>>> I have a question about LTTng2.0 connection type. Documentation says
>>>> "requires an SSH server to be running on the remote host".
>>>> My remote host has ssh, however, it doesn't have sftp, which is
>>>> actually very common in the embedded world.
>>>> TM has now an SCP file subsystem
>>>> (http://www.eclipse.org/downloads/download.php?file=/tm/downloads/drops/S-3.4RC2-201205300905/RSE-scp-incubation-3.4RC2.zip)
>>>> that allows file transfer over scp. Could we maybe offer a choice
>>>> between these two subsystems during connection creation process?
>>>> Another option might be adding the SFTP requirement to the documentation.
>>>>
>>>> Let me know what you think!
>>>> Thanks!
>>>> Anna.
>>>> _______________________________________________
>>>> linuxtools-dev mailing list
>>>> linuxtools-dev@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/linuxtools-dev
>>> _______________________________________________
>>> linuxtools-dev mailing list
>>> linuxtools-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/linuxtools-dev
> _______________________________________________
> linuxtools-dev mailing list
> linuxtools-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/linuxtools-dev


Back to the top