Oh hai Chefs, Was hoping someone might have the answer to a little problem we are having just now. As part of our base role we include chef-client::config and configure interval, http_proxy and no_proxy via role default attributes. We are behind a proxy so we have to configure http_proxy as well as no_proxy set to our IP range as well as localhost (that was fun to work out that you needed to specify localhost in no_proxy unless you wanted chef-client to try to use the proxy for that… but thats another matter…). The issue is that chef-client::config is that the proxy settings don't seem to reload and take effect in the first run. On first run when a cookbook tries to reach an external file, for example the opscode repo key as part of an apt_repository provider call, it will get refused connection and cause the run to fail. A subsequent second run, with no changes, will be successful. (The client.rb file is set correctly during the first run.) Whilst we can just run chef-client twice when we provision a new VM, its not ideal... Sample log output below. Any help would be appreciated. Regards, Gavin first run:
second run: log entries show it successfully retrieves the key and run completes as normal without error
--
Gavin Reynolds SRC IT Support University of Glasgow Students' Representative Council e: "> t: 0141 339 8541 f: 0141 337 3557 w: www.glasgowstudent.net The University of Glasgow Students' Representative Council is a charity registered in Scotland. Registration number SC006970 |
Archive powered by MHonArc 2.6.16.