On Tue, 2008-08-26 at 21:14 -0700, Luke Kanies wrote:
> On Aug 26, 2008, at 1:56 PM, Brice Figureau wrote:
>
> >
> > This is the second attempt of a daemontools (only for the moment)
> > provider for the service type. I added a rspec unit type, and tried
> > to take into account all of Luke's previous comments.
>
> This is great stuff, and I'd accept as-is.
Thanks. Give me some more time so that I can finish the runit part, and
fix a few thing :-)
I do have a question though, when does the provider "self.instances"
method is called for service prodider?
I don't seem to be able to trigger a call to this method by running sth
along the line of:
puppet daemontools.pp
with daemontools.pp that looks like:
service {
"test":
ensure => running, provider => "daemontools";
}
Maybe it's called only when doing a full transaction between a client
and master?
I'll do more test to find that.
> In fact, the only comment I have is...
> > +
> > + # find the service dir on this node
> > + def servicedir
> > + unless defined?(@servicedir) and @servicedir
> > + ["/service", "/etc/service","/var/lib/svscan"].each do |path|
> > + if FileTest.exist?(path)
> > + @servicedir = path
> > + break
> > + end
> > + end
> > + raise "Could not find service directory" unless @servicedir
> > + end
> > + @servicedir
> > + end
> > +
> > + # returns the daemon dir on this node
> > + def self.daemondir
> > + self.class.defpath
> > + end
>
> Why is the servicedir (which is an instance method) mixed in with the
> class methods like this? It makes me think there was a mistake
> somewhere.
Actually, I think you are right, it could well be a class method (and
then I leave it here, I even think that I first designed it as a class
method and changed my mind later) or moved with the other instance
method.
> I'd prefer it be moved down to the other instance methods.
OK, will do. I also have a few improvements to add.
> Obviously that's a really niggling point, though.
>
> I can't tell indentation from email, but please make sure you're using
> 4-space indentation.
Yes, this is indented with 4 spaces, but I think there are a few lines
with leading spaces (my editor doesn't seem to show them, I noticed them
when I rebased yesterday). I'll fix this in a new commit.
To get this project (when it'll be finished) included, should I file a
redmine ticket ?
Thanks,
--
Brice Figureau <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---