[systemd-devel] 回复: 回复: [systemd-de vel] systemctl can't execute stop actually,whenservice is started by other way

Reindl Harald h.reindl at thelounge.net
Thu Jun 29 10:05:12 UTC 2017



Am 29.06.2017 um 11:51 schrieb Oliver Neukum:
> Am Donnerstag, den 29.06.2017, 11:45 +0200 schrieb Reindl Harald:
>>
>> Am 29.06.2017 um 10:05 schrieb Oliver Neukum:
>>>
>>> Am Mittwoch, den 28.06.2017, 13:29 +0200 schrieb Lennart Poettering:
>>>>
>>>> Well, it's a service manager. As such it keeps track of services,
>>>> knows when they are started and when they aren't. Why would it stop
>>>> services that aren't started?
>>>
>>> Because you command it to do so.
>>> The check systemd does adds no value. There is a reason to not start
>>> something that is running. The reverse does not apply
>>
>> this is nonsense - how in the world should systemmd know what to stop
>> when it has no clue about the involved processes because it did not
>> start the service and hence has no tracking at all
>>
> 
> So try and fail. That is still no excuse for ruling out that you can
> stop a service you have not started. That is pure politics.

*try WHAT* - kill random processes?

simple example after that you hopefully understand why this is nonsense

* i have two servcies on several machines
* each of the has "mysqld" as ExecStart using different configs
* "mysqld.service" and "replication.service"

so what do you do when "replication.service" is not started and you say 
"systemctl stop replicatiuon.service" - kill my other mysqld?

ps aux | grep openvpn | wc -l
7

what do you do when you issue "systemctl stop openvpn1.service" and it 
is not running? kill my other 6 instanes, kill only one of them and if 
yes which one

a service manager is not a gambling machine

* if you start a process by hand kill it by hand
* if you start a process as service kill it with systemcl

it's really that easy



More information about the systemd-devel mailing list