- From: "Mark J. Reed" <
>
- To:
- Subject: [chef] Notifies with an unsupported action
- Date: Tue, 11 Jan 2011 15:13:08 -0500
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=kWaFhvb0ngME/HMN6OB2qaV80GeteU6W2h4wd52HTOGp6PWzB3VpDSa5UJVmNmnFfh VDOyI+2bKR3utBjkOVsS08EMF4rVYgIv6zuyZkd8DurrjLP4igRLs1rN/U7fBUJd0dAD EjSIlfjWe8plQODGYG78Dv3ZNYSSegYlM6XTA=
Soliciting opinions here. IYESHO, what should happen in this situation?
service "foo" do
supports :restart => false
end
file "blah" do
notifies :restart, "service[foo]"
end
Right now, it depends upon the provider. The init provider will
translate the restart action into a sequence of stop, start actions.
The upstart provider will ignore the "supports" declaration and call
restart anyway.
The current behavior is defensible; the "supports" declaration is
clearly a lie for any Upstart service. I'm just trying to work around
an issue (
http://tickets.opscode.com/browse/CHEF-1971) wherein
"restart" doesn't work the way Chef expects it to for Upstart
services.
I wonder if it would make more sense to handle 'supports' at a higher
level and reject any attempt to send an action that is declared as
unsupported. Or at least have the service resource itself, rather
than the individual providers, handle things like translating restart
into stop/start.
Thoughts?
--
Mark J. Reed
<
>
- [chef] Notifies with an unsupported action, Mark J. Reed, 01/11/2011
Archive powered by MHonArc 2.6.16.