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

Runlist conflicts with policy_name and policy_group settings in first-boot.json #285

Closed
gsreynolds opened this issue Nov 18, 2019 · 2 comments · Fixed by #287
Closed

Runlist conflicts with policy_name and policy_group settings in first-boot.json #285

gsreynolds opened this issue Nov 18, 2019 · 2 comments · Fixed by #287

Comments

@gsreynolds
Copy link
Contributor

gsreynolds commented Nov 18, 2019

Reoccurrence of #211

Providing no run list and using custom_json_attr results in a first run failure:

# Logfile created on 2019-11-18 17:02:43 +0000 by logger.rb/61378
[2019-11-18T17:02:51+00:00] ERROR: Running exception handlers
[2019-11-18T17:02:51+00:00] ERROR: Exception handlers complete
[2019-11-18T17:02:51+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2019-11-18T17:02:51+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-11-18T17:02:51+00:00] FATAL: Chef::PolicyBuilder::Policyfile::UnsupportedFeature: Policyfile does not support override run lists. Use named run_lists instead.

Line in question appears to be

command = "chef-client #{first_client_run_recipe_path} -j #{bootstrap_directory}/first-boot.json -c #{bootstrap_directory}/client.rb -L #{@azure_plugin_log_location}/chef-client.log --once"
where the path to first_client_run_recipe.rb is interpreted as a named run list.

Policyfile does not support override run lists. Use named run_lists instead.

e.g. chef-client /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/azure-chef-extension-0.0.1/lib/chef/azure/first_client_run_recipe.rb -j /etc/chef/first-boot.json -c /etc/chef/client.rb

$ cat /etc/chef/first-boot.json
{"policy_group":"testing","policy_name":"base"}

Related #259, as full support for Policyfiles rather than using custom_json_attrs would be preferable.

@gsreynolds
Copy link
Contributor Author

Looks like first_client_run_recipe.rb was introduced in #255
67ed323#diff-071e0854a12e1a1e26aa93361d1fbacd

@Vasu1105
Copy link
Contributor

Thanks @gsreynolds. We will be working on this and update you once fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants