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

Chef Solo 12.x '--no-fork' is broken #2709

Closed
fujin opened this issue Dec 29, 2014 · 6 comments
Closed

Chef Solo 12.x '--no-fork' is broken #2709

fujin opened this issue Dec 29, 2014 · 6 comments
Labels
Type: Bug Does not work as expected. Type: Regression It used to work, now it doesn't.
Milestone

Comments

@fujin
Copy link
Contributor

fujin commented Dec 29, 2014

It looks like the code in application.rb regarding specific recipes https://github.com/opscode/chef/blob/12.0.3/lib/chef/application.rb#L203-L205 introduces a new cli/cfg parameter which was not added to Solo, so it ends up passing a nil through from Chef::Config[:specific_recipes] inside solo.rb @ https://github.com/opscode/chef/blob/12.0.3/lib/chef/application/solo.rb#L217

Looks like introducing the cli argument from client.rb into solo.rb outta fix it, but I haven't tested that yet.

@tyler-ball
Copy link
Contributor

This looks to me like https://github.com/opscode/chef/blob/12.0.3/lib/chef/application/client.rb#L255 needs to be copied into solo.rb or into the super reconfigure method in application.rb.

To get around this for now you could add specific_recipes ['recipe[my_recipe]'] to your client.rb or knife.rb. The only thing missing is the interpolation of extra command line arguments into :specific_recipes.

It looks like the banner for chef-client and chef-solo need to be updated as well. They don't indicate that you can pass recipes in as extra command line arguments.

@tyler-ball tyler-ball added this to the 12.0.4 milestone Jan 2, 2015
@fujin
Copy link
Contributor Author

fujin commented Jan 2, 2015

hey @tyler-ball thanks for checking. I do have that Chef::Config[:specific_recipes] line already, but the solo application is bailing saying that cli_arguments is invalid. I'll take another look soon.

Was it was intended for solo to have this feature? (it looks like it was half added) which explains the lack of banner updates. I think it would be fine for both solo/client to have this feature.

@fujin
Copy link
Contributor Author

fujin commented Jan 2, 2015

not sure if adding it to application.rb was the right call now ❓

@tyler-ball
Copy link
Contributor

@fujin Would you mind opening a PR and linking that to this bug? That will make it easier to review the code.

I don't think we want to modify application.rb. Knife is also a Chef::Application and it has a different CLI contract. The applications that look like they need this are application/apply.rb, application/client.rb and application/solo.rb

@fujin
Copy link
Contributor Author

fujin commented Jan 2, 2015

the PR is here: #2710 I'll move the specific recipes to apply,client,solo despite the duplication

fujin added a commit to fujin/chef that referenced this issue Jan 6, 2015
* Share specific recipes code to application parent
* Update specs to passing, update specs to RSpec 3.
* Specs for set_specific_recipes, solo, client.
@lamont-granquist lamont-granquist modified the milestones: 12.1.0, 12.0.4 Jan 23, 2015
btm pushed a commit that referenced this issue Feb 10, 2015
* Share specific recipes code to application parent
* Update specs to passing, update specs to RSpec 3.
* Specs for set_specific_recipes, solo, client.
@juliandunn
Copy link
Contributor

Closing, #2710 was merged

@thommay thommay added Type: Bug Does not work as expected. Type: Regression It used to work, now it doesn't. and removed Bug labels Jan 25, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Does not work as expected. Type: Regression It used to work, now it doesn't.
Projects
None yet
Development

No branches or pull requests

5 participants