- From: "John E. Vincent (lusis)" <
>
- To:
- Subject: [chef] Re: Re: Notifies with an unsupported action
- Date: Tue, 11 Jan 2011 15:22:46 -0500
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=t07NOaAgfORICwPkOmzpj77EKybfjA9bK2DsOsHoP1E7jnZjbvxdkhSCiYBB535kQb PR6BKg1ZGVEQae5zpK3WSOVDvS5mWI5XiVsg64IbYlDGUQNs5wBourgVOA4P3Cpy7qM2 bKDa8eMFmuhPrI2G2OvzHIjJ+srH7LY+QNNn4=
<sorry for the top post>
I agree. In lieu of any official unit testing framework, I'd rather
have a idempotent fast-fail than a no-op on errors. I'm actually
wishing there were support for custom logging inside those blocks to
make debugging much easier.
On Tue, Jan 11, 2011 at 3:16 PM, Noah Gibbs
<
>
wrote:
>
To me, it definitely makes sense to at the very least warn when an
>
unsupported operation is given. Mysterious no-ops are probably the most
>
frustrating part of my current beginner experience with Chef, and tracking
>
them down is often painful (I'm currently tracking down a mysterious no-op
>
on "supports" with a User block and :manage_home => true, and another
>
mysterious no-op on a cookbook_file block).
>
>
Turning typos or requests for unsupported operations into mysterious
>
no-ops does beginners no favors.
>
>
--- On Tue, 1/11/11, Mark J. Reed
>
<
>
>
wrote:
>
>
> From: Mark J. Reed
>
> <
>
>
> Subject: [chef] Notifies with an unsupported action
>
> To:
>
>
>
> Date: Tuesday, January 11, 2011, 12:13 PM
>
> 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
>
> <
>
>
>
>
>
>
>
Archive powered by MHonArc 2.6.16.