Skip to content
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

Interactive exec CWD problem with TF JSON #1397

Open
kke opened this issue Jun 12, 2019 · 0 comments · May be fixed by #1398
Open

Interactive exec CWD problem with TF JSON #1397

kke opened this issue Jun 12, 2019 · 0 comments · May be fixed by #1398
Labels
bug Something isn't working

Comments

@kke
Copy link
Contributor

kke commented Jun 12, 2019

pharos exec -r master --first --tf-json e2e/dititalocean/tf.json

Generates:

NoMethodError: undefined method `open_channel' for nil:NilClass
  /Users/kimmo/Projects/pharos-cluster/lib/pharos/transport/interactive_ssh.rb:22:in `run'
  /Users/kimmo/Projects/pharos-cluster/lib/pharos/transport/ssh.rb:104:in `block in interactive_session'
  /Users/kimmo/.rbenv/versions/2.6.3/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
  /Users/kimmo/Projects/pharos-cluster/lib/pharos/transport/ssh.rb:104:in `interactive_session'
  /Users/kimmo/Projects/pharos-cluster/lib/pharos/exec_command.rb:34:in `block in run_interactive'
  /Users/kimmo/Projects/pharos-cluster/lib/pharos/exec_command.rb:31:in `map'
  /Users/kimmo/Projects/pharos-cluster/lib/pharos/exec_command.rb:31:in `run_interactive'
  /Users/kimmo/Projects/pharos-cluster/lib/pharos/exec_command.rb:16:in `execute'
  /Users/kimmo/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/clamp-1.2.1/lib/clamp/command.rb:63:in `run'
  /Users/kimmo/Projects/pharos-cluster/lib/pharos/command.rb:25:in `run'
  /Users/kimmo/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/clamp-1.2.1/lib/clamp/subcommand/execution.rb:11:in `execute'
  /Users/kimmo/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/clamp-1.2.1/lib/clamp/command.rb:63:in `run'
  /Users/kimmo/Projects/pharos-cluster/lib/pharos/command.rb:25:in `run'
  /Users/kimmo/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/clamp-1.2.1/lib/clamp/command.rb:132:in `run'
  bin/pharos:12:in `<top (required)>'

The json has ssh_key "./ssh_key.pem", fixable by making that path relative to PWD. Perhaps TF json parser needs to Dir.chdir(File.dirname(tf_json_path)) or something similar.

@kke kke added the bug Something isn't working label Jun 12, 2019
@kke kke linked a pull request Jun 12, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant