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

Failed to complete #converge action: [undefined method `[]' for #<WinRM::Output:0x4adaab8>] #32

Closed
rneu31 opened this issue Mar 17, 2017 · 1 comment · Fixed by #33
Closed

Comments

@rneu31
Copy link

rneu31 commented Mar 17, 2017

Has anyone seen this error before?

Kitchen: ---Nested Exception---
Kitchen: Class: Kitchen::ActionFailed
Kitchen: Message: Failed to complete #converge action: [undefined method `[]' for # WinRM::Output:0x4adaab8>]
Kitchen: C:/Users/.../AppData/Local/chefdk/gem/ruby/2.3.0/gems/kitchen-nodes-0.9.0/lib/kitchen/provisioner/finder/winrm.rb:29:in `find_ips'

Running the command shown here https://github.com/mwrock/kitchen-nodes/blob/master/lib/kitchen/provisioner/finder/winrm.rb#L26 manually on the virtualbox windows instance returns what I would expect it to.

@rneu31
Copy link
Author

rneu31 commented Mar 17, 2017

Hacked together something quick, it works for my simple case. It seems that the :data in out[:data] is no longer a thing. I could not track down why this may be the case.

  out = @connection.node_execute(
    '(ipconfig) -match \'IPv[46] Address\''
  )
  out_list = out.stdout.split("\n")
  data = []
  
  out_list.each do |line|
    puts 'LINE: '
    puts line
    data << Regexp.last_match[1] if line.chomp =~ /:\s*(\S+)/ 
  end
  data

@mwrock mwrock mentioned this issue Mar 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant