Re: [systemd-devel] known but not-listed units

2016-01-15 Thread Colin Guthrie
Mikhail Kasimov wrote on 14/01/16 15:27:
> 'systemctl list-unit-files --user': to display units-files from
> /etc/systemd/system dir

I wouldn't use --user here as "systemctl --user" has an existing meaning.

Col

-- 

Colin Guthrie
colin(at)mageia.org
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/
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] known but not-listed units

2016-01-15 Thread Mikhail Kasimov
That were the first keynames, that came onto mind. :)

ok, let be --systemspace (/usr/lib/systemd/system) --userspace
(/etc/systemd/system) and --runtimespace (/run/systemd).

15.01.2016 13:13, Colin Guthrie пишет:
> Mikhail Kasimov wrote on 14/01/16 15:27:
>> 'systemctl list-unit-files --user': to display units-files from
>> /etc/systemd/system dir
> 
> I wouldn't use --user here as "systemctl --user" has an existing meaning.
> 
> Col
> 


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] known but not-listed units

2016-01-14 Thread Mikhail Kasimov
Hello!


As an additional idea -- to separate lists of 'systemctl
list-unit-files' command with subkeys --system, --user and --runtime. By
default 'systemctl list-unit-files' should display all unit-files,
including runtime generated ones.

'systemctl list-unit-files --system': to display unit-files from
/usr/lib/systemd/system dir

'systemctl list-unit-files --user': to display units-files from
/etc/systemd/system dir

'systemctl list-unit-files --runtime':  to display units-files from
/run/systemd/ dir

Acceptable?

14.01.2016 17:01, Lennart Poettering пишет:
> On Wed, 13.01.16 17:26, Stijn De Weirdt (stijn.dewei...@ugent.be) wrote:
> 
>> hi all,
>>
>> i'm having following situation on a centos 7.2 system (systemd-219-19.el7)
>>
>> there is a sysvinit service called netconsole that is not listed as a
>> unit or unitfile, but the unitfile was generated and systemctl seems to
>> be able to handle the unit.
>>
>> the only odd issue is that this service is not enabled (chkconfig shows
>> all levels as off).
>> this system has otehr sysvinit services that do show up as units (but
>> for those, at least one level is on)
>>
>> is this "normal"? and what sort of units exits that are not listed as
>> units or unitfiles in general?
> 
> We currently do not show runtime generated unit files among the output
> of "systemctl list-unit-files", but it would probably make sense if we
> would. Unit files that are automatically generated for SysV scripts
> are of this kind, and thus not visible in "systemctl list-unit-files".
> 
> Please file a github issue requesting support for listing such
> generated files in "systemctl list-unit-files". 
> 
> Thanks,
> 
> Lennart
> 


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] known but not-listed units

2016-01-14 Thread Jóhann B . Guðmundsson



On 01/14/2016 03:01 PM, Lennart Poettering wrote:

We currently do not show runtime generated unit files among the output
of "systemctl list-unit-files", but it would probably make sense


Aren't these files auto generated on each bootup/reload/restart thus 
exposing them is likely to cause confusion for administrators
( they start fiddling with the autogenerated units as opposed to what 
they are autogenerated from and wonder why those changes get lost ) 
hence it would be better continuing not exposing them right?


At least I would think generators would need to add to their generated 
files "# DO NOT EDIT THIS FILE" in addition to "# Automatically 
generated by $generator" to be clear on this.


JBG
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] known but not-listed units

2016-01-14 Thread Lennart Poettering
On Wed, 13.01.16 17:26, Stijn De Weirdt (stijn.dewei...@ugent.be) wrote:

> hi all,
> 
> i'm having following situation on a centos 7.2 system (systemd-219-19.el7)
> 
> there is a sysvinit service called netconsole that is not listed as a
> unit or unitfile, but the unitfile was generated and systemctl seems to
> be able to handle the unit.
> 
> the only odd issue is that this service is not enabled (chkconfig shows
> all levels as off).
> this system has otehr sysvinit services that do show up as units (but
> for those, at least one level is on)
> 
> is this "normal"? and what sort of units exits that are not listed as
> units or unitfiles in general?

We currently do not show runtime generated unit files among the output
of "systemctl list-unit-files", but it would probably make sense if we
would. Unit files that are automatically generated for SysV scripts
are of this kind, and thus not visible in "systemctl list-unit-files".

Please file a github issue requesting support for listing such
generated files in "systemctl list-unit-files". 

Thanks,

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] known but not-listed units

2016-01-14 Thread Stijn De Weirdt
> On 01/14/2016 03:01 PM, Lennart Poettering wrote:
>> We currently do not show runtime generated unit files among the output
>> of "systemctl list-unit-files", but it would probably make sense
> 
> Aren't these files auto generated on each bootup/reload/restart thus
> exposing them is likely to cause confusion for administrators
> ( they start fiddling with the autogenerated units as opposed to what
> they are autogenerated from and wonder why those changes get lost )
> hence it would be better continuing not exposing them right?
> 
> At least I would think generators would need to add to their generated
> files "# DO NOT EDIT THIS FILE" in addition to "# Automatically
> generated by $generator" to be clear on this.

