NCM::Component::Systemd::UnitFile handles the configuration of systemd unitfiles.
Returns a new object, accepts the following mandatory arguments
The unit (full
EDG::WP4::CCM::CacheManager::Elementinstance with the unitfile configuration.
(An element instance is required becasue the rendering of the configuration is pan-basetype sensistive).
A boolean to replace the configuration. (Default/undef is false).
For a non-replaced configuration, a directory
</etc/systemd/system/<unit.d>> is created and the unitfile is
</etc/systemd/system/<unit.d/quattor.conf>>. Systemd will pickup settings from this
.conffiles in this directory, and also any configuration for the unit in the default systemd paths (e.g. typical unit part of the software package located in
A replaced configuration overrides all existing system unitfiles for the unit (and has to define all attributes). It has filename
Backup files and/or directories.
A hashref with custom configuration data. See
A logger instance (compatible with
custommethod prepares configuration data that is cannot be found in the profile.
Report hashref with custom data on success, undef otherwise.
Following custom attributes are supported:
CPUAffinitylist determined via
Allows to e.g. cpubind on numanodes using the
Forces an empty list to reset any possible previously defined affinity.
Create the unitfile. Returns undef in case of problem, a boolean indication if something changed otherwise.
(This method will take all required actions to use the values, like reloading the systemd daemon. It will not however change the state of the unit, e.g. by restarting it.)
Create and return the filename to use, and prepare the directory structure if needed.
basediris the base directory to use, e.g.
_hwloc_calc_cpus, and returns in
CPUAffinityformat with a reset
hwloc-calc --physical --intersect PUcommand for
Returns arrayref with CPU indices on success, undef otherwise.
A function that return the custom variables hashref to pass as ttoptions. (This is a function, not a method).