Closed traylenator closed 4 months ago
Very open to the simpler:
systemd::manage_dropin { 'devicelimits.conf':
unit => 'special.service',
service_entry => {
'IOReadIOPSMax' => [
'/dev/afs 100',
'/dev/gluster 1000K',
],
},
}
:+1: or :-1: for this simpler one.
Maybe make a type for
Variant[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount],Array[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount]]]
and
Array[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount]]
Systemd::Unit::Bandwidth?
Maybe make a type for
Variant[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount],Array[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount]]]
and
Array[Tuple[Stdlib::Absolutepath, Systemd::Unit::Amount]]
Systemd::Unit::Bandwidth?
I don't think this is used anywhere else. I certainly don't want to move away from the obvious to read.
variant[array[thing],thing]
So would only leave the tuple to simplify and that's simple already. :-)
Pull Request (PR) description
Using any of the following directives in
systemd::manage_dropin
orsystemd::manage_unit
resulted in a compilation error.IODeviceWeight
IOReadBandwidthMax
IOWriteBandwidthMax
IOReadIOPSMax
IOWriteIOPSMax
The types for these directives in
Systemd::Unit::Slice
andSystemd::Unit::Service
have now been updated.Example usage:
would result in a drop in file of:
This Pull Request (PR) fixes the following issues
Worth Noting
systemd::service_limit
uses for these parameters.systemd::service_limits
a wrapper tosystemd::manage_dropin
. it contains a translation for these parameters to maintain backwards compatibility.systemd::service_limits
could then be deprecated.