the unit are listed as soon as they are enabled, it's only (apparently)
when a sysvinit generated unit is not enabled on any level, that it is
not listed. so it is a bit confusing that sometimes it is and sometimes
it isn't listed. (also the option --all does suggest that not all usable
units are/will be shown).


stijn

> 
> JBG
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] known but not-listed units

2016-01-13 Thread Stijn De Weirdt
hi all,

i'm having following situation on a centos 7.2 system (systemd-219-19.el7)

there is a sysvinit service called netconsole that is not listed as a
unit or unitfile, but the unitfile was generated and systemctl seems to
be able to handle the unit.

the only odd issue is that this service is not enabled (chkconfig shows
all levels as off).
this system has otehr sysvinit services that do show up as units (but
for those, at least one level is on)

is this "normal"? and what sort of units exits that are not listed as
units or unitfiles in general?

i pasted some output below, hope this helps

many thanks,

stijn

> [root@test2200 ~]# chkconfig --list netconsole
> 
> Note: This output shows SysV services only and does not include native
>   systemd services. SysV configuration data might be overridden by native
>   systemd configuration.
> 
>   If you want to list systemd services use 'systemctl list-unit-files'.
>   To see services enabled on particular target use
>   'systemctl list-dependencies [target]'.
> 
> netconsole0:off   1:off   2:off   3:off   4:off   5:off   6:off
> [root@test2200 ~]# systemctl list-units --all |grep netconsole
> [root@test2200 ~]# systemctl list-unit-files --all |grep netconsole
> [root@test2200 ~]# systemctl show netconsole.service |grep generator
> Documentation=man:systemd-sysv-generator(8)
> FragmentPath=/run/systemd/generator.late/netconsole.service
> [root@test2200 ~]# systemctl status netconsole.service 
> ● netconsole.service - SYSV: Initializes network console logging
>Loaded: loaded (/etc/rc.d/init.d/netconsole)
>Active: inactive (dead)
>  Docs: man:systemd-sysv-generator(8)
> [root@test2200 ~]# ls -l /run/systemd/generator.late/netconsole.service
> -rw-r--r-- 1 root root 453 Jan 13 14:49 
> /run/systemd/generator.late/netconsole.service
> [root@test2200 ~]# cat /run/systemd/generator.late/netconsole.service
> # Automatically generated by systemd-sysv-generator
> 
> [Unit]
> Documentation=man:systemd-sysv-generator(8)
> SourcePath=/etc/rc.d/init.d/netconsole
> Description=SYSV: Initializes network console logging
> Before=shutdown.target
> Conflicts=shutdown.target
> 
> [Service]
> Type=forking
> Restart=no
> TimeoutSec=5min
> IgnoreSIGPIPE=no
> KillMode=process
> GuessMainPID=no
> RemainAfterExit=yes
> ExecStart=/etc/rc.d/init.d/netconsole start
> ExecStop=/etc/rc.d/init.d/netconsole stop
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] known but not-listed units

2016-01-13 Thread Reindl Harald



Am 13.01.2016 um 17:26 schrieb Stijn De Weirdt:

i'm having following situation on a centos 7.2 system (systemd-219-19.el7)

there is a sysvinit service called netconsole that is not listed as a
unit or unitfile, but the unitfile was generated and systemctl seems to
be able to handle the unit


becaus enobody created a systemd-unit and there is still 
"/etc/init.d/netconsole"




signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] known but not-listed units

2016-01-13 Thread Andrei Borzenkov
13.01.2016 19:26, Stijn De Weirdt пишет:
> hi all,
> 
> i'm having following situation on a centos 7.2 system (systemd-219-19.el7)
> 
> there is a sysvinit service called netconsole that is not listed as a
> unit or unitfile, but the unitfile was generated and systemctl seems to
> be able to handle the unit.
> 
> the only odd issue is that this service is not enabled (chkconfig shows
> all levels as off).
> this system has otehr sysvinit services that do show up as units (but
> for those, at least one level is on)
> 
> is this "normal"? and what sort of units exits that are not listed as
> units or unitfiles in general?
> 

Unit is generated from initscript, that is correct. It seems that
list-unit-files explicitly skips generated units. I do not know if this
is intentional.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] known but not-listed units

2016-01-13 Thread Stijn De Weirdt
>> i'm having following situation on a centos 7.2 system
>> (systemd-219-19.el7)
>>
>> there is a sysvinit service called netconsole that is not listed as a
>> unit or unitfile, but the unitfile was generated and systemctl seems to
>> be able to handle the unit
> 
> becaus enobody created a systemd-unit and there is still
> "/etc/init.d/netconsole"
but it is properly generated like all other sysvinit services
(/run/systemd/generator.late/netconsole.service exists and is non-empty)

stijn

> 
> 
> 
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel