-
Notifications
You must be signed in to change notification settings - Fork 32
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
strange behavior with Rye::Box instances in a Hash #47
Comments
Hmm that's odd. Thanks for all the detail. I'll have to take a look.
|
in debug mode i saw that the command is actually executed.
so i'm fine with that :) Also forget my comment about the Rye::Sets, i found my mistake in adding the boxes, so everything is working now. T. |
Thanks for the update. Glad to here it's working.
|
+1 have the same issue. for the code retrieving box from a hash I've got the same error private
# Retrieve or set rye_session
def fetch_rye(node=nil, ssh_config=nil)
if @@rye_session[node].nil?
puts "==> new"
@@rye_session = Rye::Box.new(node, ssh_config || self.ssh_config)
else
puts "==> here"
@@rye_session[node]
end
end cwd is havoced => #<Remote:0x00000002659e18 @ssh_config={:keys=>["/root/.ssh/busybee"], :auth_methods=>["publickey"]}>
2.2.1 :059 > remote.send(:fetch_rye, "172.17.0.170")
==> new
=> #<Rye::Box:172.17.0.170 name=172.17.0.170 cwd= umask= env="" safe=true opts={:port=>nil, :keys=>["/root/.ssh/busybee"], :auth_methods=>["publickey"], :paranoid=>true} keys=[]>
2.2.1 :060 > remote.send(:fetch_rye, "172.17.0.170")
==> here
=> #<Rye::Box:172.17.0.170 name=172.17.0.170 cwd=172.17.0.170/172.17.0.170 umask= env="" safe=true opts={:port=>nil, :keys=>["/root/.ssh/busybee"], :auth_methods=>["publickey"], :paranoid=>true} keys=[]>
2.2.1 :061 > |
Hi,
i'm a sysadmin working on a tool for doing my daily tasks on my server farm.
Due to the fact that i have around 70 hosts and also put them in logical groups together, i do initialize Rye:Boxes and Rye::Sets in Hashes and later work with them.
That leads to an behavior, i can not work with and also absolutely don't understand:
My ENV:
Example in irb:
now comes the (not so) funny part, this doesn't work:
but i'm working with an Rye::Box object with an existing method 'uptime'
but this works:
I also create Rye::Sets in a Hash and populate them with the boxes out of another hash but this somehow leads to losing my ssh-key, so i get a password prompt... But i first want to understand this simple example above.
If you could help me out i would really appreciate that.
Best,
Torsten
The text was updated successfully, but these errors were encountered: