all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Allan Webber <cwebber@dustycloud.org>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: (Exposing?) config files and non-start/stop operations
Date: Sun, 27 Nov 2016 09:39:04 -0600	[thread overview]
Message-ID: <87twat0w6f.fsf@dustycloud.org> (raw)
In-Reply-To: <87bmx2h0sr.fsf@gmail.com>

Chris Marusich writes:

> Christopher Allan Webber <cwebber@dustycloud.org> writes:
>
>> So shepherd actions are probably fine for something like "herd status
>> mcron" but for running slow and expensive operations, we need some way
>> to expose the config file.
>
> The speed and cost of an operation are orthogonal to whether or not that
> operation requires access to a config file.

But they aren't orthogonal to whether or not it's a shepherd action, if
a shepherd action is expected to be nonblocking.

>> SO, the two ways to do that seem to be:
>>  - Populate those configs in /etc/ (maybe providing prefix/suffix option
>>    for multiple instances)... probably ok since we expect situations
>>    that need these configs to be relatively rare.
>
> Putting stuff into /etc seems undesirable because (1) putting things
> outside the immutable store seems like an invitation to meddle with the
> files, and (2) the possibility of file name conflicts exists, which you
> are already aware of.  However, this might be the simplest solution, so
> if nothing else seems better, I think it would be reasonable to do.

Those are definitely concerns (though hopefully people wouldn't be
modifying things in /etc since "guix system reconfigure" will splat over
any changes).

>>  - We could also have a shepherd action like "herd config mediagoblin"
>>    that would merely spit out the configuration file path... so someone
>>    could do something like:
>>      $ foo-db dump-db --config `herd config foo-db`
>
> This seems less desirable than putting things into /etc because it
> doesn't seem to be in line with the intended use of Shepherd.  My
> understanding is that Shepherd's job is to nanny the system's processes.
> Responding to queries about the location of the services' config files
> doesn't seem germane to that job.

I agree that it seems a bit strange, but no solution really seems great.
However, I don't think it's totally outside the reasonable realm of
shepherd.  Shepherd actions are to execute some operation on a process
that's running (or which could run).  Returning the contextual
information of what config file is being used can fit that paradigm.
But it does feel a bit like a shoehorn.

> As I see it, there is another possible solution: Modify the
> service/daemon/tool so that it is no longer necessary to expose the
> config file location in the first place.  I'm still not sure which
> daemon/service we're talking about here, but surely the daemon/service
> knows where its configuration file is when it starts up.  Surely it
> could be made to remember that, if it doesn't already.  Surely a tool
> could be made which queries the service/daemon for that information if
> necessary.  Surely the service/daemon could be made to perform
> operations like a database dump without being told where its own
> configuration file is.

And where would the configuration file be?  And who would define it,
when?  That's effectively what imperative distributions do, and the
application "knows" to look in /etc/, for some user-mutated file.

  reply	other threads:[~2016-11-27 15:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-20 18:47 (Exposing?) config files and non-start/stop operations Christopher Allan Webber
2016-11-20 22:34 ` Christopher Allan Webber
2016-11-21  4:54   ` Chris Marusich
2016-11-21 16:18     ` Christopher Allan Webber
2016-11-21 16:53       ` Christopher Allan Webber
2016-11-22  4:13         ` Chris Marusich
2016-11-22 17:21           ` Christopher Allan Webber
2016-11-22 22:59             ` Ludovic Courtès
2016-11-23  5:28             ` Chris Marusich
2016-11-22 22:57       ` Ludovic Courtès
2016-11-23 22:03         ` Christopher Allan Webber
2016-11-24 13:31           ` Ludovic Courtès
2016-11-25  7:27             ` Christopher Allan Webber
2016-11-26 12:40               ` Chris Marusich
2016-11-27 15:39                 ` Christopher Allan Webber [this message]
2016-11-29  3:06                   ` Chris Marusich
2016-11-26 13:47               ` Ricardo Wurmus
2016-11-26 17:40                 ` Ludovic Courtès
2016-11-27 15:47                   ` Christopher Allan Webber
2016-11-26 17:43               ` Ludovic Courtès
2016-11-27 15:48                 ` Christopher Allan Webber
2016-11-21 14:18   ` Ludovic Courtès
2016-11-21 16:21     ` Christopher Allan Webber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87twat0w6f.fsf@dustycloud.org \
    --to=cwebber@dustycloud.org \
    --cc=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.