Varnish configured correctly but not starting


#1

Chef folks,

I have a varnish recipe that ends with the following:

Start varnish

service “varnish” do
action [:start]
end

After I bootstrap the machine that runs varnish, I don’t see varnish running.
When I log into the machine, it’s evident my varnish recipe ran, varnish
configuration looks good, and I can start varnish by hand (sudo
/etc/init.d/varnish start) with no problems.

Any ideas? Where should I look for logs showing what happened when the recipe
ran? If it makes a difference, the machine is running 32 bit Ubuntu 11.04.

Jeff


#2

We worked on the varnish cookbook a month ago and discovered the same thing.

Our solution was to edit ubuntu-default.erb with the line:

START=yes

or, even better,

START=<%= node[:varnish][:start_state] %>

and define node[:varnish][:start_state] in a role.

After that it worked perfectly, with a basic configuration. Varnish
needs a lot of configuration and it makes sense to me that the cookbook,
by default, would not start it.


Graham Stewart graham.stewart@utoronto.ca 416-550-2806
Network and Storage Services Manager, Information Technology Services
University of Toronto Libraries
130 St. George Street
Toronto, Ontario, Canada M5S 1A5

On 11-10-05 09:46 AM, jeff.stroomer@disney.com wrote:

Chef folks,

I have a varnish recipe that ends with the following:

Start varnish

service “varnish” do
action [:start]
end

After I bootstrap the machine that runs varnish, I don’t see varnish running.
When I log into the machine, it’s evident my varnish recipe ran, varnish
configuration looks good, and I can start varnish by hand (sudo
/etc/init.d/varnish start) with no problems.

Any ideas? Where should I look for logs showing what happened when the recipe
ran? If it makes a difference, the machine is running 32 bit Ubuntu 11.04.

Jeff


#3

Graham,

Thanks, this is a good beginning. But I already knew about START=yes in /etc/default/varnish, and my templating already sets it correctly. (It’s beyond me why Varnish requires this, but I’ll worry about that another day.) In fact, if I didn’t have this, then I believe the by-hand sudo /etc/init.d/varnish start wouldn’t actually start varnish.

Jeff

-----Original Message-----
From: Graham Stewart [mailto:graham.stewart@utoronto.ca]
Sent: Wednesday, October 05, 2011 11:02 AM
To: chef@lists.opscode.com
Cc: Steve Baroti
Subject: [chef] Re: varnish configured correctly but not starting

We worked on the varnish cookbook a month ago and discovered the same thing.

Our solution was to edit ubuntu-default.erb with the line:

START=yes

or, even better,

START=<%= node[:varnish][:start_state] %>

and define node[:varnish][:start_state] in a role.

After that it worked perfectly, with a basic configuration. Varnish
needs a lot of configuration and it makes sense to me that the cookbook,
by default, would not start it.


Graham Stewart graham.stewart@utoronto.ca 416-550-2806
Network and Storage Services Manager, Information Technology Services
University of Toronto Libraries
130 St. George Street
Toronto, Ontario, Canada M5S 1A5

On 11-10-05 09:46 AM, jeff.stroomer@disney.com wrote:

Chef folks,

I have a varnish recipe that ends with the following:

Start varnish

service “varnish” do
action [:start]
end

After I bootstrap the machine that runs varnish, I don’t see varnish running.
When I log into the machine, it’s evident my varnish recipe ran, varnish
configuration looks good, and I can start varnish by hand (sudo
/etc/init.d/varnish start) with no problems.

Any ideas? Where should I look for logs showing what happened when the recipe
ran? If it makes a difference, the machine is running 32 bit Ubuntu 11.04.

Jeff