2019-01-03 01:16:34 +03:00
---
2020-01-14 12:14:11 +03:00
title: What Settings Are Currently Available For Transient Units?
2019-12-11 12:49:28 +03:00
category: Interfaces
2019-12-11 19:01:46 +03:00
layout: default
2021-09-14 17:05:21 +03:00
SPDX-License-Identifier: LGPL-2.1-or-later
2019-01-03 01:16:34 +03:00
---
2020-01-14 12:14:11 +03:00
# What Settings Are Currently Available For Transient Units?
2017-11-23 22:26:02 +03:00
Our intention is to make all settings that are available as unit file settings
2019-11-27 15:47:01 +03:00
also available for transient units, through the D-Bus API. At the moment,
device, swap, and target units are not supported at all as transient units, but
others are pretty well supported.
2017-11-23 22:26:02 +03:00
The lists below contain all settings currently available in unit files. The
ones currently available in transient units are prefixed with `✓` .
## Generic Unit Settings
2017-12-29 17:05:37 +03:00
Most generic unit settings are available for transient units.
2017-11-23 22:26:02 +03:00
```
✓ Description=
2017-12-29 17:05:37 +03:00
✓ Documentation=
✓ SourcePath=
2017-11-23 22:26:02 +03:00
✓ Requires=
✓ Requisite=
✓ Wants=
✓ BindsTo=
✓ Conflicts=
✓ Before=
✓ After=
✓ OnFailure=
✓ PropagatesReloadTo=
✓ ReloadPropagatedFrom=
✓ PartOf=
2022-01-16 09:32:27 +03:00
✓ Upholds=
2017-12-29 17:05:37 +03:00
✓ JoinsNamespaceOf=
✓ RequiresMountsFor=
✓ StopWhenUnneeded=
✓ RefuseManualStart=
✓ RefuseManualStop=
✓ AllowIsolate=
2017-11-23 22:26:02 +03:00
✓ DefaultDependencies=
2017-12-29 17:05:37 +03:00
✓ OnFailureJobMode=
✓ IgnoreOnIsolate=
✓ JobTimeoutSec=
✓ JobRunningTimeoutSec=
✓ JobTimeoutAction=
✓ JobTimeoutRebootArgument=
2019-11-27 13:04:36 +03:00
✓ StartLimitIntervalSec=
✓ StartLimitBurst=
✓ StartLimitAction=
2017-11-23 22:26:02 +03:00
✓ FailureAction=
✓ SuccessAction=
2018-11-16 13:41:18 +03:00
✓ FailureActionExitStatus=
✓ SuccessActionExitStatus=
2019-11-27 13:04:36 +03:00
✓ RebootArgument=
2017-12-29 17:05:37 +03:00
✓ ConditionPathExists=
✓ ConditionPathExistsGlob=
✓ ConditionPathIsDirectory=
✓ ConditionPathIsSymbolicLink=
✓ ConditionPathIsMountPoint=
✓ ConditionPathIsReadWrite=
✓ ConditionDirectoryNotEmpty=
✓ ConditionFileNotEmpty=
✓ ConditionFileIsExecutable=
✓ ConditionNeedsUpdate=
✓ ConditionFirstBoot=
✓ ConditionKernelCommandLine=
✓ ConditionKernelVersion=
✓ ConditionArchitecture=
2020-10-09 13:13:00 +03:00
✓ ConditionFirmware=
2017-12-29 17:05:37 +03:00
✓ ConditionVirtualization=
✓ ConditionSecurity=
✓ ConditionCapability=
✓ ConditionHost=
✓ ConditionACPower=
✓ ConditionUser=
✓ ConditionGroup=
✓ ConditionControlGroupController=
✓ AssertPathExists=
✓ AssertPathExistsGlob=
✓ AssertPathIsDirectory=
✓ AssertPathIsSymbolicLink=
✓ AssertPathIsMountPoint=
✓ AssertPathIsReadWrite=
✓ AssertDirectoryNotEmpty=
✓ AssertFileNotEmpty=
✓ AssertFileIsExecutable=
✓ AssertNeedsUpdate=
✓ AssertFirstBoot=
✓ AssertKernelCommandLine=
✓ AssertKernelVersion=
✓ AssertArchitecture=
✓ AssertVirtualization=
✓ AssertSecurity=
✓ AssertCapability=
✓ AssertHost=
✓ AssertACPower=
✓ AssertUser=
✓ AssertGroup=
✓ AssertControlGroupController=
2017-11-23 22:26:02 +03:00
✓ CollectMode=
```
## Execution-Related Settings
All execution-related settings are available for transient units.
```
✓ WorkingDirectory=
✓ RootDirectory=
✓ RootImage=
✓ User=
✓ Group=
✓ SupplementaryGroups=
✓ Nice=
✓ OOMScoreAdjust=
2020-04-04 17:43:25 +03:00
✓ CoredumpFilter=
2017-11-23 22:26:02 +03:00
✓ IOSchedulingClass=
✓ IOSchedulingPriority=
✓ CPUSchedulingPolicy=
✓ CPUSchedulingPriority=
✓ CPUSchedulingResetOnFork=
✓ CPUAffinity=
✓ UMask=
✓ Environment=
✓ EnvironmentFile=
✓ PassEnvironment=
✓ UnsetEnvironment=
✓ DynamicUser=
✓ RemoveIPC=
✓ StandardInput=
✓ StandardOutput=
✓ StandardError=
✓ StandardInputText=
✓ StandardInputData=
✓ TTYPath=
✓ TTYReset=
✓ TTYVHangup=
✓ TTYVTDisallocate=
2021-10-28 18:26:50 +03:00
✓ TTYRows=
✓ TTYColumns=
2017-11-23 22:26:02 +03:00
✓ SyslogIdentifier=
✓ SyslogFacility=
✓ SyslogLevel=
✓ SyslogLevelPrefix=
✓ LogLevelMax=
✓ LogExtraFields=
2018-10-08 06:28:36 +03:00
✓ LogRateLimitIntervalSec=
✓ LogRateLimitBurst=
2017-11-23 22:26:02 +03:00
✓ SecureBits=
✓ CapabilityBoundingSet=
✓ AmbientCapabilities=
✓ TimerSlackNSec=
✓ NoNewPrivileges=
✓ KeyringMode=
2020-08-06 13:51:50 +03:00
✓ ProtectProc=
✓ ProcSubset=
2017-11-23 22:26:02 +03:00
✓ SystemCallFilter=
✓ SystemCallArchitectures=
✓ SystemCallErrorNumber=
2020-08-30 21:56:13 +03:00
✓ SystemCallLog=
2017-11-23 22:26:02 +03:00
✓ MemoryDenyWriteExecute=
✓ RestrictNamespaces=
✓ RestrictRealtime=
2019-03-20 21:45:32 +03:00
✓ RestrictSUIDSGID=
2017-11-23 22:26:02 +03:00
✓ RestrictAddressFamilies=
2020-07-01 09:05:14 +03:00
✓ RootHash=
✓ RootHashSignature=
✓ RootVerity=
2017-11-23 22:26:02 +03:00
✓ LockPersonality=
✓ LimitCPU=
✓ LimitFSIZE=
✓ LimitDATA=
✓ LimitSTACK=
✓ LimitCORE=
✓ LimitRSS=
✓ LimitNOFILE=
✓ LimitAS=
✓ LimitNPROC=
✓ LimitMEMLOCK=
✓ LimitLOCKS=
✓ LimitSIGPENDING=
✓ LimitMSGQUEUE=
✓ LimitNICE=
✓ LimitRTPRIO=
✓ LimitRTTIME=
✓ ReadWritePaths=
✓ ReadOnlyPaths=
✓ InaccessiblePaths=
✓ BindPaths=
✓ BindReadOnlyPaths=
2018-02-13 14:29:34 +03:00
✓ TemporaryFileSystem=
2017-11-23 22:26:02 +03:00
✓ PrivateTmp=
✓ PrivateDevices=
2018-07-12 09:40:17 +03:00
✓ PrivateMounts=
2017-11-23 22:26:02 +03:00
✓ ProtectKernelTunables=
✓ ProtectKernelModules=
2019-11-27 15:47:01 +03:00
✓ ProtectKernelLogs=
2017-11-23 22:26:02 +03:00
✓ ProtectControlGroups=
✓ PrivateNetwork=
✓ PrivateUsers=
✓ ProtectSystem=
✓ ProtectHome=
2020-01-26 23:47:50 +03:00
✓ ProtectClock=
2017-11-23 22:26:02 +03:00
✓ MountFlags=
✓ MountAPIVFS=
✓ Personality=
✓ RuntimeDirectoryPreserve=
✓ RuntimeDirectoryMode=
✓ RuntimeDirectory=
✓ StateDirectoryMode=
✓ StateDirectory=
✓ CacheDirectoryMode=
✓ CacheDirectory=
✓ LogsDirectoryMode=
✓ LogsDirectory=
✓ ConfigurationDirectoryMode=
✓ ConfigurationDirectory=
✓ PAMName=
✓ IgnoreSIGPIPE=
✓ UtmpIdentifier=
✓ UtmpMode=
✓ SELinuxContext=
✓ SmackProcessLabel=
✓ AppArmorProfile=
✓ Slice=
```
## Resource Control Settings
All cgroup/resource control settings are available for transient units
```
✓ CPUAccounting=
✓ CPUWeight=
✓ StartupCPUWeight=
✓ CPUShares=
✓ StartupCPUShares=
✓ CPUQuota=
2018-11-02 19:21:57 +03:00
✓ CPUQuotaPeriodSec=
2019-07-29 18:50:05 +03:00
✓ AllowedCPUs=
2021-09-14 19:28:46 +03:00
✓ StartupAllowedCPUs=
2019-07-29 18:50:05 +03:00
✓ AllowedMemoryNodes=
2021-09-14 19:28:46 +03:00
✓ StartupAllowedMemoryNodes=
2017-11-23 22:26:02 +03:00
✓ MemoryAccounting=
2019-04-30 21:22:04 +03:00
✓ DefaultMemoryMin=
2018-06-09 03:33:14 +03:00
✓ MemoryMin=
cgroup: Implement default propagation of MemoryLow with DefaultMemoryLow
In cgroup v2 we have protection tunables -- currently MemoryLow and
MemoryMin (there will be more in future for other resources, too). The
design of these protection tunables requires not only intermediate
cgroups to propagate protections, but also the units at the leaf of that
resource's operation to accept it (by setting MemoryLow or MemoryMin).
This makes sense from an low-level API design perspective, but it's a
good idea to also have a higher-level abstraction that can, by default,
propagate these resources to children recursively. In this patch, this
happens by having descendants set memory.low to N if their ancestor has
DefaultMemoryLow=N -- assuming they don't set a separate MemoryLow
value.
Any affected unit can opt out of this propagation by manually setting
`MemoryLow` to some value in its unit configuration. A unit can also
stop further propagation by setting `DefaultMemoryLow=` with no
argument. This removes further propagation in the subtree, but has no
effect on the unit itself (for that, use `MemoryLow=0`).
Our use case in production is simplifying the configuration of machines
which heavily rely on memory protection tunables, but currently require
tweaking a huge number of unit files to make that a reality. This
directive makes that significantly less fragile, and decreases the risk
of misconfiguration.
After this patch is merged, I will implement DefaultMemoryMin= using the
same principles.
2019-03-28 15:50:50 +03:00
✓ DefaultMemoryLow=
2017-11-23 22:26:02 +03:00
✓ MemoryLow=
✓ MemoryHigh=
✓ MemoryMax=
✓ MemorySwapMax=
✓ MemoryLimit=
✓ DeviceAllow=
✓ DevicePolicy=
✓ IOAccounting=
✓ IOWeight=
✓ StartupIOWeight=
✓ IODeviceWeight=
✓ IOReadBandwidthMax=
✓ IOWriteBandwidthMax=
✓ IOReadIOPSMax=
✓ IOWriteIOPSMax=
✓ BlockIOAccounting=
✓ BlockIOWeight=
✓ StartupBlockIOWeight=
✓ BlockIODeviceWeight=
✓ BlockIOReadBandwidth=
✓ BlockIOWriteBandwidth=
✓ TasksAccounting=
✓ TasksMax=
✓ Delegate=
2019-04-17 10:42:55 +03:00
✓ DisableControllers=
2017-11-23 22:26:02 +03:00
✓ IPAccounting=
✓ IPAddressAllow=
✓ IPAddressDeny=
2020-03-10 01:09:17 +03:00
✓ ManagedOOMSwap=
✓ ManagedOOMMemoryPressure=
2021-02-03 01:16:03 +03:00
✓ ManagedOOMMemoryPressureLimit=
2021-01-28 13:31:44 +03:00
✓ ManagedOOMPreference=
2017-11-23 22:26:02 +03:00
```
## Process Killing Settings
All process killing settings are available for transient units:
```
✓ SendSIGKILL=
✓ SendSIGHUP=
✓ KillMode=
✓ KillSignal=
2019-11-27 15:47:01 +03:00
✓ RestartKillSignal=
2018-07-20 18:22:43 +03:00
✓ FinalKillSignal=
2018-09-19 22:03:01 +03:00
✓ WatchdogSignal=
2017-11-23 22:26:02 +03:00
```
## Service Unit Settings
2017-12-29 17:05:37 +03:00
Most service unit settings are available for transient units.
2017-11-23 22:26:02 +03:00
```
2020-07-01 09:05:14 +03:00
✓ BusName=
2019-06-29 03:02:30 +03:00
✓ ExecCondition=
2020-07-01 09:05:14 +03:00
✓ ExecReload=
2017-11-23 22:26:02 +03:00
✓ ExecStart=
✓ ExecStartPost=
2020-07-01 09:05:14 +03:00
✓ ExecStartPre=
2017-11-23 22:26:02 +03:00
✓ ExecStop=
✓ ExecStopPost=
2021-02-24 18:13:21 +03:00
✓ ExitType=
2020-07-01 09:05:14 +03:00
✓ FileDescriptorStoreMax=
2017-12-29 17:05:37 +03:00
✓ GuessMainPID=
2017-11-23 22:26:02 +03:00
✓ NonBlocking=
✓ NotifyAccess=
2020-07-01 09:05:14 +03:00
✓ OOMPolicy=
✓ PIDFile=
✓ RemainAfterExit=
✓ Restart=
✓ RestartForceExitStatus=
✓ RestartPreventExitStatus=
✓ RestartSec=
✓ RootDirectoryStartOnly=
✓ RuntimeMaxSec=
2021-07-13 20:38:08 +03:00
✓ RuntimeRandomizedExtraSec=
2017-11-23 22:26:02 +03:00
Sockets=
2020-07-01 09:05:14 +03:00
✓ SuccessExitStatus=
✓ TimeoutAbortSec=
✓ TimeoutSec=
✓ TimeoutStartFailureMode=
✓ TimeoutStartSec=
✓ TimeoutStopFailureMode=
✓ TimeoutStopSec=
✓ Type=
2017-12-29 17:05:37 +03:00
✓ USBFunctionDescriptors=
✓ USBFunctionStrings=
2020-07-01 09:05:14 +03:00
✓ WatchdogSec=
2017-11-23 22:26:02 +03:00
```
## Mount Unit Settings
2017-12-29 17:05:37 +03:00
All mount unit settings are available to transient units:
2017-11-23 22:26:02 +03:00
```
✓ What=
2017-12-29 17:05:37 +03:00
✓ Where=
2017-11-23 22:26:02 +03:00
✓ Options=
✓ Type=
2017-12-29 17:05:37 +03:00
✓ TimeoutSec=
✓ DirectoryMode=
✓ SloppyOptions=
✓ LazyUnmount=
✓ ForceUnmount=
2020-05-01 11:27:06 +03:00
✓ ReadWriteOnly=
2017-11-23 22:26:02 +03:00
```
## Automount Unit Settings
2017-12-29 17:05:37 +03:00
All automount unit setting is available to transient units:
2017-11-23 22:26:02 +03:00
```
2017-12-29 17:05:37 +03:00
✓ Where=
✓ DirectoryMode=
2017-11-23 22:26:02 +03:00
✓ TimeoutIdleSec=
```
## Timer Unit Settings
Most timer unit settings are available to transient units.
```
✓ OnActiveSec=
✓ OnBootSec=
2019-03-14 23:36:47 +03:00
✓ OnCalendar=
✓ OnClockChange=
2017-11-23 22:26:02 +03:00
✓ OnStartupSec=
2019-11-26 02:29:03 +03:00
✓ OnTimezoneChange=
2017-11-23 22:26:02 +03:00
✓ OnUnitActiveSec=
✓ OnUnitInactiveSec=
2017-12-14 16:02:06 +03:00
✓ Persistent=
2017-11-23 22:26:02 +03:00
✓ WakeSystem=
✓ RemainAfterElapse=
✓ AccuracySec=
✓ RandomizedDelaySec=
2020-02-01 20:27:08 +03:00
✓ FixedRandomDelay=
2017-11-23 22:26:02 +03:00
Unit=
```
## Slice Unit Settings
Slice units are fully supported as transient units, but they have no settings
of their own beyond the generic unit and resource control settings.
## Scope Unit Settings
Scope units are fully supported as transient units (in fact they only exist as
2017-12-29 17:05:37 +03:00
such).
```
2019-06-12 10:45:26 +03:00
✓ RuntimeMaxSec=
2021-07-13 20:38:08 +03:00
✓ RuntimeRandomizedExtraSec=
2017-12-29 17:05:37 +03:00
✓ TimeoutStopSec=
```
2017-11-23 22:26:02 +03:00
## Socket Unit Settings
2017-12-19 04:53:38 +03:00
Most socket unit settings are available to transient units.
2017-11-23 22:26:02 +03:00
```
2017-12-19 04:53:38 +03:00
✓ ListenStream=
✓ ListenDatagram=
✓ ListenSequentialPacket=
✓ ListenFIFO=
✓ ListenNetlink=
✓ ListenSpecial=
✓ ListenMessageQueue=
✓ ListenUSBFunction=
✓ SocketProtocol=
✓ BindIPv6Only=
✓ Backlog=
✓ BindToDevice=
✓ ExecStartPre=
✓ ExecStartPost=
✓ ExecStopPre=
✓ ExecStopPost=
✓ TimeoutSec=
✓ SocketUser=
✓ SocketGroup=
✓ SocketMode=
✓ DirectoryMode=
✓ Accept=
2020-08-20 14:00:37 +03:00
✓ FlushPending=
2017-12-19 04:53:38 +03:00
✓ Writable=
✓ MaxConnections=
✓ MaxConnectionsPerSource=
✓ KeepAlive=
✓ KeepAliveTimeSec=
✓ KeepAliveIntervalSec=
✓ KeepAliveProbes=
✓ DeferAcceptSec=
✓ NoDelay=
✓ Priority=
✓ ReceiveBuffer=
✓ SendBuffer=
✓ IPTOS=
✓ IPTTL=
✓ Mark=
✓ PipeSize=
✓ FreeBind=
✓ Transparent=
✓ Broadcast=
✓ PassCredentials=
✓ PassSecurity=
2020-05-27 20:36:56 +03:00
✓ PassPacketInfo=
2017-12-19 04:53:38 +03:00
✓ TCPCongestion=
✓ ReusePort=
✓ MessageQueueMaxMessages=
✓ MessageQueueMessageSize=
✓ RemoveOnStop=
✓ Symlinks=
✓ FileDescriptorName=
2017-11-23 22:26:02 +03:00
Service=
2017-12-19 04:53:38 +03:00
✓ TriggerLimitIntervalSec=
✓ TriggerLimitBurst=
✓ SmackLabel=
✓ SmackLabelIPIn=
✓ SmackLabelIPOut=
✓ SELinuxContextFromNet=
2017-11-23 22:26:02 +03:00
```
## Swap Unit Settings
Swap units are currently not available at all as transient units:
```
What=
Priority=
Options=
TimeoutSec=
```
## Path Unit Settings
2017-12-14 16:02:06 +03:00
Most path unit settings are available to transient units.
2017-11-23 22:26:02 +03:00
```
2017-12-14 16:02:06 +03:00
✓ PathExists=
✓ PathExistsGlob=
✓ PathChanged=
✓ PathModified=
✓ DirectoryNotEmpty=
2017-11-23 22:26:02 +03:00
Unit=
2017-12-14 16:02:06 +03:00
✓ MakeDirectory=
✓ DirectoryMode=
2017-11-23 22:26:02 +03:00
```
## Install Section
The `[Install]` section is currently not available at all for transient units, and it probably doesn't even make sense.
```
Alias=
WantedBy=
RequiredBy=
Also=
DefaultInstance=
```