Control: tag -1 - moreinfo
Control: retitle -1 usbguard.service is started three times on initial 
installation and only the 3rd time succeeds

Hi,

Muri Nicanor:
> control: tags -1 + moreinfo unreproducible

> i'm actually not able to reproduce the bug. if i install usbguard on a
> clean stretch installation i can start usbguard[0] without having an
> /etc/usbguard/rules.conf file:

>> muri@debian:~$ ls /etc/usbguard/
>> usbguard-daemon.conf
>> muri@debian:~$ grep RuleFile /etc/usbguard/usbguard-daemon.conf
>> # RuleFile=/path/to/rules.conf
>> RuleFile=/etc/usbguard/rules.conf
>> muri@debian:~$ sudo service usbguard stop
>> [sudo] password for muri:
>> muri@debian:~$ sudo service usbguard start
>> muri@debian:~$ sudo systemctl status usbguard
>> ● usbguard.service - USBGuard daemon
>>   Loaded: loaded (/lib/systemd/system/usbguard.service; enabled;
>>vendor preset: enabled)
>>   Active: active (running) since Sat 2017-02-04 12:44:55 EST; 5s ago
>>     Docs: man:usbguard-daemon(8)
>> Main PID: 1130 (usbguard-daemon)
>>    Tasks: 2 (limit: 4915)
>>   CGroup: /system.slice/usbguard.service
>>           └─1130 /usr/sbin/usbguard-daemon -k -c /etc/usbguard
>>/usbguard-daemon.conf
>>
>>Feb 04 12:44:55 debian systemd[1]: Started USBGuard daemon.

Looking closer, I see the same here, *but* what happens on
installation is weird: usbguard.service is started no less than
3 times, and only the third attempt works. It looks somewhat related
to usbguard-dbus.service:

Feb 07 11:38:41 sid-desktop systemd[1]: Started USBGuard daemon.
Feb 07 11:38:41 sid-desktop systemd[1]: Starting USBGuard D-Bus Service...
Feb 07 11:38:41 sid-desktop usbguard-daemon[3693]: [1486463921.919] (E) ERROR: 
Configuration: /etc/usbguard/rules.conf: usbguard::Exception
Feb 07 11:38:41 sid-desktop systemd[1]: usbguard.service: Main process exited, 
code=exited, status=1/FAILURE
Feb 07 11:38:41 sid-desktop systemd[1]: usbguard.service: Unit entered failed 
state.
Feb 07 11:38:41 sid-desktop systemd[1]: usbguard.service: Failed with result 
'exit-code'.
Feb 07 11:38:41 sid-desktop systemd[1]: Started USBGuard D-Bus Service.
Feb 07 11:38:42 sid-desktop systemd[1]: usbguard.service: Service hold-off time 
over, scheduling restart.
Feb 07 11:38:42 sid-desktop systemd[1]: Stopped USBGuard daemon.
Feb 07 11:38:42 sid-desktop systemd[1]: Started USBGuard daemon.
Feb 07 11:38:42 sid-desktop systemd[1]: Stopping USBGuard D-Bus Service...
Feb 07 11:38:42 sid-desktop systemd[1]: Stopped USBGuard D-Bus Service.
Feb 07 11:38:42 sid-desktop systemd[1]: Starting USBGuard D-Bus Service...
Feb 07 11:38:42 sid-desktop usbguard-daemon[3704]: [1486463922.084] (E) ERROR: 
Configuration: /etc/usbguard/rules.conf: usbguard::Exception
Feb 07 11:38:42 sid-desktop systemd[1]: usbguard.service: Main process exited, 
code=exited, status=1/FAILURE
Feb 07 11:38:42 sid-desktop systemd[1]: usbguard.service: Unit entered failed 
state.
Feb 07 11:38:42 sid-desktop systemd[1]: usbguard.service: Failed with result 
'exit-code'.
Feb 07 11:38:42 sid-desktop systemd[1]: Started USBGuard D-Bus Service.
Feb 07 11:38:42 sid-desktop systemd[1]: usbguard.service: Service hold-off time 
over, scheduling restart.
Feb 07 11:38:42 sid-desktop systemd[1]: Stopping USBGuard D-Bus Service...
Feb 07 11:38:42 sid-desktop systemd[1]: Stopped USBGuard daemon.
Feb 07 11:38:42 sid-desktop systemd[1]: Started USBGuard daemon.
Feb 07 11:38:42 sid-desktop systemd[1]: Stopped USBGuard D-Bus Service.
Feb 07 11:38:42 sid-desktop systemd[1]: Starting USBGuard D-Bus Service...
Feb 07 11:38:42 sid-desktop systemd[1]: Started USBGuard D-Bus Service.

So in the end the service is started successfully, but still I wonder
if this strange behavior is highlighting something wrong somewhere
deeper, that could bite us in the future.

Retitling accordingly. Feel free to downgrade severity.

> (nontheless i'll still add the rules.conf in the postinst script)

Sounds good!

Cheers,
-- 
intrigeri

Reply via email to