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

Parallel policy dependencies fail with frozen cookbook error #31

Open
t0rrant opened this issue Mar 19, 2019 · 1 comment
Open

Parallel policy dependencies fail with frozen cookbook error #31

t0rrant opened this issue Mar 19, 2019 · 1 comment
Labels
Triage: Confirmed Indicates and issue has been confirmed as described. Type: Bug Does not work as expected.

Comments

@t0rrant
Copy link

t0rrant commented Mar 19, 2019

Description

When creating (at least) two policy files that include a common policy file, the push to the chef server fails with:

Uploading policy policy1-v1-2019-03-18-controller (1b1bb7c956) to policy group policy-group-a
Error: Failed to upload policy to policy group policy-group-a
Reason: (Chef::Exceptions::CookbookFrozen) Version 1.0.1 of cookbook mycookbook is frozen. Use --force to override.

ChefDK Version

ChefDK: 3.8.14-1

Platform Version

OS: Ubuntu 18.04

Replication Case

Create base policy, i.e: Policyfile.rb:

  name 'policy-v1'
  default_source :chef_server, '${local.chef-server}'
  run_list 'cookbook::default'
  cookbook 'cookbook', '> 0.0.0'

Create second and third policies, i.e:

Policyfile_policy1:

  name 'policy1-v1'
  default_source :chef_server, '${local.chef-server}'
  include_policy "policy-v1", policy_group: "policy-group", server: "${local.chef-server}"
  run_list 'cookbook::recipe1'

Policyfile_policy2.rb

  name 'policy2-v1'
  default_source :chef_server, '${local.chef-server}'
  include_policy "policy-v1", policy_group: "policy-group", server: "${local.chef-server}"
  run_list 'cookbook::recipe2'

Then install and push each one, the last one should fail:

$ chef install Policyfile.rb && chef push policy-group Policyfile.rb
$ chef install Policyfile_policy1.rb && chef push policy-group-1 Policyfile_policy1.rb
$ chef install Policyfile_policy2.rb && chef push policy-group-2 Policyfile_policy2.rb

Notes

I am not sure this is a bug with chefdk or with chef-server, starting here in hope to get in the right direction.

NOTE: CHEFDK BUGS ONLY

This issue tracker is for the code contained within this repo -- chefdk.

@tyler-ball tyler-ball transferred this issue from chef-boneyard/chef-dk Sep 16, 2019
@tyler-ball tyler-ball added Aspect: Correctness Triage: Confirmed Indicates and issue has been confirmed as described. Type: Bug Does not work as expected. labels Sep 16, 2019
@tyler-ball
Copy link
Contributor

Moved from the chef-dk repo to here, but we will need to backport whatever fix we have to chef-dk as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage: Confirmed Indicates and issue has been confirmed as described. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

3 participants