Re: [systemd-devel] ExecStartPre checking conf

2019-05-20 Thread Uoti Urpala
On Mon, 2019-05-20 at 11:56 +0200, Lennart Poettering wrote:
> about that though). Using ExecStartPre= for a syntax checker appears
> pretty pointless to me, as yes, you just end up doing the same work
> twice, and you might as well have the ExecStart= fail rather than the
> ExecStartPre=, there's little benefit in that.

I've seen people prefer type=forking over type=simple for the sake of
checking syntax before starting *depending* units. I'm not particularly
convinced myself that this is valuable, but whatever it's worth,
ExecStartPre should achieve the same goal (depending units are not
started if syntax check fails).


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

Re: [systemd-devel] Does "systemctl daemon-reload" discard service information?

2019-05-20 Thread Andrei Borzenkov
20.05.2019 16:36, Ulrich Windl пишет:
> Hi!
> 
> I have had the effect that a "systectl status" before and after a
> "daemon-reload" is different, while the service in question wasn't restarted:
> 
...>
> Is that intentional?
> 

daemon-reload is known to lose state for years. Some problems get fixed,
new problems appear. Problems range from cosmetic to losing state of
units and jobs causing callers of systemd to "hang" waiting for job
completion. Unfortunately daemon-reload is often the only answer to
other reported problems (like in "systemd does not see fstab changes?
Run daemon-reload, where is the problem").
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Failed to start apache2 with error code exited 1 failure

2019-05-20 Thread Dorian ROSSE
Finaly I can’t success to repair apache2 I search but all failed…

I just need wait the apache2 mailler worker…

I copy past a lot of shell for show I am on the bug but without success !

Provenance : Courrier pour 
Windows 10


De : Dorian ROSSE
Envoyé : Monday, May 20, 2019 3:30:38 PM
À : Reindl Harald; systemd-devel@lists.freedesktop.org
Objet : RE: [systemd-devel] Failed to start apache2 with error code exited 1 
failure


Thank you after your command line I launch apachectl status then I installed 
all Navigator I will put again the command line after the installing of 
Navigator program they should be repair before the answer of an apache Mailler 
worker 



Provenance : Courrier pour 
Windows 10




De : systemd-devel  de la part de 
Reindl Harald 
Envoyé : Monday, May 20, 2019 3:07:40 PM
À : systemd-devel@lists.freedesktop.org
Objet : Re: [systemd-devel] Failed to start apache2 with error code exited 1 
failure



Am 20.05.19 um 11:34 schrieb Dorian ROSSE:
> Ok I will ask to Apache but I was know this Is a systemd problem because
> the engine of Apache is systemd...

no! it don't matter who starts httpd, it fails and system is just the
messenger

as there is pretty clear at least one config error in the message
"apachectl -t" and the logfiles of httpd are your friends


[Sun May 19 16:59:03.401300 2019] [so:warn] [pid 325] AH01574: module
dav_module is already loaded, skipping
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] [PATCH] man: systemd-nspawn: Update syntax to launch an image

2019-05-20 Thread systemd github import bot
Patchset imported to github.
To create a pull request, one of the main developers has to initiate one via:


--
Generated by https://github.com/haraldh/mail2git
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] [PATCH] man: systemd-nspawn: Update syntax to launch an image

2019-05-20 Thread Kashyap Chamarthy
To access a shell on a disk image, the man page on Fedora-29 says to
run: `systemd-nspawn -M Fedora-Cloud-Base-28-1.1.x86_64.raw`.  Let's
try.

List existing images:

$> machinectl list-images | awk '{print $1,$2}';
NAME TYPE
Fedora-Cloud-Base-30… raw

1 images

Now invoke `systemd-nspawn` as noted in the man page:

$> systemd-nspawn -M Fedora-Cloud-Base-30-1.2.x86_64.raw
No image for machine 'Fedora-Cloud-Base-30-1.2.x86_64.raw'.

Removing the ".raw" extension launches the image and gives a shell.
Update the man page to reflect that.

Frantisek Sumsal on #systemd (Freenode) noted the reason: "In older
versions systemd -M accepted both image-name.raw and image-name as a
valid image names, however, on Fedora 29 (systemd-239) with all the
BTRFS stuff around it accepts only -M image-name (without the
extension)"

- - -

While at it, update the fedora_{latest_version, cloud_release}
variables.

Signed-off-by: Kashyap Chamarthy 
---
 man/systemd-nspawn.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml
index 
5ba162b93cadf2fa3a252ddbb19b5b30315fa9d8..f1d6f14812519b6765078d71fcdb17853e4f85c1
 100644
--- a/man/systemd-nspawn.xml
+++ b/man/systemd-nspawn.xml
@@ -1,8 +1,8 @@
 
 http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd; [
-
-
+
+
 ]>
 
 
@@ -1343,7 +1343,7 @@
 
   # machinectl pull-raw --verify=no \
   
https://download.fedoraproject.org/pub/fedora/linux/releases/_latest_version;/Cloud/x86_64/images/Fedora-Cloud-Base-_latest_version;-_cloud_release;.x86_64.raw.xz
-# systemd-nspawn -M 
Fedora-Cloud-Base-_latest_version;-_cloud_release;.x86_64.raw
+# systemd-nspawn -M 
Fedora-Cloud-Base-_latest_version;-_cloud_release;.x86_64
 
   This downloads an image using
   
machinectl1
-- 
2.20.1

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

[systemd-devel] Does "systemctl daemon-reload" discard service information?

2019-05-20 Thread Ulrich Windl
Hi!

I have had the effect that a "systectl status" before and after a
"daemon-reload" is different, while the service in question wasn't restarted:

h02:~ # systemctl status iotwatch@*
● iotwatch@VAR.service - iotwatch I/O performance monitor instance "VAR"
   Loaded: loaded (/etc/iotwatch.conf; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-05-20 15:17:25 CEST; 5min ago
 Docs: man:iotwatch(1)
   man:iotwatch@.service(8)
  Process: 15115 ExecStop=/var/run/iotwatch-VAR/iotwatch-VAR -l
/var/log/iotwatch/VAR/iotwatch-VAR.log -m I
-p/var/run/iotwatch-VAR/iotwatch-VAR.pid -d0
-OS:T=F75,S:M=O52,N:3.29/60,Q:C=120,P:nagios.nagios=0664 (code=exited,
status=0/SUCCESS)
  Process: 15149 ExecStartPost=/usr/bin/sleep 0.2 (code=exited,
status=0/SUCCESS)
  Process: 15146 ExecStart=iotwatch-VAR -l
/var/log/iotwatch/VAR/iotwatch-VAR.log -m I
-p/var/run/iotwatch-VAR/iotwatch-VAR.pid -d1 -a0.00 -b512 -i4 -sD -t0.5
-TX=0.25:0.50,A=0.025:0.05 -OR
-OS:T=F75,S:M=O52,N:3.29/60,Q:C=120,P:nagios.nagios=0664 /dev/sys/var
(code=exited, status=0/SUCCESS)
  Process: 15143 ExecStartPre=/bin/sh -c [ -d "/var/log/iotwatch/VAR" -o 1 -eq
0 ] || mkdir "/var/log/iotwatch/VAR" || exit 3 (code=exited, status=0/SUCCESS)
  Process: 15139 ExecStartPre=/bin/sh -c [ -h
"/var/run/iotwatch-VAR/iotwatch-VAR" ] || ln -s "/usr/bin/iotwatch"
"/var/run/iotwatch-VAR/iotwatch-VAR" || exit 3 (code=exited, status=0/SUCCESS)
  Process: 15136 ExecStartPre=/bin/sh -c [ -d "/var/run/iotwatch-VAR" ] ||
mkdir "/var/run/iotwatch-VAR" || exit 3 (code=exited, status=0/SUCCESS)
 Main PID: 15148 (iotwatch-VAR)
Tasks: 4 (limit: 512)
   CGroup: /system.slice/system-iotwatch.slice/iotwatch@VAR.service 
   └─15148 iotwatch-VAR -l /var/log/iotwatch/VAR/iotwatch-VAR.log -m I
-p/var/run/iotwatch-VAR/iotwatch-VAR.pid...

May 20 15:17:24 h02 systemd[1]: Starting iotwatch I/O performance monitor
instance "VAR"...
May 20 15:17:25 h02 systemd[1]: Started iotwatch I/O performance monitor
instance "VAR".
Warning: iotwatch@VAR.service changed on disk. Run 'systemctl daemon-reload'
to reload units.
h02:~ # systemctl daemon-reload
h02:~ # systemctl status iotwatch@*
● iotwatch@VAR.service - iotwatch I/O performance monitor instance "VAR"
   Loaded: loaded (/etc/iotwatch.conf; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-05-20 15:17:25 CEST; 5min ago
 Docs: man:iotwatch(1)
   man:iotwatch@.service(8)
 Main PID: 15148 (iotwatch-VAR)
Tasks: 4 (limit: 512)
   CGroup: /system.slice/system-iotwatch.slice/iotwatch@VAR.service 
   └─15148 iotwatch-VAR -l /var/log/iotwatch/VAR/iotwatch-VAR.log -m I
-p/var/run/iotwatch-VAR/iotwatch-VAR.pid...

May 20 15:17:24 h02 systemd[1]: Starting iotwatch I/O performance monitor
instance "VAR"...
May 20 15:17:25 h02 systemd[1]: Started iotwatch I/O performance monitor
instance "VAR".

Is that intentional?

Regards,
Ulrich

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

Re: [systemd-devel] Failed to start apache2 with error code exited 1 failure

2019-05-20 Thread Dorian ROSSE
Thank you after your command line I launch apachectl status then I installed 
all Navigator I will put again the command line after the installing of 
Navigator program they should be repair before the answer of an apache Mailler 
worker 



Provenance : Courrier pour 
Windows 10




De : systemd-devel  de la part de 
Reindl Harald 
Envoyé : Monday, May 20, 2019 3:07:40 PM
À : systemd-devel@lists.freedesktop.org
Objet : Re: [systemd-devel] Failed to start apache2 with error code exited 1 
failure



Am 20.05.19 um 11:34 schrieb Dorian ROSSE:
> Ok I will ask to Apache but I was know this Is a systemd problem because
> the engine of Apache is systemd...

no! it don't matter who starts httpd, it fails and system is just the
messenger

as there is pretty clear at least one config error in the message
"apachectl -t" and the logfiles of httpd are your friends


[Sun May 19 16:59:03.401300 2019] [so:warn] [pid 325] AH01574: module
dav_module is already loaded, skipping
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Failed to start apache2 with error code exited 1 failure

2019-05-20 Thread Reindl Harald


Am 20.05.19 um 11:34 schrieb Dorian ROSSE:
> Ok I will ask to Apache but I was know this Is a systemd problem because
> the engine of Apache is systemd...

no! it don't matter who starts httpd, it fails and system is just the
messenger

as there is pretty clear at least one config error in the message
"apachectl -t" and the logfiles of httpd are your friends


[Sun May 19 16:59:03.401300 2019] [so:warn] [pid 325] AH01574: module
dav_module is already loaded, skipping
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] udev: Access permission of fw character device in which fw node includes unit handled by ALSA

2019-05-20 Thread Takashi Sakamoto
Hi all,

I'm an ALSA developer, mainly committing to drivers for audio and
music units on IEEE 1394 bus (yes, it's legacy FireWire). I have a
concern about access permission for fw character device.

In the last few years 9 drivers have been added to support 120 models
around[1]. The drivers allow ALSA applications to transfer audio data
frames and MIDI messages, but they expect userspace application to
use fw character device for operations of the other functionalities
such as physical volume controls.

At present, for some models, udevd configures fw character device for
good access permission to userspace applications. On the other hand,
for the other models, udevd doesn't. In my opinion, for one half of
supported models, fw character device is configured with root:root/0500.

I'd like to change this inconvenience, changing group ownership of the
special file to 'audio', and add ACL +uaccess when logging in.

For your information, I prepare a repository including image of
configuration ROM from supported devices[2]. At present, 80 images are
added.  You can parse the image by crpp in linux-firewire-utils
repository[3].

At present I assume three options:

1. Add entries into udev rules for each of device

This is an enhancement of existent rules[4][5] and simple solution.
But developers always take care of adding new entries when users suggests,
perhaps.

2. Reconfigure fw character device when ALSA firewire driver is attached
   to unit

IEEE 1394 specification refers to IEEE 1212 to represent device and its
functionalities. Each device is represented as 'node' and its
functionalities are represented as 'unit'. The information about 'node'
and 'unit' is in configuration ROM.

Linux firewire subsystem reads content of the ROM, parses
it and adds fw character device to system for 'node', then binds in-kernel
driver to 'unit'. Kevents for the node and unit are generated separately.

If udevd handles unit kevent to seek binding driver then configures fw
character device, developers don't need to maintain rule list. Although
one node is allowed to have several units, nut the most of supported
models have only one unit, except for Applie iSight[6].

3. Fulfill hwdb to have supplemental information

I'm not good at hwdb, but according to its name, hwdb is good to store
device dependent information. If adding some hints to database and
using the information, this issue might be solved.

I'm happy to receive your comments to improve this situation.

As a mockup of such control application, I wrote libhinawa[7] and
hinawa-utils[8]. They're my (rough) private work and out of ALSA project,
but for future I wish to propose better implementation to ALSA project
as a control server program.

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/firewire/Kconfig
[2] https://github.com/takaswie/am-config-roms/
[3] https://github.com/cladisch/linux-firewire-utils
[4] 
https://github.com/systemd/systemd/blob/master/rules/50-udev-default.rules.in
[5] https://github.com/systemd/systemd/blob/master/src/login/70-uaccess.rules.m4
This rule refers to a rule optionally added by FFADO project.
[6] This device has four units; IIDC, Audio, vendor-dependent and IRIS.
[7] https://github.com/takaswie/libhinawa/
[8] https://github.com/takaswie/hinawa-utils/


Regards

Takashi Sakamoto
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Proper way for systemd service to wait mdev gvt device initialization

2019-05-20 Thread Andrei Borzenkov
On Mon, May 20, 2019 at 10:08 AM Mantas Mikulėnas  wrote:
>
> On Sun, May 19, 2019 at 9:50 PM Alex Ivanov  wrote:
>>
>> Hello.
>> What is the proper way to do that? I have a unit that creates gvt device in 
>> the system
>>
>> ExecStart = "sh -c 'echo a297db4a-f4c2-11e6-90f6-d3b88d6c9525 > 
>> /sys/bus/pci/devices/:00:02.0/mdev_supported_types/i915-GVTg_V5_8/create'";
>> ExecStop = "sh -c 'echo 1 > 
>> /sys/bus/pci/devices/:00:02.0/a297db4a-f4c2-11e6-90f6-d3b88d6c9525/remove'";
>
>
> Personally, I would use an udev rule:
>
> ACTION=="add", SUBSYSTEM=="pci", ENV{PCI_SLOT_NAME}==":00:02.0", 
> ATTR{mdev_supported_types/i915-GVTg_V5_8/create}="a297db4a-f4c2-11e6-90f6-d3b88d6c9525"
>

There is a race condition here, driver creates
.../mdev_supported_types after it has registered device so udev may
process event before directory is available.

> Though on the other hand, a service is a good choice if you want to 
> `systemctl stop` it later on.
>
> ACTION=="add", SUBSYSTEM=="pci", ENV{PCI_SLOT_NAME}==":00:02.0", 
> ENV{SYSTEMD_WANTS}+="create-gvt.service"
>
>>
>>
>> Ideally I would to like to start this service when :00:02.0 device 
>> appears in the system, but the problem is that 
>> /sys/bus/pci/devices/:00:02.0/mdev_supported_types/ tree is populated 
>> later, so my service will fail.
>>
>> So the question what is the proper way to fix that.
>
>
> If the driver doesn't populate its sysfs entries in time, maybe it at least 
> generates 'change' uevents? (udevadm --monitor)
>

I would tentatively say this is driver bug. This directory is created
during initial device setup, not in response to some event later. From
https://github.com/torvalds/linux/blob/master/Documentation/driver-model/device.txt:

--><--
As explained in Documentation/kobject.txt, device attributes must be
created before the KOBJ_ADD uevent is generated.
--><--

Note that some drivers even disable KOBJ_ADD notification during
device_register() and trigger it manually later, after sysfs layout is
complete. I cannot evaluate whether this directory can be created and
populated before device_register().

> If there are no uevents either, well, there's nothing you can do from 
> systemd's side. (Other than making a script that loops repeatedly checking 
> "is it there yet? is it there yet?")

Should really be fixed on kernel side.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Weston not launching Via Service file.

2019-05-20 Thread Rajshekhar Sanda
Here are the logs as follows:


● launchWeston.service - launch weston
   Loaded: loaded (/etc/systemd/system/launchWeston.service; disabled; vendor 
preset: enabled)
   Active: failed (Result: protocol) since Fri 2019-02-22 04:56:02 UTC; 3min 
12s ago
  Process: 3177 ExecStart=/usr/bin/weston (code=killed, signal=TERM)
 Main PID: 3177 (code=killed, signal=TERM)

Feb 22 04:56:01 h3ulcb systemd[1]: launchWeston.service: Unit entered failed 
state.
Feb 22 04:56:01 h3ulcb systemd[1]: launchWeston.service: Failed with result 
'protocol'.
Feb 22 04:56:02 h3ulcb systemd[1]: launchWeston.service: Service hold-off time 
over, scheduling restart.
Feb 22 04:56:02 h3ulcb systemd[1]: Stopped launch weston.
Feb 22 04:56:02 h3ulcb systemd[1]: launchWeston.service: Start request repeated 
too quickly.
Feb 22 04:56:02 h3ulcb systemd[1]: Failed to start launch weston.
Feb 22 04:56:02 h3ulcb systemd[1]: launchWeston.service: Unit entered failed 
state.
Feb 22 04:56:02 h3ulcb systemd[1]: launchWeston.service: Failed with result 
'protocol'.


**


journalctl -xe logs as follows:



-- Unit getty at 
tty1.service has 
finished starting up.
--
-- The start-up result is done.
Feb 22 04:55:59 h3ulcb systemd[1]: Starting launch weston...
-- Subject: Unit launchWeston.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit launchWeston.service has begun starting up.
Feb 22 04:56:00 h3ulcb systemd[1]: Started Serial Getty on ttySC0.
-- Subject: Unit serial-getty at 
ttySC0.service 
has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit serial-getty at 
ttySC0.service 
has finished starting up.
--
-- The start-up result is done.
Feb 22 04:56:00 h3ulcb PAS[3076]: PAS >> Daemon process PersistenceAdminService 
starting.
Feb 22 04:56:00 h3ulcb systemd[1]: Reached target Login Prompts.
-- Subject: Unit getty.target has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit getty.target has finished starting up.
--
-- The start-up result is done.
Feb 22 04:56:00 h3ulcb systemd[1]: Reached target Multi-User System.
-- Subject: Unit multi-user.target has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit multi-user.target has finished starting up.
--
-- The start-up result is done.
Feb 22 04:56:00 h3ulcb systemd[1]: Starting Update UTMP about System Runlevel 
Changes...
-- Subject: Unit systemd-update-utmp-runlevel.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit systemd-update-utmp-runlevel.service has begun starting up.
Feb 22 04:56:00 h3ulcb systemd[3108]: pam_unix(login:account): account root has 
password changed in future
Feb 22 04:56:00 h3ulcb systemd[3108]: pam_unix(login:session): session opened 
for user root by (uid=0)
Feb 22 04:56:00 h3ulcb systemd[1]: Started Update UTMP about System Runlevel 
Changes.
-- Subject: Unit systemd-update-utmp-runlevel.service has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit systemd-update-utmp-runlevel.service has finished starting up.
--
-- The start-up result is done.
Feb 22 04:56:00 h3ulcb systemd[1]: Created slice User Slice of root.
-- Subject: Unit user-0.slice has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished starting up.
--
-- The start-up result is done.
Feb 22 04:56:00 h3ulcb connmand[3067]: Checking loopback interface settings
Feb 22 04:56:00 h3ulcb connmand[3067]: System hostname is h3ulcb
Feb 22 04:56:00 h3ulcb dbus[3064]: [system] Activating via systemd: service 
name='fi.w1.wpa_supplicant1' unit='wpa_supplicant.service'
Feb 22 04:56:00 h3ulcb connmand[3067]: lo {newlink} index 1 address 
00:00:00:00:00:00 mtu 65536
Feb 22 04:56:00 h3ulcb dbus[3064]: [system] Activating via systemd: service 
name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Feb 22 04:56:00 h3ulcb connmand[3067]: lo {newlink} index 1 operstate 0 

Feb 22 04:56:00 h3ulcb connmand[3067]: eth0 {create} index 2 type 1 
Feb 22 04:56:00 h3ulcb connmand[3067]: eth0 {update} flags 4098 
Feb 22 04:56:00 h3ulcb connmand[3067]: eth0 {newlink} index 2 address 
76:52:48:4C:23:63 mtu 1500
Feb 22 04:56:00 h3ulcb connmand[3067]: eth0 {newlink} index 2 operstate 2 
Feb 22 04:56:00 h3ulcb systemd[1]: Starting User Manager for UID 0...
-- Subject: Unit user at 

Re: [systemd-devel] ExecStartPre checking conf

2019-05-20 Thread Lennart Poettering
On Mo, 20.05.19 12:37, Olaf van der Spek (m...@vdspek.org) wrote:

> On Mon, May 20, 2019 at 11:56 AM Lennart Poettering
>  wrote:
> >
> > On So, 19.05.19 11:45, Olaf van der Spek (m...@vdspek.org) wrote:
> >
> > > Hi,
> > >
> > > ExecStartPre is sometimes used to check the configuration. Does this
> > > make sense?
> >
> > I don't think it does. I figure what people are actually looking for
> > is a way they can run a syntax checker on restart, before stopping the
> > old instance. But we do not provide such functionality (there's an RFE
> > about that though).
>
> https://github.com/systemd/systemd/issues/2175 (from 2015)?
>
> Any plans to implement it?

I don't think anyone is working on that to my knowledge or planning
to. If you want this to happen you'd have to do the work yourself or
find/fund someone else to do that...

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] Fwd: Fwd: Excess of StartLimitBurst

2019-05-20 Thread Alexander Mykolaichyk
Thanks,
Sorry for bad English.

As you wrote
> This setting means the service is attempted to be started at most 3 times
within 5min
> Note that these settings apply to any kind of start, i.e. both "systemctl
start" and "systemctl restart".

So after my OS is booted up and my service is started - service's start
counter has value 1. So during next 5 minutes it is possible to restart my
service only 2 times, but I can do it 3 times. And question is "Why start
counter is reseted?".

> This means restart limiting is ineffective if units are not referenced
continously.

My service is referenced by multi-user.target.wants and some other unit
that executed at shutdown(referenced by Conficts and After). Maybe you
could provide link to the documentation where referencing is described? Or
describe it by yourself?

Thanks



пн, 20 мая 2019 г. в 12:34, Lennart Poettering :

> On Mo, 20.05.19 10:59, Alexander Mykolaichyk (to4...@gmail.com) wrote:
>
> > Dear all,
> >
> > Help me please with my problem.
> > For example, I have systems service config with such parameters:
> >
> > Restart=always
> > RestartSec=1
> > StartLimitInterval=300
> > StartLimitBurst=3
>
> This setting means the service is attempted to be started at most 3
> times within 5min. By default current systemd allows services to be
> started at most 5 times within 10s. The default can be controlled with
> DefaultStartLimitIntervalSec=/DefaultStartLimitBurst= in
> /etc/systemd/system.conf.
>
> Note that these settings apply to any kind of start, i.e. both
> "systemctl start" and "systemctl restart".
>
> >
> > systemd version = 215
> >
> > After the system boot up I can restart the service 4 times with systemctl
> > restart service. But all other services can be restarted 3 times.
> >
> > As I understand and after I looked to the systemd sources -
> StartLimitBurst
> > is the limit for start/restart operations and after boot up there are
> > possibility for restarting the service only 3 times during
> > StartLimitInterval. When new StartLimitInterval is started I can restart
> > the service 4 times.
>
> I cannot parse this, sorry.
>
> Note that "systemctl reset-failed" will also reset the restart counter
> of a unit these days. Also, if a unit is not pinned into memory
> because some other unit references it in some way it gets unloaded
> right-away and along with it the restart counter. This means restart
> limiting is ineffective if units are not referenced continously.
>
> Lennart
>
> --
> Lennart Poettering, Berlin
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] ExecStartPre checking conf

