[systemd-devel] [PATCH] use systemd.debug on the kernel command line, not "debug"

Colin Guthrie gmane at colin.guthr.ie
Thu Apr 3 06:48:20 PDT 2014


'Twas brillig, and Florian Albrechtskirchinger at 03/04/14 11:53 did
gyre and gimble:
> On 03.04.2014 00:27, Greg KH wrote:
>> If the kernel is started with "debug", that's for the kernel to
>> switch into debug mode.  We should rely on a namespace for our
>> options, like everything else (with the exception of "quiet").  Some
>> people want to only debug the kernel, not systemd, and the opposite
>> as well so make everyone happy.
> 
> Allow me to propose an alternative to 'debug' and 'systemd.debug'.
> 
> When I debug boot issues and add 'debug' to the kernel command line, I
> do it by editing the command line through the boot loader and I might
> do it several times in a row, so I want the option to be short. I
> imagine that's a common workflow and is one of the reasons everybody
> wants to claim 'debug'.
> 
> I suggest we return the 'debug' option to the kernel folk and add a new
> option 'dbg' with a string of single letter arguments. For example,
> 'dbg=ki' (k for kernel, i for init) would activate debugging in the
> kernel and the init system.
> Further, r could be added for initrd debugging and 'dbg' on it's own
> could default to 'dbg=kri'.

I think this is a reasonable suggestion inline with the spirit of
finding a compromise.

You would first have to get agreement in principle from both sides that
merging patches to support this would be OK.

I would suggest that instead of an argument you make dbg a general
purpose debug namesapce prefix. So, dbg.k or dbg.kernel works on the
kernel side, and dbg.i or dbg.init works on the systemd side with dbg.r
and dbg.rd works on the the dracut side.

> Wouldn't that make everyone happy?

I doubt it. People would still disagree on what colour to make the
argument text ;)


Overall in this issue, I think one has to have a bit of pragmatism.
I agree in principle that "debug" should be a generic term, but really
there are bigger fights to fight and wasting energy on this battle
really seems counter productive to the bigger picture.

I think in this case, there is a little prior art to using "debug" on
the kernel where dracut used a namespaced version rd.debug for it's
debugging, so following that pattern systemd.debug seems logical enough.

I know it would be nice to have one argument to turn all debugging on,
but ultimately I feel there are bigger fish to fry than points of
principle here.

As far as I understand it none of the future plans really revolve around
this, so I say just change it and move on with making things awesome and
don't waste time on this point of principle.

We can still know we're right without actually implementing it :p

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the systemd-devel mailing list