As others have said, this is not possible.
It is however possible to configure it via a dropin file.
e.g. if your unit is called foo.service, then just mkdir
/etc/systemd/system/foo.service.d/ and create a file cpu-affinity.conf
inside that folder (any filename will do).
In this file put:
On Thu, 29.09.16 11:25, Vasiliy Tolstov (v.tols...@selfip.ru) wrote:
> I have CPUAffinity inside service file and want to configure it via
> EnvironmentFile, but
> CPUAffinity=$CPUAffinity does not work with message Failed to parse
> CPU affinity '$CPUAffinity'
> Environment file contains
I asked about something similar to this a while back. I think the answer
was that variable expansion only works in the Exec* directives.
Cheers,
Brian
On Thu, Sep 29, 2016, 03:26 Vasiliy Tolstov wrote:
> I have CPUAffinity inside service file and want to configure it via
>
I have CPUAffinity inside service file and want to configure it via
EnvironmentFile, but
CPUAffinity=$CPUAffinity does not work with message Failed to parse
CPU affinity '$CPUAffinity'
Environment file contains CPUAffinity="0-2"
Does it possible to assign cpu affinity via env variable ?
Thanks!