tools: init scripts: Add missing XENCONSOLED_ARGS variable
PATCH v2 1/1 tools: init scripts: Add missing XENCONSOLED_ARGS variable
In reply to a message not in the archiveThe systemd xenconsoled.service uses the XENCONSOLED_ARGS variable, but it was missing from the xencommons file.
--- tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 6 ++++++ 1 file changed, 6 insertions(+)
tools/hotplug/Linux/init.d/sysconfig.xencommons.in +6 -0
@@ -5,6 +5,12 @@ # Log xenconsoled messages (cf xl dmesg) #XENCONSOLED_TRACE=[none|guest|hv|all] +## Type: string +## Default: "" +# +# Additional commandline arguments to start xenconsoled. +XENCONSOLED_ARGS= + ## Type: string ## Default: daemon #
Signature · 1 line
2.44.0
Quoted 2 lines · Rafaël Kooi
The systemd xenconsoled.service uses the
XENCONSOLED_ARGSvariable, but it was missing from the xencommons file.
Actually, I'm tempted to go the other way and remove XENCONSOLED_ARGS from the systemd's service file. In the other service files (openrc, sysvinit) for Linux/FreeBSD/NetBSD, XENCONSOLED_ARGS is simply used to construct the command line for xenconsoled. For the Linux one, if you set XENCONSOLED_TRACE, XENCONSOLED_ARGS from xencommons won't be used.
On the other end, with systemd, it is very easy to modified a service file, to add an argument to the command line. So removing XENCONSOLED_ARGS would make more sense. But some user might have notice it exist and start using it, so it's probably too late to remove it.
So overall, I don't think it's a good idea to advertise XENCONSOLED_ARGS, first because it's kind of useless for systemd, and second because it's broken for "tools/hotplug/Linux/init.d/xencommons.in"
Side note: looks like on my test machine I've used systemd instead of editing /etc/default/xencommons to change XENCONSOLED_TRACE, so there's really no need for "xencommons" config file on systemd:
# /etc/systemd/system/xenconsoled.service.d/trace_all.conf
[Service]
Environment=XENCONSOLED_TRACE=allThat "xencommons" config file is just there to be compatible with both init system.
Cheers,
Signature · 1 line
Anthony PERARD
Quoted 9 lines · Anthony PERARD
Quoted 2 lines · Rafaël Kooi
The systemd xenconsoled.service uses the
XENCONSOLED_ARGSvariable, but it was missing from the xencommons file.Actually, I'm tempted to go the other way and remove
XENCONSOLED_ARGSfrom the systemd's service file. In the other service files (openrc, sysvinit) for Linux/FreeBSD/NetBSD,XENCONSOLED_ARGSis simply used to construct the command line forxenconsoled. For the Linux one, if you setXENCONSOLED_TRACE,XENCONSOLED_ARGSfrom xencommons won't be used.
I assume you mean the OpenRC/SysV init script?
Quoted 13 lines
Quoted 1 line
On the other end, with systemd, it is very easy to modified a service
file, to add an argument to the command line. So removing
XENCONSOLED_ARGSwould make more sense. But some user might have notice
it exist and start using it, so it's probably too late to remove it.> So overall, I don't think it's a good idea to advertiseXENCONSOLED_ARGS, first because it's kind of useless for systemd, and
second because it's broken for "tools/hotplug/Linux/init.d/xencommons.in"Side note: looks like on my test machine I've used systemd instead of editing
/etc/default/xencommonsto changeXENCONSOLED_TRACE, so there's really no need for "xencommons" config file on systemd:
Quoted 9 lines
# /etc/systemd/system/xenconsoled.service.d/trace_all.conf [Service] Environment=XENCONSOLED_TRACE=allThat "xencommons" config file is just there to be compatible with both init system.
Cheers,
Makes sense. To be honest I don't even know what arguments one would pass to xenconsoled other than setting the log level to begin with. I would assume this to be a niche enough use case where very few users would be affected if we do decided to remove the variable. Maybe we could opt to advertise it as something that we will be removing in a later release? Maybe either through an "ExecStartPre" message, or by updating the comment in xencommons.
Thanks,
Rafaël Kooi
Quoted 5 lines · Rafaël Kooi
Makes sense. To be honest I don't even know what arguments one would pass to xenconsoled other than setting the log level to begin with. I would assume this to be a niche enough use case where very few users would be affected if we do decided to remove the variable. Maybe we could opt to advertise it as something that we will be removing in a later release?
I think it's fine to leave the variable where it is. On a systemd service file, it's kind of nice to be able to add new arguments without overwriting the whole command, as it means that we get the command line on an update if it changed.
Cheers,
Signature · 1 line
Anthony PERARD