2019-05-20 Thread Olaf van der Spek
On Mon, May 20, 2019 at 11:56 AM Lennart Poettering
 wrote:
>
> On So, 19.05.19 11:45, Olaf van der Spek (m...@vdspek.org) wrote:
>
> > Hi,
> >
> > ExecStartPre is sometimes used to check the configuration. Does this
> > make sense?
>
> I don't think it does. I figure what people are actually looking for
> is a way they can run a syntax checker on restart, before stopping the
> old instance. But we do not provide such functionality (there's an RFE
> about that though).

https://github.com/systemd/systemd/issues/2175 (from 2015)?

Any plans to implement it?



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

Re: [systemd-devel] Antw: Re: Antw: Re: Re: "bad" status for genersated target; why?

2019-05-20 Thread Ulrich Windl
>>> Lennart Poettering  schrieb am 16.05.2019 um 10:29
in
Nachricht <20190516082910.GA24042@gardel-login>:
> On Do, 16.05.19 08:55, Ulrich Windl (ulrich.wi...@rz.uni‑regensburg.de)
wrote:
> 
>> Hi!
>>
>> After having read the page again, it's not more clear than
>> before. Even I have some more questions:
>>
>> Why do generators receive three directory paths: Should the
>> generator decide where at those three paths to add a unit?
> 
> Yes.
> 
> This is explained in the documentation btw:
> https://www.freedesktop.org/software/systemd/man/systemd.generator.html 
> 
> Long story short: it's about unit file precedence.
> 
>> How should it know? Wouldn't it be easier to provide one path and
>> adjust that as necessary? (My generator just uses the first path)
> 
> It's up to the generator to decide whether it wants to override native
> unit files already in place, or whether it wants those to override
> whatever it generates.
> 
> Please read up on the documentation.
> 
>> Also: the only thing that might prevent using a generator for
>> dynamic configuration is that it is called early during boot.
> 
> Generators follow the reload cycle, and the reload cycle is how the
> reload cycle is.
> 
>> So I could have a generator that just saved the three paths
>> somewhere, and a unit that calls "another generator" that is not
>> detected as a systemd generator using the paths saved before to
>> generate the unit files and do a "systemctl reload‑daemon" (watching
>> out for possible indirect recursion). But why the dance?
> 
> Doing "systemctl daemon‑reload" in clean codepaths is possible but not
> good style. It's slow and problematic since Linux doesn't really have
> a transactional fs, and thus you never know in which precise state the
> fs is when systemd reloads things in case multiple programs make
> modifications to the unit files at the same time.
> 
>> What makes your generators special? That they have no explicitly
>> settable dependencies, or that they are called with three directory
>> arguments?
> 
> I am not sure how to parse that.
> 
> As I mentioned before: you appear to think that generators are
> something they are clearly not.
> 
>> And what about the "link stuff": Doesn't reload‑daemon create those
>> as needed from the unit files? Why should the generator have to mess
>> with those? It's all not clear from the manual page. The only thing
>> I can imagine is that those "link messing" is needed to provide
>> functionality the systemd actually lacks.
> 
> daemon‑reload just reloads configuation, it does not create or remove
> any symlinks.

