From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mail.openembedded.org (Postfix) with ESMTP id 4AA1070F3B for ; Thu, 6 Nov 2014 22:38:23 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 06 Nov 2014 14:36:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,328,1413270000"; d="scan'208";a="603772340" Received: from localhost.jf.intel.com (HELO [10.7.201.167]) ([10.7.201.167]) by orsmga001.jf.intel.com with ESMTP; 06 Nov 2014 14:38:14 -0800 Message-ID: <545BF855.9030205@linux.intel.com> Date: Thu, 06 Nov 2014 14:38:13 -0800 From: Randy Witt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Koen Kooi , ChenQi References: <51B83ADF-EF5F-40FF-B4F5-BFDEF0305051@dominion.thruhere.net> <545B2A5F.5040208@windriver.com> <745681A3-F15C-4D06-93C6-3342E014B672@dominion.thruhere.net> <545B629B.5000900@windriver.com> <648271BD-0C3E-4506-86C1-F416BC23EA22@dominion.thruhere.net> In-Reply-To: <648271BD-0C3E-4506-86C1-F416BC23EA22@dominion.thruhere.net> Cc: openembedded-core@lists.openembedded.org Subject: Re: [PATCH 1/1] systemd: make /etc/sysctl.conf have real effect X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2014 22:38:30 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 11/06/2014 05:29 AM, Koen Kooi wrote: > > Op 6 nov. 2014, om 12:59 heeft ChenQi het volgende geschreven: > >> >> >> On 11/06/2014 06:33 PM, Koen Kooi wrote: >>>> Op 6 nov. 2014, om 08:59 heeft ChenQi het volgende geschreven: >>>> >>>> On 11/06/2014 03:48 PM, Koen Kooi wrote: >>>>> Op 6 nov. 2014, om 08:32 heeft Chen Qi het volgende geschreven: >>>>> >>>>>> In systemd, /etc/sysctl.conf is actually ignored by systemd-sysctl, >>>>>> because this command only examine *.conf files under a bunch of directories >>>>>> like /etc/sysctl.d or /usr/lib/sysctl.d. >>>>>> >>>>>> The problem is we are used to configuring kernel parameters in /etc/sysctl.conf, >>>>>> so it would be really strange if the configuration in that file doesn't have any >>>>>> effect. >>>>>> >>>>>> This patch reference Fedora's solution to this problem, creating a symlink to >>>>>> /etc/sysctl.conf under /etc/sysctl.d/. >>>>> Shouldn't this be done in procps instead? >>>>> >>>> Actually, the problem is not about `sysctl' command. >>>> procps provides `sysctl', but busybox also provides this command. >>>> It's very possible that on our generated image, procps is not installed but `sysctl' command is available. >>>> Both busybox's and procps's `sysctl' command takes /etc/sysctl.conf into consideration. >>> Right, but only procps installs that file. >> >> As busybox provides `sysctl' utility, is it reasonable that it also provides a corresponding configuration file (/etc/sysctl.conf)? Should we make a patch for busybox? >> >> >>>> Now, systemd provides a similar utility called `systemd-sysctl' which is executed at boot time via systemd-sysctl.service. >>>> >>>> So our actually problem is that systemd-sysctl ignores /etc/sysctl.conf, which makes it somewhat strange, especially to users who are used to configuring parameters in sysctl.conf. >>>> And this patch solves this problem by adding a symlink under /etc/sysctl.d/. >>>> >>>> That's why I think we should put this in systemd. >>> You're adding a symlink to a file which only exists if you install procps, which isn't in RDEPENDS. >>> >> >> As I said before, procps is *not* necessary for the sysctl mechanism to have effect. >> (Think about systemd-based core-image-minimal image.) >> >> Busybox provides `sysctl', systemd provides `systemd-sysctl'. >> (It's an easy program, there might exist other packages that provide it too.) >> >> /etc/sysctl.conf is a configuration file which is very likely to be modified or created by administrators to configure kernel parameters. >> (You can't expect administrators to all start learning systemd, trying to understand the gap and differences. In addition, they may have scripts that edit /etc/sysctl.conf to automate their work.) >> >> The point of the symlink is to ensure that when users edit /etc/sysctl.conf (or create one), configurations in that file will have effect at boot time. >> >> Just think about this problem from a standpoint of user experience. > > You still haven't convinced me that shipping a broken symlink is a good idea. I'm pretty sure it's not even allowed in out commit guidelines. > I agree, even in Fedora's case, both /etc/sysctl.conf and /etc/sysctl.d/99-sysctl.conf come from the same package, initscripts-9.51-2.