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

NoMethodError when parallel push of policyfile #41

Open
stonesbg opened this issue Feb 20, 2018 · 2 comments
Open

NoMethodError when parallel push of policyfile #41

stonesbg opened this issue Feb 20, 2018 · 2 comments
Labels
Triage: Needs Information Indicates an issue needs more information in order to work on it. Type: Bug Does not work as expected.

Comments

@stonesbg
Copy link

Description

Trying to do parallel push of a single policyfile to multiple policy groups. This is being executed from a jenkins pipeline. I am guessing it is something to do with the lock file being accessed by more than once process at the same time.

ChefDK Version

I have tried this with 2.4.17 and 1.6.11

Platform Version

Windows Server 2012 R2

Replication Case

Create a batch file .bat or similar solution in order to create parallel exceution of the command chef push. I have been able to replicate this by having a bat file with start chef push ... with a total of 10 executions.

Stacktrace

Error: Invalid lockfile data
Reason: (NoMethodError) undefined method `[]' for nil:NilClass


C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-dk-2.4.17/lib/chef-dk/policyfile_lock.rb:402:in `set_name_from_lock_data'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-dk-2.4.17/lib/chef-dk/policyfile_lock.rb:270:in `build_from_lock_data'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-dk-2.4.17/lib/chef-dk/policyfile_services/push.rb:102:in `validate_lockfile'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-dk-2.4.17/lib/chef-dk/policyfile_services/push.rb:77:in `run'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-dk-2.4.17/lib/chef-dk/command/push.rb:74:in `run'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-dk-2.4.17/lib/chef-dk/command/base.rb:58:in `run_with_default_options'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-dk-2.4.17/lib/chef-dk/cli.rb:73:in `run'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-dk-2.4.17/bin/chef:25:in `<top (required)>'
C:/opscode/chefdk/embedded/bin/chef:23:in `load'
C:/opscode/chefdk/embedded/bin/chef:23:in `<main>'
@tas50
Copy link
Contributor

tas50 commented Aug 7, 2018

@stonesbg Any chance you can try to reproduce this with the latest ChefDK. We'd made changes to policyfiles as well as bumped the Ruby version.

@tyler-ball tyler-ball transferred this issue from chef-boneyard/chef-dk Sep 30, 2019
@tyler-ball tyler-ball added Aspect: Correctness Triage: Needs Information Indicates an issue needs more information in order to work on it. Type: Bug Does not work as expected. labels Sep 30, 2019
@pkazi
Copy link

pkazi commented Dec 10, 2019

Is there any update on this? We also faced this on parallel push to multiple policy groups from jenkins pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage: Needs Information Indicates an issue needs more information in order to work on it. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

4 participants