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

For WinRM options, only treat strings as strings. #330

Merged

Conversation

yvovandoorn
Copy link
Contributor

@yvovandoorn yvovandoorn commented Sep 30, 2017

This fix tries to differentiate strings from non-strings when using kitchen-vagrant & WinRM. It likely addresses #327 but also an issue I observed when using retry_delay and retry_limit.

I believe with WinRb/WinRM@a4ab853 in WinRM with switching from FixNum to Integer, certain features, notably retry_delay and retry_limit, no longer work when passed in Test Kitchen. This is likely caused by #306 will always treat set configuration for WinRM as a string.

First observed when using Vagrant 2.0.0 (which includes 2.2.3 of https://github.com/WinRb/WinRM and Ruby 2.4.0) and latest stable Chef DK (2.3.4).

       /opt/vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/connection_opts.rb:87:in `validate_integer': retry_delay must be a Integer (RuntimeError)
       	from /opt/vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/connection_opts.rb:79:in `validate_data_types'
       	from /opt/vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/connection_opts.rb:62:in `validate'
       	from /opt/vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/connection_opts.rb:33:in `create_with_defaults'
       	from /opt/vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/connection.rb:66:in `configure_connection_opts'
       	from /opt/vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/connection.rb:29:in `initialize'
       	from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/winrm/shell.rb:186:in `new'
       	from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/winrm/shell.rb:186:in `new_connection'
       	from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/winrm/shell.rb:192:in `connection'
       	from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/winrm/shell.rb:66:in `cmd'
       	from /opt/vagrant/embedded/gems/gems/vagrant-2.0.0/plugins/communicators/winrm/communicator.rb:107:in `block in ready?'

@tas50
Copy link
Member

tas50 commented Sep 30, 2017

@stuartpreston @mwrock @smurawski are probably the best to chime in here

@yvovandoorn
Copy link
Contributor Author

Thanks @tas50.

@mwrock
Copy link
Member

mwrock commented Oct 2, 2017

Yeah i think this looks like the right thing to do!

@yvovandoorn
Copy link
Contributor Author

so we should get this merged (and released then) then, yes?

@mwrock
Copy link
Member

mwrock commented Oct 9, 2017

Fur sure! cc @test-kitchen/maintainers

@tas50 tas50 merged commit cdebe04 into test-kitchen:master Oct 10, 2017
@yvovandoorn yvovandoorn deleted the yvandoorn/fixWinRMAlwaysAString branch October 18, 2017 09:35
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 this pull request may close these issues.

3 participants