-
Notifications
You must be signed in to change notification settings - Fork 102
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
knife cluster kick
fails when options -x ubuntu -i knife/credentials/ec2_keys/<cluster>.pem are not specified
#230
Comments
At the core of this bug is the idea that "knife cluster kick" assumes that you want to log in to the remote server as $USER (i.e., in my case, "nick") rather than the user associated with the bootstrapping process (ubuntu). I think this is probably wrong, because it implies that every remote server, once bootstrapped, would have a set of Unix users on it that correspond to the sysadmins' $USER names on their management workstations. |
@nickmarden has it exactly. Infochimps burns AMIs that auto-vivify with the necessary users set up already, so we don't personally use the system user very often. I'd like to keep it that way internally, as it affords some extra security and accountability. The ideal solution, as I see it:
I'm currently waiting on a gorillib refactor for step 1; once underlays are solidified, then configuration can just be done wholesale with them. If this has become a blocker for you, I can accept pull requests with configuration done the old way. The minor magic for selecting username and keycombo should probably be built into |
Agreed. We don't use the system user either for the same reason. Our users are setup as part of the bootstrap process though. So we need to be able to kick as system user (ubuntu) if the boostrap fails without setting up our users for some reason.
I expected setting
Nope. Like I mentioned before, we need it only if bootstrap fails before setting up users. So the current configuration is fine. |
Unfortunately, |
#96 contains similar earlier discussion, which may have some relevance. |
Cool. Can we consider this matter closed then? |
I'm going to leave it open; it's worth fixing (at some point), just not as a super high priority. |
Ironfan gem version:
4.5.1
Ironfan-hombase git-sha:
c1d68b90bfe3bc2e798248a407791b16c806283d
test0 cluster definition:
https://gist.github.com/4379680
$ knife cluster kick test0-foobar-0
/Users/abhi/.rvm/gems/ruby-1.9.3-p286/gems/chef-10.16.2/lib/chef/knife/ssh.rb:101:in
block in session': undefined method
each' for nil:NilClass (NoMethodError)from /Users/abhi/.rvm/gems/ruby-1.9.3-p286/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session.rb:499:in
call' from /Users/abhi/.rvm/gems/ruby-1.9.3-p286/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session.rb:499:in
block in next_session'from /Users/abhi/.rvm/gems/ruby-1.9.3-p286/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session.rb:499:in
catch' from /Users/abhi/.rvm/gems/ruby-1.9.3-p286/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session.rb:499:in
rescue in next_session'from /Users/abhi/.rvm/gems/ruby-1.9.3-p286/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session.rb:482:in
next_session' from /Users/abhi/.rvm/gems/ruby-1.9.3-p286/gems/net-ssh-multi-1.1/lib/net/ssh/multi/server.rb:138:in
session'from /Users/abhi/.rvm/gems/ruby-1.9.3-p286/gems/net-ssh-multi-1.1/lib/net/ssh/multi/session_actions.rb:36:in `block (2 levels) in sessions'
Output of
$ knife cluster kick test0-foobar-0 -VV
https://gist.github.com/4379663
However,
knife cluster kick -x ubuntu -i knife/credentials/ec2_keys/foobar.pem
works.The text was updated successfully, but these errors were encountered: