supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Re: configurable path to ./supervise/
@ 2008-04-18 20:32 Mike
  2008-04-18 21:41 ` Robin Bowes
  0 siblings, 1 reply; 21+ messages in thread
From: Mike @ 2008-04-18 20:32 UTC (permalink / raw)
  To: supervision

>
>
> On Fri, 18 Apr 2008, Gerrit Pape wrote:
>
>> On Fri, Apr 18, 2008 at 03:27:54PM -0400, Charlie Brady wrote:
>>> I think you need a script to prepare the directories and symlinks for
>>> you. I don't think we want runsv to be any more complicated.
>>
>> The symlinks can be dangling links pointing into an existing directory.
>
> The symlinks aren't dangling are they, if they point to an existing
> directory? Or did you really mean "into an existing directory" - i.e. the
> target directory of the symlink does not exist, but its containing
> directory does?
>

I just tested it, "into an existing directory" is right.

I created this service:

test
  supervise -> /var/run/sv-test
  run
  log
    supervise -> /var/run/sv-test-log
    run
    main -> /var/log/sv-test

I did not create the directories /var/run/sv-test or /var/run/sv-test-log,
runit did that for me.  I did create /var/log/sv-test, and set permissions
on it.

This works just fine, and is actually pretty cool.

Also, I tried this same thing with making test/log/supervise point to
/var/run/sv-test/log, it also worked.  makes it a little neater...

-- 
--Mike





^ permalink raw reply	[flat|nested] 21+ messages in thread
* configurable path to ./supervise/
@ 2008-04-18 19:06 Alex Efros
  2008-04-18 19:10 ` Charlie Brady
  2008-04-18 19:45 ` Andras Korn
  0 siblings, 2 replies; 21+ messages in thread
From: Alex Efros @ 2008-04-18 19:06 UTC (permalink / raw)
  To: supervision

Hi!

I dislike idea to create ./supervise/ subdirectories in service's directory.
This violates idea with storing temporary files in /tmp/ or /var/run/...
and so make it non-trivial to prepare tar or patch for service.

Why not add feature to configure directory where `runsv` will create
./supervise/ and `sv` will look for it?

Something like:
    export SUPERVISE=/var/run/service
    exec runsvdir /var/service
and then `runsv` executed by `runsvdir` in directory /var/service/tinydns/
will see $SUPERVISE and create /var/run/service/tinydns/supervise/ and
/var/run/service/tinydns/log/supervise/.

Of course $SUPERVISE also should be set to same value to allow `sv` to
find ./supervise/ directories in /var/run/.

Another scheme - use hard-coded /var/service/.supervise/ directory, so
`runsv` executed by `runsvdir` in directory /var/service/tinydns/
will create /var/service/.supervise/tinydns/ and
/var/service/.supervise/tinydns/log/. Of course this behavior should be
optional and activated by some environment variable. Same variable point
`sv` where to find control directories.

Then I'll just make /var/service/.supervise/ symlink to /var/run/service/.

Currently I achieve this goal by making both ./supervise/ and
./log/supervise/ are symlinks to /var/run/service/NAME/supervise/ and 
/var/run/service/NAME/log/supervise/. But I always forget to prepare these
directories and symlinks BEFORE runsv will be started first time, and that
finally result in avoiding this idea and let runsv to do what it want.

Any thought?

-- 
			WBR, Alex.


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2008-04-22 16:24 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-18 20:32 configurable path to ./supervise/ Mike
2008-04-18 21:41 ` Robin Bowes
2008-04-18 22:11   ` Alex Efros
2008-04-18 22:21     ` Charlie Brady
2008-04-18 22:30       ` Alex Efros
2008-04-18 22:48         ` Mike
2008-04-18 23:00         ` Charlie Brady
2008-04-18 23:39     ` Robin Bowes
2008-04-19 13:25       ` /service vs /var/service vs /etc/service Gerrit Pape
2008-04-19 13:35         ` Robin Bowes
2008-04-19 13:54           ` Gerrit Pape
2008-04-19 14:13             ` Robin Bowes
2008-04-19 17:40               ` Gerrit Pape
     [not found]             ` <283B46AC657546A883A45437109FE51D@home.internal>
2008-04-22 16:24               ` rehan khan
  -- strict thread matches above, loose matches on Subject: below --
2008-04-18 19:06 configurable path to ./supervise/ Alex Efros
2008-04-18 19:10 ` Charlie Brady
2008-04-18 19:12   ` Alex Efros
2008-04-18 19:27     ` Charlie Brady
2008-04-18 19:53       ` Gerrit Pape
2008-04-18 20:17         ` Charlie Brady
2008-04-18 19:45 ` Andras Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).