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

Custom Ohai plugin not functioning properly after Chef 17 upgrade. #1762

Open
JaBurd opened this issue Aug 1, 2022 · 0 comments
Open

Custom Ohai plugin not functioning properly after Chef 17 upgrade. #1762

JaBurd opened this issue Aug 1, 2022 · 0 comments

Comments

@JaBurd
Copy link

JaBurd commented Aug 1, 2022

We've been using the community custom Ohai plugin for ec2 tags for many years. It's been functioning well up until our recent Chef 17 upgrade. Once a server is upgraded to the Chef 17 client the ec2/tags attributes will be gone. Rolling back to Chef 16 makes the attributes available again.

Describe the problem

Custom Ohai plugins located in the /ohai folder should add their values to the available node attributes.

Software Version

afaik any OS (Amazon Linux 2 tested)
chef-client 17.9.52
Ohai: 17.9.0

Replication Case

Using Chef-Client 16 run a cookbook that uses the ec2-tags community ohai cookbook, all EC2 tags will be added to the node attributes. Upgrade to Chef-Client 17 and the Ohai values will be gone. Moving the plugin to the /ohai folder of a cookbook for custom Ohai plugin inclusion will not resolve the issue.

Stacktrace

No log "errors" are presented to the end user, unable to determine where the Ohai logs are written to from the plugin if there are any

Possible Solution

I've re-written the custom plugin to conform to the current Ohai Custom Plugin model by following the documentation to no avail. I also re-wrote the plugin to be a library function to add the node attributes via recipe call, that functions as expected but will run into aws-sdk gem version compatibility issues.

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

No branches or pull requests

1 participant