The manual page says (contradicting IMHO): "This will rerun all generators
(see systemd.generator(7)), reload all unit files, and recreate the entire
dependency tree."

> 
> It's your generator's job to hook the units it might generate into
> the right places. systemctl can't guess that. I mean, if a service
> shall be started during regular boot, or if it shall be hooked into
> getty.target or when bluetooth hw is plugged in is nothing systemd can
> guess for you.

The manual page as I find it leaves a lot of guessing.

> 
> Lennart
> 
> ‑‑
> Lennart Poettering, Berlin



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

Re: [systemd-devel] ExecStartPre checking conf

2019-05-20 Thread Lennart Poettering
On So, 19.05.19 11:45, Olaf van der Spek (m...@vdspek.org) wrote:

> Hi,
>
> ExecStartPre is sometimes used to check the configuration. Does this
> make sense?

I don't think it does. I figure what people are actually looking for
is a way they can run a syntax checker on restart, before stopping the
old instance. But we do not provide such functionality (there's an RFE
about that though). Using ExecStartPre= for a syntax checker appears
pretty pointless to me, as yes, you just end up doing the same work
twice, and you might as well have the ExecStart= fail rather than the
ExecStartPre=, there's little benefit in that.

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] sd-bus dynamic property table

2019-05-20 Thread Lennart Poettering
On Mo, 13.05.19 08:25, Stephen Hemminger (step...@networkplumber.org) wrote:

> I have a simple application that does provides property table for network
> devices (maybe it would be useful for a more complete example somewhere).
> The app is more to show how to use sdbus, not to replace network manager.
>
> The next step is to add ethtool statistics. Each type of network device will 
> have
> different set of named properties. How could this be implemented?
> So far, the only idea would be to dynamically build a vtable then
> register it?
>
>
> # busctl tree  org.networkplumber.net1
> └─/org
>   └─/org/networkplumber
> └─/org/networkplumber/net1
>   └─/org/networkplumber/net1/interface
> ├─/org/networkplumber/net1/interface/eno1
> ├─/org/networkplumber/net1/interface/eno2
> ├─/org/networkplumber/net1/interface/ens11
> └─/org/networkplumber/net1/interface/lo
>
> # busctl introspect org.networkplumber.net1 
> /org/networkplumber/net1/interface/eno1
> NAMETYPE  SIGNATURE RESULT/VALUE FLAGS
> org.freedesktop.DBus.Introspectable interface - --
> .Introspect method- s-
> org.freedesktop.DBus.Peer   interface - --
> .GetMachineId   method- s-
> .Ping   method- --
> org.freedesktop.DBus.Properties interface - --
> .Getmethodssv-
> .GetAll methods a{sv}-
> .Setmethodssv   --
> .PropertiesChanged  signalsa{sv}as  --
> org.networkplumber.net1.Interface   interface - --
> .carrierproperty  q 1-
> .ifindexproperty  q 2-
> .iflink property  q 2-
> .mtuproperty  q 1500 -

