puppetlabs / puppet_litmus

Providing a simple command line tool for puppet content creators, to enable simple and complex test deployments.
Apache License 2.0
88 stars 56 forks source link

Vagrant provisioning for Windows boxes fails #186

Closed bwilcox closed 1 year ago

bwilcox commented 5 years ago

Describe the Bug

I'm trying to add litmus to a forge module (ipcrm/registry_acl). Vagrant is my provisioner (2.2.5) and the machine does provision, but the rake task litmus:provision_list[win2012] fails before creating the inventory.yaml file.

bill:registry_acl bill.wilcox$ pdk bundle exec rake 'litmus:provision_list[win2012]'
pdk (INFO): Using Ruby 2.5.3
pdk (INFO): Using Puppet 6.8.1
Provisioning opentable/win-2012r2-standard-amd64-nocm using vagrant provisioner.[|]rake aborted!
Failed provisioning opentable/win-2012r2-standard-amd64-nocm using vagrant
{"node"=>"localhost", "target"=>"localhost", "action"=>"task", "object"=>"provision::vagrant", "status"=>"failure", "result"=>{"_error"=>{"kind"=>"facter_task/failure", "msg"=>"Attempted to run\ncommand:'vagrant winrm-config > /Users/bill.wilcox/repos/registry_acl/.vagrant/opentable/win-2012r2-standard-amd64-nocm-0/winrm-config'\nstdout:\nstderr:/opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/plugin/v2/config.rb:73:in `method_missing': undefined method `port' for #<VagrantPlugins::RDP::Config:0x000000010aed89f0> (NoMethodError)\n\tfrom /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/plugins/commands/winrm_config/command.rb:96:in `get_rdp_info'\n\tfrom /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/plugins/commands/winrm_config/command.rb:39:in `block in execute'\n\tfrom /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/plugin/v2/command.rb:238:in `block in with_target_vms'\n\tfrom /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/plugin/v2/command.rb:232:in `each'\n\tfrom /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/plugin/v2/command.rb:232:in `with_target_vms'\n\tfrom /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/plugins/commands/winrm_config/command.rb:35:in `execute'\n\tfrom /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/cli.rb:66:in `execute'\n\tfrom /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/lib/vagrant/environment.rb:290:in `cli'\n\tfrom /opt/vagrant/embedded/gems/2.2.5/gems/vagrant-2.2.5/bin/vagrant:182:in `<main>'\n"}}}
/Users/bill.wilcox/.pdk/cache/ruby/2.5.0/bundler/gems/puppet_litmus-b1edf5c66c6c/lib/puppet_litmus/rake_tasks.rb:157:in `block (2 levels) in <top (required)>'
/Users/bill.wilcox/.pdk/cache/ruby/2.5.0/bundler/gems/puppet_litmus-b1edf5c66c6c/lib/puppet_litmus/rake_tasks.rb:117:in `block (3 levels) in <top (required)>'
/Users/bill.wilcox/.pdk/cache/ruby/2.5.0/bundler/gems/puppet_litmus-b1edf5c66c6c/lib/puppet_litmus/rake_tasks.rb:113:in `each'
/Users/bill.wilcox/.pdk/cache/ruby/2.5.0/bundler/gems/puppet_litmus-b1edf5c66c6c/lib/puppet_litmus/rake_tasks.rb:113:in `block (2 levels) in <top (required)>'
/opt/puppetlabs/pdk/share/cache/ruby/2.5.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/opt/puppetlabs/pdk/private/ruby/2.5.3/bin/bundle:23:in `load'
/opt/puppetlabs/pdk/private/ruby/2.5.3/bin/bundle:23:in `<main>'
Tasks: TOP => litmus:provision
(See full trace by running task with --trace)

Expected Behavior

I expect the machine to provision cleanly so that I can run the rake task to install the puppet agent.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Added puppet_litmus to the Gemfile.
  2. pdk bundle update
  3. Add the rakefile stuff: require 'puppet_litmus/rake_tasks'
  4. Create the provision.yaml file:
    ---
    win2012:
    provisioner: vagrant
    images: 
    - 'opentable/win-2012r2-standard-amd64-nocm'
  5. Run the rake task: pdk bundle exec rake 'litmus:provision_list[win2012]'

Environment

LOCAL GEMS

addressable (2.7.0) ansi (1.5.0) ast (2.4.0) aws-eventstream (1.0.3) aws-partitions (1.211.0) aws-sdk-core (3.67.0) aws-sdk-ec2 (1.108.0) aws-sigv4 (1.1.0) bindata (2.4.4) bolt (1.29.0) builder (3.2.3) bundler (default: 1.17.3) CFPropertyList (2.3.6) childprocess (0.7.1) colored (1.2) concurrent-ruby (1.1.5) connection_pool (2.2.2) cri (2.15.6) deep_merge (1.2.1) diff-lcs (1.3) docile (1.3.2) docker-api (1.34.2) domain_name (0.5.20190701) equatable (0.6.1) erubis (2.7.0) excon (0.66.0) facter (2.5.6) facterdb (0.8.2) faraday (0.13.1) faraday_middleware (0.12.2) fast_gettext (1.1.2) ffi (1.9.25) gettext (3.2.9) gettext-setup (0.31) gssapi (1.3.0) gyoku (1.3.1) hiera (3.5.0) hiera-eyaml (3.0.0) highline (1.6.21) hitimes (1.3.0) hocon (1.2.5) http-accept (1.7.0) http-cookie (1.0.3) httpclient (2.8.3) jaro_winkler (1.5.3) jgrep (1.5.0) jmespath (1.4.0) json (2.2.0) json-schema (2.8.0) json_pure (2.1.0) little-plugger (1.1.4) locale (2.1.2) log4r (1.1.10) logging (2.2.2) metaclass (0.0.4) metadata-json-lint (2.2.0) mime-types (3.3) mime-types-data (3.2019.0904) minitar (0.6.1) mocha (1.9.0) multi_json (1.13.1) multipart-post (2.1.1) necromancer (0.5.0) net-http-persistent (3.1.0) net-scp (1.2.1) net-ssh (5.2.0) net-telnet (0.1.1) netrc (0.11.0) nori (2.6.0) optimist (3.0.0) orchestrator_client (0.4.2) parallel (1.17.0) parallel_tests (2.29.2) parser (2.6.4.1) pastel (0.7.3) pathspec (0.2.1) pdk (1.13.0) public_suffix (4.0.1) puppet (6.8.1) puppet-blacksmith (4.1.2) puppet-lint (2.3.6) puppet-resource_api (1.8.6) puppet-syntax (2.5.0) puppet_facts (0.2.1) puppet_forge (2.3.0) puppet_litmus (0.9.1) puppetlabs_spec_helper (2.14.1) r10k (3.3.1) rainbow (3.0.0) rake (12.3.3) rest-client (2.1.0) rspec (3.8.0) rspec-core (3.8.2) rspec-expectations (3.8.4) rspec-its (1.3.0) rspec-mocks (3.8.1) rspec-puppet (2.5.0) rspec-puppet-facts (1.9.5) rspec-support (3.8.2) rubocop (0.74.0) rubocop-rspec (1.35.0) ruby-progressbar (1.10.1) ruby_smb (1.1.0) rubyntlm (0.6.2) rubyzip (1.2.4) semantic_puppet (1.0.2) serverspec (2.41.5) sfl (2.3) simplecov (0.17.0) simplecov-console (0.5.0) simplecov-html (0.10.2) spdx-licenses (1.2.0) specinfra (2.81.0) terminal-table (1.8.0) text (1.3.1) tty-color (0.5.0) tty-cursor (0.7.0) tty-prompt (0.19.0) tty-reader (0.6.0) tty-screen (0.7.0) tty-spinner (0.9.1) tty-which (0.4.1) unf (0.1.4) unf_ext (0.0.7.6) unicode-display_width (1.6.0) windows_error (0.1.2) winrm (2.3.2) winrm-fs (1.3.2) wisper (2.0.0)


## Additional Context
I was able to manually create an inventory.yaml file with the vagrant box that looks like this after I manually tweeked the network configurations.  I'm not sure how to specify network configs in the provision.yaml as it doesn't look like that level of configuration is available.

groups:

tphoney commented 5 years ago

@michaeltlombardi have you seen any errors like this. If not i can try and have a look .

jordanbreen28 commented 1 year ago

hey @bwilcox. Thanks for raising this issue. I am currently auditing all ageing issues open of this repo, and as I cannot replicate and the image in question hasn't been released or maintained in over 8 years, I am voting to close this issue.

If you find this issue still persists with more recent releases, please do re-open and I'll pick it up from here! Thanks