[systemd-devel] [PATCH] Document CONFIG_NET_NS as a required kernel option
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Wed Apr 9 16:39:15 PDT 2014
On Wed, Apr 09, 2014 at 07:35:15PM -0400, Mike Gilbert wrote:
> On Wed, Apr 9, 2014 at 12:32 PM, Lennart Poettering
> <lennart at poettering.net> wrote:
> > On Wed, 09.04.14 11:21, Tom Gundersen (teg at jklm.no) wrote:
> >
> >>
> >> On Mon, Mar 31, 2014 at 8:28 PM, Mike Gilbert <floppym at gentoo.org> wrote:
> >> > Several units now utilize the PrivateNetwork parameter, which requires
> >> > network namespace support.
> >
> > BTW, this really sounds like something where we should have graceful
> > degradation: if network namespaces are missing we should probably simply
> > ignore PrivateNetwork= (maybe print a one-time warning to syslog, just
> > to mentioned this), and proceed without them. After all this is a
> > feature that just takes away features, and doesn't add any, thus simply
> > ignoring it should be safe.
> >
> > I'd be happy to merge a patch which implements such a scheme to support
> > kernels with a more limited feature set.
> >
>
> Are there any examples of how to implement a "one-time warning" for
> this sort of thing?
Not in systemd, I think.
Simply try:
int func(...) {
static bool network_namespace_warning = false;
...
if (!network_namespace_warning) {
network_namespace_warning = true;
log_warn("...");
}
}
Zbyszek
More information about the systemd-devel
mailing list