Simon already replied to this, but let's add some further points:

dbus' object model is modelled after the object model of common
object-oriented programming languages, i.e. Java, C# and
suchlike. They generally have immutable interface definitions,
i.e. the vtables consisting of methods and properties never change,
but the implementation of them might, and objects might expose
different interfaces at the same time, in different combinations.

It's not unlike C in many ways: a C struct definition doesn't change
either, regardless what you apply it to.

Hence: you have multiple options to model what you are trying to do:
try to split things up into multiple interfaces so that you object can
implement them in varying combinations. Or simply define all
properties at all times, but define a special value (i.e. UINT64_MAX
for a uint64_t property or so) that indicates they don't actually
apply to the current object.

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Password agent for user services

2019-05-20 Thread Lennart Poettering
On Mo, 13.05.19 20:30, Michal Koutný (mkou...@suse.com) wrote:

> Hello,
> I was pondering a user service that would ask for password via the
> password agent infrastructure (as there is
> systemd-gnome-ask-password-agent it could be quite integrated with the
> desktop environment) as an alternative to saving it in (Gnome) keyring.
>
> Naïve experiment with
>
> > [Service]
> > ExecStart=/usr/bin/systemd-ask-password "What is your pwd?"
>
> lead to
>
> > May 13 19:49:56 host systemd-ask-password[28844]: Failed to query password: 
> > Permission denied
>
> Then I read about the password agent API [1] and realized that poor
> agent cannot create the notification file in the watched directory. I
> also noticed the auxiliary agent is not spawned for user services [2].
>
> I'm not that familiar with policy-kit, however, IIUC, it is possible to
> ask unprivileged systemd-gnome-ask-password-agent to provide a password
> for system service. Is that correct?
> What would then prohibit making /run/systemd/ask-password world writable
> to allow unprivileged users to ask for a password?

So, the idea was always that the ask-pw logic is for asking unpriv
users for passphrases for priv infrastructure.

I figure extending the logic to allow unpriv infrastructure asking pws
from the same unpriv users would be ok to add. however, this should be
implemented by introducing $XDG_RUNTIME_DIR/ask-password/ or so, as a
separate per-user dir to add these files to. I figure adding such a
patch that adds that would be ok.

> (I understand the interface is so crude so that it works at early boot
> stages w/out DBus. For the user requests it would perhaps make sense to
> make have a parallel DBus API.)

Yeah, we added this stuff so that we can query passwords without dbus
around in early boot, and dbus still isn't available even now in early
boot. The design also was intended to work without continously running
centralized daemon.

Ideally some infrastructure like PK would supply this mechanism
instead of us btw. Or at least the kernel keyring userspace code woul,
but I still don't see that happening. Hence, maybe the easiest and
most acceptable solution would be to simply extend the ask-pw stuff to
support a per-user concept too...

> Or is there an alternative approach to query interactively passwords for
> user services (e.g. already existing user service that could queried via
> DBus)?

Nothing I was aware of.

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] systemd-nspawn and cgroup hybrid mode

2019-05-20 Thread Lennart Poettering
On Mo, 13.05.19 11:07, Antoine Pietri (antoine.piet...@gmail.com) wrote:

> On Mon, May 13, 2019 at 10:42 AM Lennart Poettering
>  wrote:
> > you can use it to lock up the machine, hence we generally don't do it.
>
> Thanks, got it. For my usecase though, security isn't much of a
> concern and I don't necessarily have the time/bandwidth to migrate the
> software to cgroupsv2 upstream right now. Is there an option "this
> will void your warranty" that I can enable to force delegation in the
> hybrid setup? :-)

Nope, there currently is not, sorry. And it's unlikely we'll add this
now given that cgroupv1 is kinda on its way out, and it's genuinely
unsafe to do this...

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Failed to open system journal: Invalid argument

2019-05-20 Thread Lennart Poettering
On Sa, 18.05.19 09:59, Kay One (kayone...@gmail.com) wrote:

> *[ 2002.668599] systemd-journald[743]: Journal effective settings seal=yes
> compress=yes compress_threshold_bytes=512B*
> *[ 2002.679080] systemd-journald[743]: Failed to open system journal:
> Invalid argument*

Hmm, this is interesting. I wonder how that happens. Does stracing the
journald show anything interesting? i.e. some syscall throwing EINVAL?

What's the file system used?

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Failed to start apache2 with error code exited 1 failure

2019-05-20 Thread Dorian ROSSE
Taken *

Télécharger Outlook pour Android


From: Dorian ROSSE
Sent: Monday, May 20, 2019 11:34:38 AM
To: Andy Pieters; systemd-de...@freedesktop.org
Subject: Re: [systemd-devel] Failed to start apache2 with error code exited 1 
failure

Ok I will ask to Apache but I was know this Is a systemd problem because the 
engine of Apache is systemd...

It is not bad you have take the time for explained,

Have a Nice week,

Regards.


Dorian Rosse.

Télécharger Outlook pour Android


From: systemd-devel  on behalf of 
Andy Pieters 
Sent: Monday, May 20, 2019 11:29:23 AM
To: systemd-de...@freedesktop.org
Subject: Re: [systemd-devel] Failed to start apache2 with error code exited 1 
failure

Dorian, n’oubliez pas que cette liste concerne des problèmes spécifiques à 
systemd.
(Please remember that this list is for systemd-specific problems only)

Your own output mentions an apache configuration issue.


On Mon, May 20, 2019 at 10:24 AM Dorian ROSSE 
mailto:dorianbr...@hotmail.fr>> wrote:
Hello,


My apache2 seem broken and I need them for listen the radio on my ISP TV 
receiver by nagios core,

I copy paste :

systemctl status apache2
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: 
enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
   └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Sun 2019-05-19 16:59:03 UTC; 16h ago
  Process: 310 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)

mai 19 16:59:03 bitfenix-server systemd[1]: Starting The Apache HTTP Server...
mai 19 16:59:03 bitfenix-server apachectl[310]: [Sun May 19 16:59:03.401300 
2019] [so:warn] [pid 325] AH01574: module dav_module is already loaded, skipping
mai 19 16:59:03 bitfenix-server apachectl[310]: Action 'start' failed.
mai 19 16:59:03 bitfenix-server apachectl[310]: The Apache error log may have 
more information.
mai 19 16:59:03 bitfenix-server systemd[1]: apache2.service: Control process 
exited, code=exited status=1
mai 19 16:59:03 bitfenix-server systemd[1]: apache2.service: Failed with result 
'exit-code'.
mai 19 16:59:03 bitfenix-server systemd[1]: Failed to start The Apache HTTP 
Server.

Thank you in advance to help me debugge this program,

Regards.


Dorian ROSSE.
Provenance : Courrier pour 
Windows 10

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

Re: [systemd-devel] Failed to start apache2 with error code exited 1 failure

2019-05-20 Thread Dorian ROSSE
Ok I will ask to Apache but I was know this Is a systemd problem because the 
engine of Apache is systemd...

It is not bad you have take the time for explained,

Have a Nice week,

Regards.


Dorian Rosse.

Télécharger Outlook pour Android


From: systemd-devel  on behalf of 
Andy Pieters 
Sent: Monday, May 20, 2019 11:29:23 AM
To: systemd-de...@freedesktop.org
Subject: Re: [systemd-devel] Failed to start apache2 with error code exited 1 
failure

Dorian, n’oubliez pas que cette liste concerne des problèmes spécifiques à 
systemd.
(Please remember that this list is for systemd-specific problems only)

Your own output mentions an apache configuration issue.


On Mon, May 20, 2019 at 10:24 AM Dorian ROSSE 
mailto:dorianbr...@hotmail.fr>> wrote:
Hello,


My apache2 seem broken and I need them for listen the radio on my ISP TV 
receiver by nagios core,

I copy paste :

systemctl status apache2
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: 
enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
   └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Sun 2019-05-19 16:59:03 UTC; 16h ago
  Process: 310 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)

mai 19 16:59:03 bitfenix-server systemd[1]: Starting The Apache HTTP Server...
mai 19 16:59:03 bitfenix-server apachectl[310]: [Sun May 19 16:59:03.401300 
2019] [so:warn] [pid 325] AH01574: module dav_module is already loaded, skipping
mai 19 16:59:03 bitfenix-server apachectl[310]: Action 'start' failed.
mai 19 16:59:03 bitfenix-server apachectl[310]: The Apache error log may have 
more information.
mai 19 16:59:03 bitfenix-server systemd[1]: apache2.service: Control process 
exited, code=exited status=1
mai 19 16:59:03 bitfenix-server systemd[1]: apache2.service: Failed with result 
'exit-code'.
mai 19 16:59:03 bitfenix-server systemd[1]: Failed to start The Apache HTTP 
Server.

Thank you in advance to help me debugge this program,

Regards.


Dorian ROSSE.
Provenance : Courrier pour 
Windows 10

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

Re: [systemd-devel] Fwd: Excess of StartLimitBurst

2019-05-20 Thread Lennart Poettering
On Mo, 20.05.19 10:59, Alexander Mykolaichyk (to4...@gmail.com) wrote:

> Dear all,
>
> Help me please with my problem.
> For example, I have systems service config with such parameters:
>
> Restart=always
> RestartSec=1
> StartLimitInterval=300
> StartLimitBurst=3

This setting means the service is attempted to be started at most 3
times within 5min. By default current systemd allows services to be
started at most 5 times within 10s. The default can be controlled with
DefaultStartLimitIntervalSec=/DefaultStartLimitBurst= in
/etc/systemd/system.conf.

Note that these settings apply to any kind of start, i.e. both
"systemctl start" and "systemctl restart".

>
> systemd version = 215
>
> After the system boot up I can restart the service 4 times with systemctl
> restart service. But all other services can be restarted 3 times.
>
> As I understand and after I looked to the systemd sources - StartLimitBurst
> is the limit for start/restart operations and after boot up there are
> possibility for restarting the service only 3 times during
> StartLimitInterval. When new StartLimitInterval is started I can restart
> the service 4 times.

I cannot parse this, sorry.

Note that "systemctl reset-failed" will also reset the restart counter
of a unit these days. Also, if a unit is not pinned into memory
because some other unit references it in some way it gets unloaded
right-away and along with it the restart counter. This means restart
limiting is ineffective if units are not referenced continously.

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Failed to start apache2 with error code exited 1 failure

2019-05-20 Thread Andy Pieters
Dorian, n’oubliez pas que cette liste concerne des problèmes spécifiques à
systemd.
(Please remember that this list is for systemd-specific problems only)

Your own output mentions an apache configuration issue.


On Mon, May 20, 2019 at 10:24 AM Dorian ROSSE 
wrote:

