Hello,
I have one query on the behaviour I am overserving with systemd service.

Below are the contents of service file,

# cat /usr/lib/systemd/system/qs.service
[Unit]
Description=init script
After=network.target

[Service]
ExecStartPre=/bin/sh /usr/local/cmcluster/bin/realtimeslice.sh -s 
/usr/lib/systemd/system/qs.service
ExecStart=/usr/local/qs/bin/qs
Type=simple

[Install]
WantedBy=multi-user.target

What realtimeslice.sh does is to identify a slice having RT quantum 
(cpu.rt_runtime_us) as 950000.
Once the slice is identified the service attaches the binary mentioned in 
ExecStart to that slice.
This is done because binary(/usr/local/qs/bin/qs) tries to set realtime 
priority.

Now coming to the issue which I am facing,


1.     Suppose I have 2 slices, A.slice (cpu.rt_runtime_us value = 950000) and 
B.slice (cpu.rt_runtime_us  value = 0)

2.     Currently the service qs.service is attached to A.slice

3.     Now I changed cpu.rt_runtime_us values for these slices:  A.slice to 0 
and B.slice to 950000.

4.     When I restart the service, ExecStartPre (i.e realtimeslice.sh) 
determines that B.slice is eligible slice and it updates the slice name in the 
configuration files and in drop-ins.

5.     But Binary at ExecStart still doesn't see the updated slice info and 
fails to set the realtime priority.

6.     If I restart the service again it is working fine and binary is able to 
set the realtime priority.

Is it that systemd at its invocation caches the all the information (including 
slice values) and uses those values for ExecStart[Pre] ? Because in the next 
run it is working fine.

Is there a way reload/refresh the settings done at ExecStartPre, so that it 
will reflect at ExecStart.

Thanks & Regards,
Hari.


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

Reply via email to