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

As a user of chef-solo I would like to leverage the ebs_volume resource #360

Open
sigmatechnica opened this issue Sep 3, 2018 · 2 comments

Comments

@sigmatechnica
Copy link

Cookbook version

7.5.0

Platform Details

ubuntu 16.04 on an ec2 node

Scenario:

attempting to attach an ebs volume

Steps to Reproduce:

attempt to attach an ebs volume with chef-solo on an ec2 instance

Expected Result:

volume attaches no errors in chef run

Actual Result:

volume attaches, then chef run terminates with
"I cannot read /etc/chef/client.pem, which you told me to use to sign requests!"

stack trace indicates:
cookbooks/aws/resources/ebs_volume.rb:95:in block (2 levels) in class_from_file' cookbooks/aws/resources/ebs_volume.rb:89:in block in class_from_file'

looking in ebs_volume.rb line 95:
95 node.save # ~FC075

since there is no node.save in chef solo, and we exclusivly use chef solo, there is no client.pem configured and the chef run fails. Adding a guard fixes this, e.g:

node.save unless Chef::Config[:solo]

@welcomebot
Copy link

Hey There
It looks like this is the first issue you've filed against the chef-cookbooks project. I'm here to offer you a bit of extra help to make sure we can quickly get back to you.
Make sure you've filled out all the fields in our issue template. Make sure you've provided us with the version of chef-client you're running, your operating system and the version of the cookbook. If you're not using the most up to date version of the cookbook then please make sure to update first. Lots of things change between versions even if you're issue isn't listed in the changelog. Finally please give us a detailed description of the issue you're having. The more we know about what you're trying to do, what actually happens, and how you can reproduce the problem, the better.

If you're looking for more immediate troubleshooting help make sure to check out #general on the Chef Community Slack. There's plenty of folks there willing to lend a helping hand. Thanks for the first issue. We hope we can get back to you soon with a solution.

@majormoses
Copy link
Contributor

Hey thanks for reporting this but the limitation, after reading the code and this comment: https://github.com/chef-cookbooks/aws/blob/v8.0.3/resources/ebs_volume.rb#L39-L42 I am not sure we can support chef-solo as we need some kind of persistance. We should for the meantime call this out in the README if not already and add a check for use with chef-solo and raise an exception. I am certainly open to ideas on how to safely support chef-solo.

@majormoses majormoses changed the title node.save breaks chef run on chef solo As a user of chef-solo I would like to leverage the ebs_volume resource Dec 22, 2018
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

5 participants