> Hello,
>
>
> My apache2 seem broken and I need them for listen the radio on my ISP TV
> receiver by nagios core,
>
> I copy paste :
>
> *systemctl status apache2*
>
> *● apache2.service - The Apache HTTP Server*
>
> *   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor
> preset: enabled)*
>
> *  Drop-In: /lib/systemd/system/apache2.service.d*
>
> *   └─apache2-systemd.conf*
>
> *   Active: failed (Result: exit-code) since Sun 2019-05-19 16:59:03 UTC;
> 16h ago*
>
> *  Process: 310 ExecStart=/usr/sbin/apachectl start (code=exited,
> status=1/FAILURE)*
>
>
>
> *mai 19 16:59:03 bitfenix-server systemd[1]: Starting The Apache HTTP
> Server...*
>
> *mai 19 16:59:03 bitfenix-server apachectl[310]: [Sun May 19
> 16:59:03.401300 2019] [so:warn] [pid 325] AH01574: module dav_module is
> already loaded, skipping*
>
> *mai 19 16:59:03 bitfenix-server apachectl[310]: Action 'start' failed.*
>
> *mai 19 16:59:03 bitfenix-server apachectl[310]: The Apache error log may
> have more information.*
>
> *mai 19 16:59:03 bitfenix-server systemd[1]: apache2.service: Control
> process exited, code=exited status=1*
>
> *mai 19 16:59:03 bitfenix-server systemd[1]: apache2.service: Failed with
> result 'exit-code'.*
>
> *mai 19 16:59:03 bitfenix-server systemd[1]: Failed to start The Apache
> HTTP Server.*
>
>
>
> Thank you in advance to help me debugge this program,
>
> Regards.
>
>
> Dorian ROSSE.
>
> Provenance : Courrier 
> pour Windows 10
>
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Failed to start apache2 with error code exited 1 failure

2019-05-20 Thread Lennart Poettering
On Mo, 20.05.19 09:24, Dorian ROSSE (dorianbr...@hotmail.fr) wrote:

> Hello,
>
>
> My apache2 seem broken and I need them for listen the radio on my ISP TV 
> receiver by nagios core,

Please contact apache for help, not systemd. This is not a systemd
problem, but an Apache problem.

Thank you for understanding,

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] Failed to start apache2 with error code exited 1 failure

2019-05-20 Thread Dorian ROSSE
Hello,


My apache2 seem broken and I need them for listen the radio on my ISP TV 
receiver by nagios core,

I copy paste :

systemctl status apache2
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: 
enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
   └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Sun 2019-05-19 16:59:03 UTC; 16h ago
  Process: 310 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)

mai 19 16:59:03 bitfenix-server systemd[1]: Starting The Apache HTTP Server...
mai 19 16:59:03 bitfenix-server apachectl[310]: [Sun May 19 16:59:03.401300 
2019] [so:warn] [pid 325] AH01574: module dav_module is already loaded, skipping
mai 19 16:59:03 bitfenix-server apachectl[310]: Action 'start' failed.
mai 19 16:59:03 bitfenix-server apachectl[310]: The Apache error log may have 
more information.
mai 19 16:59:03 bitfenix-server systemd[1]: apache2.service: Control process 
exited, code=exited status=1
mai 19 16:59:03 bitfenix-server systemd[1]: apache2.service: Failed with result 
'exit-code'.
mai 19 16:59:03 bitfenix-server systemd[1]: Failed to start The Apache HTTP 
Server.

Thank you in advance to help me debugge this program,

Regards.


Dorian ROSSE.
Provenance : Courrier pour 
Windows 10

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

Re: [systemd-devel] ExecStartPre checking conf

2019-05-20 Thread Olaf van der Spek
On Sun, May 19, 2019 at 12:26 PM Reindl Harald  wrote:
> Am 19.05.19 um 11:45 schrieb Olaf van der Spek:
> > ExecStartPre is sometimes used to check the configuration. Does this make 
> > sense?
> > It seems this causes a lot of code to run twice, as the configuration
> > is checked on the real invocation anyway.
>
> in my opinion not really
>
> it could be useful if would be a "ExecRestartPre" to prevent the stop
> action in case of a syntax error but if the unit fail because of
> ExecStartPew or a failure of ExecStart don't make much difference

But ExecRestartPre doesn't exist does it?


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

[systemd-devel] Fwd: Excess of StartLimitBurst

2019-05-20 Thread Alexander Mykolaichyk
Dear all,

Help me please with my problem.
For example, I have systems service config with such parameters:

Restart=always
RestartSec=1
StartLimitInterval=300
StartLimitBurst=3

systemd version = 215

After the system boot up I can restart the service 4 times with systemctl
restart service. But all other services can be restarted 3 times.

As I understand and after I looked to the systemd sources - StartLimitBurst
is the limit for start/restart operations and after boot up there are
possibility for restarting the service only 3 times during
StartLimitInterval. When new StartLimitInterval is started I can restart
the service 4 times.

So why counter for start/restart operation for my service is reseted after
the service is started and I can restart my service 4 times?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] Proper way for systemd service to wait mdev gvt device initialization

2019-05-20 Thread Mantas Mikulėnas
On Sun, May 19, 2019 at 9:50 PM Alex Ivanov  wrote:

> Hello.
> What is the proper way to do that? I have a unit that creates gvt device
> in the system
>
> ExecStart = "sh -c 'echo a297db4a-f4c2-11e6-90f6-d3b88d6c9525 >
> /sys/bus/pci/devices/:00:02.0/mdev_supported_types/i915-GVTg_V5_8/create'";
> ExecStop = "sh -c 'echo 1 >
> /sys/bus/pci/devices/:00:02.0/a297db4a-f4c2-11e6-90f6-d3b88d6c9525/remove'";
>

Personally, I would use an udev rule:

ACTION=="add", SUBSYSTEM=="pci", ENV{PCI_SLOT_NAME}==":00:02.0",
ATTR{mdev_supported_types/i915-GVTg_V5_8/create}="a297db4a-f4c2-11e6-90f6-d3b88d6c9525"

Though on the other hand, a service is a good choice if you want to
`systemctl stop` it later on.

ACTION=="add", SUBSYSTEM=="pci", ENV{PCI_SLOT_NAME}==":00:02.0",
ENV{SYSTEMD_WANTS}+="create-gvt.service"


>
> Ideally I would to like to start this service when :00:02.0 device
> appears in the system, but the problem is that
> /sys/bus/pci/devices/:00:02.0/mdev_supported_types/ tree is populated
> later, so my service will fail.
>
> So the question what is the proper way to fix that.
>

If the driver doesn't populate its sysfs entries in time, maybe it at least
generates 'change' uevents? (udevadm --monitor)

If there are no uevents either, well, there's nothing you can do from
systemd's side. (Other than making a script that loops repeatedly checking
"is it there yet? is it there yet?")

-- 
Mantas Mikulėnas
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel