Hi Ian,

Ian Eure <[email protected]> writes:

> Hello Guix folks,
>
> The next piece of my long journey to move most stuff onto Guix is a
> service for collectd.  I use collectd to gather metrics from my
> systems and send them to a central aggregator for graphing.
>
> I put up a PR for this a few days ago[1], but it has an issue I’m not
> sure how to resolve.  The short version is that I’m building a profile
> containing Python packages, then putting its GUIX_PYTHONPATH into the
> collectd configuration, which lets it load my plugin and its
> dependencies.  This works, but a `guix gc' deletes the profile and
> breaks the service.  I’ve written up the problem in more detail in a
> PR comment[2].
>
> I could use some advice.  Can I connect this profile to the system
> profile in some way?  Use a completely different approach?  Any
> guidance would be appreciated.

I haven't read the code you wrote, so my suggestion may not be to the
point, but have you considered "generating the profile" as part of the
service?

I.e., the collectd-configuration could have an 'extensions' field or
similar that would accept a list-of-file-likes type that would be python
packages, and you'd compute the GUIX_PYTHONPATH in the supporting
service code and write this in its configuration?

The configuration being in the store, the modules would be protected
from garbaged collection (as long as a system generation makes use of
it).

HTH,

-- 
Thanks,
Maxim

Reply via email to