Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Celluloid::IO 0.15.0 incompatible with Net::SSH 2.8.x #99

Closed
HoneyryderChuck opened this issue Feb 28, 2014 · 9 comments
Closed

Celluloid::IO 0.15.0 incompatible with Net::SSH 2.8.x #99

HoneyryderChuck opened this issue Feb 28, 2014 · 9 comments

Comments

@HoneyryderChuck
Copy link

Just tried using Net::SSH connection with Celluloid::IO::TCPSocket using the latest versions and it failed. It seems that it passes an hash to the third argument of the TCPSocket constructor, which is expected to be a String by Celluloid::IO.

I downgraded to version 2.0.14 of Net::SSH and everything worked.

@tarcieri
Copy link
Member

tarcieri commented Mar 3, 2014

We should try to document the issue around the missing third parameter. That's functionality we should support.

It's an options hash? I don't have time ATM to look into it more specifically, maybe tonight.

@HoneyryderChuck
Copy link
Author

Here is the exact error (using net-ssh 2.8.0):

Net::SSH.start('localhost', 'localuser') # all good
Net::SSH.start('localhost', 'localuser', proxy: Celluloid::IO::TCPSocket)
TypeError: can't convert Hash into String 
from /gems/celluloid-io-0.15.0/lib/celluloid/io/tcp_socket.rb:82:in `tcp'

Problem seems to be the third argument, local_host, whose value is an hash using net-ssh. And the strangest is, not even the raw TCPSocket initialize method handles hashes as third argument. But somehow connections are established anyways using net-ssh with raw tcpsockets.

@HoneyryderChuck
Copy link
Author

I just confirmed, the latest compatible version is 2.7.0 . Don't know what changed exactly.

@tarcieri
Copy link
Member

Is it passing in a bogus argument that MRI tolerates for some wacky reason?

Any chance you could bisect?

@Asmod4n
Copy link
Contributor

Asmod4n commented Mar 18, 2014

Maybe just copy what Rubinius is doing https://github.com/rubysl/rubysl-socket/blob/2.0/lib/rubysl/socket.rb

Von einem mobilen Gerät gesendet

Am 18.03.2014 um 03:49 schrieb Tony Arcieri notifications@github.com:

Is it passing in a bogus argument that MRI tolerates for some wacky reason?

Any chance you could bisect?


Reply to this email directly or view it on GitHub.

@HoneyryderChuck
Copy link
Author

Yup, I fail to see the wacky reason they are tolerating it. The third argument seems to be a Net::SSH options list (I remember I saw the auth_methods list there).

@HoneyryderChuck
Copy link
Author

I guess this has to do with net-ssh and how it handles proxies, celluloid doesn't have anything to do wiht it.

@HoneyryderChuck
Copy link
Author

The "issue" has been clarified. See net-ssh/net-ssh#220 (comment)

I think this is more a question of misleading documentation, see https://github.com/celluloid/celluloid-io/wiki/Libraries-that-support-Celluloid%3A%3AIO for net-ssh compatibility. You cannot unfortunately just override the proxy class, but provide a "proxified" way to initialize the socket.

Would like to see the proxy feature also documented on the net-ssh side, though.

@digitalextremist
Copy link
Member

@TiagoCardoso1983, I linked your comment to the Wiki. Feel free to expound and I will port your caveats to the Wiki, then reopen this ticket and ping me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants