-
-
Notifications
You must be signed in to change notification settings - Fork 806
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Crash on first install when using nginx::source #13
Conversation
+1 i also keep getting this error. |
In addition to this -- I think node['nginx']['version'] should not be the attribute being set in a role to define which version to build. Since that attribute is already used by ohai and there is a name collision and a whole lot of problems. I'll create a patch that makes a separate version attribute to define which source version to build. |
nginx['version'] is ohai attribute that is empty before nginx is installed. Installing a specific source version now has its own attribute that does not collide with the ohai attribute.
Please do, this has been driving me a bit crazy for the last hour! |
@kesor thanks for that |
cjoudrey's quick solution worked for me. |
Actually, I get the same error on a CentOS 6.0 virtualmachine. Compiling other things from source works fine (node, mysql, etc). I've applied both the @cjoudrey fix and the @kesor fix and neither worked.
The same happens when I change the recipe to simply |
After continual testing, I find that it completes the first chef-client run correctly but when launching a new node using an AMI that already has Nginx compiled and installed from that recipe, it re-compiles and installs it anyway because the attributes aren't matching. This check should probably be more generic and compare expected version and configure flags against the output of actually running something like "nginx -V" |
So is nginx::source usable?
Do I have to set anything in the node file? Even if I specify all of the nested hashes used in this line, |
Ah, it's not compatible with Chef 11. After downgrading to 10 it just works. |
Yeah, there are going to be a lot of items like that in the cookbooks. That's why I'll be waiting awhile before going to 11. |
@RKushnir and @dfuentes77 : I filled a bug here : http://tickets.opscode.com/browse/COOK-2417 if you know how to fix it? I'll work on it this morning. |
@pierreozoux Unfortunately, I'm a newbie in chef so can't help at all. Thanks for taking this over. |
@RKushnir : do you call nginx::source from another recipe? I updated the ticket : http://tickets.opscode.com/browse/CHEF-3893 |
@pierreozoux Yes, I get this error when including this recipe from another recipe. However, when I call it directly it also gives an error in another line. |
I'm sorry that no one from Opscode has responded to this pull request in the several months since it was opened and discussed here. Due to time constraints, we usually only review pull requests that are associated to a "Fix Provided" COOK ticket, and this doesn't have a specific ticket linked. Later commits mention several tickets, which have all been closed as they're released in versions published to the community site.
I used the Note that "apt" is required in order to ensure that the package cache is updated. "runit" is required on the node's run list because the nginx cookbook doesn't have a hard dependency on it. Subsequent chef-client runs had no exceptions/problems. I'm using the master branch, which is v1.3.0. I'm closing this pull request as the source recipe is working as intended. If you're experiencing other problems, please open a ticket in the COOK project, using 'nginx' as the component at: Thank you! |
Testing updates
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
When installing nginx from source using
nginx::source
, recipe crashes on first install becausenode.automatic_attrs['nginx']
isnil
.Trace