jclouds-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <n...@apache.org>
Subject Re: jclouds-cli problems
Date Mon, 06 Apr 2015 21:36:40 GMT
Oh, understood.

So, the main issue here is that the cli is failing because the agent
stuff is not there, even if the agent code is not going to be reached
at all.

Instead of changing the catch block then, I'd suggest to pass the
"Agent Factory" to the SshClient constructor, instead of passing the
Optional<Connector> resulting on the factory invocation: Let's feed
the SSH client with the factory that knows how to produce SSH agent
connectors, instead of giving it an optional agent connector. This way
it is completely up to the SSH client to call the factory to get the
SSH agent proxy or not, and it will be only invoked when needed.

That should minimize the impact of the issue, and allow normal
operation when jclouds knows how to conenct to the node.

WDYT?

On 6 April 2015 at 23:05, Andrew Phillips <aphillips@qrmedia.com> wrote:
>> classpath and there might be errors we can't control, I'd say we can
>> safely catch a general Exception there and return an Absent value.
>
>
> I'd agree with that, but the tricky thing here is that what is thrown isn't
> even an Exception, it's an Error. So we'd have to catch all Errors here (or
> just this specific one), which seems nastier.
>
> I've been trying to see what happens if we add the other connector factory
> implementations to the jclouds-services feature in karaf. Unfortunately, it
> looks like that will require a change to jsch-agent-proxy itself, because
> currently it's stuck with a circular OSGi dep.
>
> I'll open a PR to see what happens there.
>
> Regards
>
> ap

Mime
View raw message