CINXE.COM
limits.pp 路 operations-puppet
<!DOCTYPE html><html><head><meta charset="UTF-8" /><title>limits.pp 路 operations-puppet</title><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes" /><link rel="mask-icon" color="#3D4B67" href="https://phab.wmfusercontent.org/res/phabricator/db699fe1/rsrc/favicons/mask-icon.svg" /><link rel="apple-touch-icon" sizes="76x76" href="https://phab.wmfusercontent.org/file/data/wai6mh2gkrssonesklmm/PHID-FILE-jiixbumihmhuzz2paeut/favicon" /><link rel="apple-touch-icon" sizes="120x120" href="https://phab.wmfusercontent.org/file/data/a3izriz5azyzso4bnueg/PHID-FILE-ps6cpmki336a7zc3oqjn/favicon" /><link rel="apple-touch-icon" sizes="152x152" href="https://phab.wmfusercontent.org/file/data/o2jxp55a4p46ytynsfng/PHID-FILE-rug6ohtqrwvnunh5kj4x/favicon" /><link rel="icon" id="favicon" href="https://phab.wmfusercontent.org/file/data/ylbeoktf43zmd3loe435/PHID-FILE-ahr5qqrmgg3kjvzhpv4k/favicon" /><meta name="referrer" content="no-referrer" /><link rel="stylesheet" type="text/css" href="https://phab.wmfusercontent.org/res/defaultX/phabricator/b89e8c6c/rsrc/css/application/diffusion/diffusion-repository.css" /><link rel="stylesheet" type="text/css" href="https://phab.wmfusercontent.org/res/defaultX/phabricator/45b62efe/core.pkg.css" /><link rel="stylesheet" type="text/css" href="https://phab.wmfusercontent.org/res/defaultX/phabricator/e382316a/rsrc/css/layout/phabricator-source-code-view.css" /><link rel="stylesheet" type="text/css" href="https://phab.wmfusercontent.org/res/defaultX/phabricator/354279ea/diffusion.pkg.css" /><link rel="stylesheet" type="text/css" href="https://phab.wmfusercontent.org/res/defaultX/phabricator/e46232d6/rsrc/css/application/diffusion/diffusion.css" /><link rel="stylesheet" type="text/css" href="https://phab.wmfusercontent.org/res/defaultX/phabricator/68513c34/rsrc/css/phui/phui-left-right.css" /><script type="text/javascript" src="https://phab.wmfusercontent.org/res/defaultX/phabricator/98e6504a/rsrc/externals/javelin/core/init.js"></script></head><body class="device-desktop platform-windows phui-theme-blue"><div class="main-page-frame" id="main-page-frame"><div id="phabricator-standard-page" class="phabricator-standard-page"><div class="phabricator-main-menu phabricator-main-menu-background" id="UQ0_2"><a class="phabricator-main-menu-search-button phabricator-expand-application-menu" data-sigil="jx-toggle-class" data-meta="0_16"><span class="phabricator-menu-button-icon phui-icon-view phui-font-fa fa-search" id="UQ0_3"></span></a><a class="phabricator-main-menu-brand" href="/"><span class="aural-only">Home</span><span class="phabricator-main-menu-project-logo" style="background-size: 40px 40px; background-position: 0 0; background-image: url(https://phab.wmfusercontent.org/file/data/ki2yptiznxwthixxdwas/PHID-FILE-be4byvg2akyovi3g33wq/logo)"></span><span class="phabricator-wordmark">Phabricator</span></a><ul class="phui-list-view phabricator-search-menu"><li class="phui-list-item-view phui-list-item-type-link phabricator-main-menu-search"><div class="" data-sigil=""><form action="/search/" method="POST"><input type="hidden" name="__csrf__" value="B@vsaprgod2fa1893d7b9797c6" /><input type="hidden" name="__form__" value="1" /><div class="phabricator-main-menu-search-container"><input type="text" name="query" id="UQ0_4" autocomplete="off" accesskey="F" autocorrect="off" autocapitalize="off" spellcheck="false" /><button id="UQ0_6" class="phui-icon-view phui-font-fa fa-search"><span class="aural-only">Search</span></button><button class="button dropdown has-icon phui-button-default phabricator-main-menu-search-dropdown" id="UQ0_7" data-sigil="global-search-dropdown" data-meta="0_17"><span class="aural-only">Configure Global Search</span><span class="visual-only phui-icon-view phui-font-fa fa-globe" data-sigil="global-search-dropdown-icon" data-meta="0_18" aria-hidden="true"></span><span class="caret"></span></button><input type="hidden" name="search:scope" value="all" data-sigil="global-search-dropdown-input" /><input type="hidden" id="UQ0_8" name="search:application" value="PhabricatorDiffusionApplication" data-sigil="global-search-dropdown-app" /><input type="hidden" name="search:primary" value="true" /><div id="UQ0_5" class="phabricator-main-menu-search-target"></div></div></form></div></li></ul><a class=" phabricator-core-login-button" href="https://phabricator.wikimedia.org/auth/start/?next=%2Fsource%2Foperations-puppet%2Fbrowse%2Fproduction%2Fmodules%2Fprofile%2Fmanifests%2Fanalytics%2Fclient%2Flimits.pp" role="button"><div class="phui-button-text">Log In</div></a></div><div id="phabricator-standard-page-body" class="phabricator-standard-page-body"><div class="phui-crumbs-view phui-crumbs-border"><a href="/diffusion/" class="phui-crumb-view phui-crumb-has-icon"><span class="visual-only phui-icon-view phui-font-fa fa-code" data-meta="0_19" aria-hidden="true"></span><span class="phui-crumb-name"> Diffusion</span> </a><span class="visual-only phui-icon-view phui-font-fa fa-angle-right phui-crumb-divider phui-crumb-view" data-meta="0_20" aria-hidden="true"></span><a href="/source/operations-puppet/repository/production/" class="phui-crumb-view"><span class="phui-crumb-name"> Wikimedia Puppet (production)</span> </a><span class="visual-only phui-icon-view phui-font-fa fa-angle-right phui-crumb-divider phui-crumb-view" data-meta="0_21" aria-hidden="true"></span><span class="phui-crumb-view phabricator-last-crumb"><span class="phui-crumb-name"> Code</span> </span></div><div class="phui-two-column-view phui-side-column-right with-tabs "><div class="phui-two-column-container"><div class="phui-two-column-header"><div class="phui-header-shell diffusion-browse-header"><h1 class="phui-header-view"><div class="phui-header-row"><div class="phui-header-col2"><span class="phui-header-header"><span class="visual-only phui-icon-view phui-font-fa fa-file-code-o phui-header-icon" data-meta="0_10" aria-hidden="true"></span><a href="/source/operations-puppet/browse/production/">operations-puppet</a><span class="phui-header-divider">/</span><a href="/source/operations-puppet/browse/production/modules/">modules</a><span class="phui-header-divider">/</span><a href="/source/operations-puppet/browse/production/modules/profile/">profile</a><span class="phui-header-divider">/</span><a href="/source/operations-puppet/browse/production/modules/profile/manifests/">manifests</a><span class="phui-header-divider">/</span><a href="/source/operations-puppet/browse/production/modules/profile/manifests/analytics/">analytics</a><span class="phui-header-divider">/</span><a href="/source/operations-puppet/browse/production/modules/profile/manifests/analytics/client/">client</a><span class="phui-header-divider">/</span>limits.pp</span><div class="phui-header-subheader"><span class="phui-tag-view phui-tag-type-shade phui-tag-indigo phui-tag-shade phui-tag-border-none "><span class="phui-tag-core "><a href="/rOPUP77f6a96d9356f20ec20d638fc484169bfa0b7e6e">77f6a96d9356</a></span></span><span class="phui-tag-view phui-tag-type-outline phui-tag-indigo phui-tag-border-none diffusion-header-branch-tag"><span class="phui-tag-core ">production</span></span></div></div><div class="phui-header-col3"><ul class="phui-header-action-list"><li class="phui-header-action-item"><div class="diffusion-search-form-view"><form method="GET" action="/source/operations-puppet/browse/production/modules/profile/manifests/analytics/client/limits.pp" class="diffusion-search-form" id="diffusion-search-form" data-sigil="diffusion-search-form"><input type="text" id="diffusion-search-input" name="grep" class="diffusion-search-input" placeholder="Pattern Search" data-sigil="diffusion-search-input" /></form></div></li></ul></div></div></h1></div></div><div class="phui-two-column-tabs"><ul class="phui-list-view phui-list-tabbar "><li class="phui-list-item-view phui-list-item-type-link phui-list-item-has-icon "><a href="/source/operations-puppet/repository/production/" class="phui-list-item-href" data-sigil=""><span class="visual-only phui-icon-view phui-font-fa fa-home phui-list-item-icon" data-meta="0_11" aria-hidden="true"></span><span class="phui-list-item-name">Home</span></a></li><li class="phui-list-item-view phui-list-item-type-link phui-list-item-has-icon phui-list-item-selected "><a href="/source/operations-puppet/browse/production/modules/profile/manifests/analytics/client/limits.pp" class="phui-list-item-href" data-sigil=""><span class="visual-only phui-icon-view phui-font-fa fa-code phui-list-item-icon" data-meta="0_12" aria-hidden="true"></span><span class="phui-list-item-name">Code</span></a></li><li class="phui-list-item-view phui-list-item-type-link phui-list-item-has-icon "><a href="/source/operations-puppet/branches/production/modules/profile/manifests/analytics/client/limits.pp" class="phui-list-item-href" data-sigil=""><span class="visual-only phui-icon-view phui-font-fa fa-code-fork phui-list-item-icon" data-meta="0_13" aria-hidden="true"></span><span class="phui-list-item-name">Branches</span></a></li><li class="phui-list-item-view phui-list-item-type-link phui-list-item-has-icon "><a href="/source/operations-puppet/tags/production/modules/profile/manifests/analytics/client/limits.pp" class="phui-list-item-href" data-sigil=""><span class="visual-only phui-icon-view phui-font-fa fa-tags phui-list-item-icon" data-meta="0_14" aria-hidden="true"></span><span class="phui-list-item-name">Tags</span></a></li><li class="phui-list-item-view phui-list-item-type-link phui-list-item-has-icon "><a href="/source/operations-puppet/history/production/modules/profile/manifests/analytics/client/limits.pp" class="phui-list-item-href" data-sigil=""><span class="visual-only phui-icon-view phui-font-fa fa-history phui-list-item-icon" data-meta="0_15" aria-hidden="true"></span><span class="phui-list-item-name">History</span></a></li></ul></div><div class="phui-two-column-content"><div class="phui-two-column-row grouped"><div class="phui-side-column"></div><div class="phui-main-column"></div></div></div><div class="phui-two-column-content phui-two-column-footer"><div class="phui-left-right-view diffusion-action-bar full-mobile-buttons"><div class="phui-lr-container"><div class="phui-left-view"><a class="button button-grey has-icon has-text phui-button-default " href="/source/operations-puppet/change/production/modules/profile/manifests/analytics/client/limits.pp" role="button"><span class="visual-only phui-icon-view phui-font-fa fa-backward" data-meta="0_5" aria-hidden="true"></span><div class="phui-button-text">Last Change</div></a></div><div class="phui-right-view"><a class="button button-grey has-icon has-text phui-button-default " href="/source/operations-puppet/browse/production/modules/profile/manifests/analytics/client/limits.pp?view=raw" role="button"><span class="visual-only phui-icon-view phui-font-fa fa-file-text" data-meta="0_6" aria-hidden="true"></span><div class="phui-button-text">Raw File</div></a></div></div></div><div class="phui-box phui-box-border phui-object-box mlt mll mlr phui-box-blue-property "><div class="phui-header-shell "><h1 class="phui-header-view"><div class="phui-header-row"><div class="phui-header-col2"><span class="phui-header-header"><span class="visual-only phui-icon-view phui-font-fa fa-code phui-header-icon" data-meta="0_9" aria-hidden="true"></span>limits.pp</span></div><div class="phui-header-col3"><div class="phui-header-action-links"><a class="button button-grey dropdown has-icon has-text phui-button-default msl phui-header-action-link" role="button" id="UQ0_1" data-sigil="document-engine-view-dropdown" data-meta="0_7"><span class="visual-only phui-icon-view phui-font-fa fa-file-image-o" data-meta="0_8" aria-hidden="true"></span><div class="phui-button-text">View Options</div><span class="caret"></span></a></div></div></div></h1></div><div id="UQ0_0"><div class="document-engine-text"><div class="phabricator-source-code-container"><table class="phabricator-source-code-view remarkup-code PhabricatorMonospaced" data-sigil="phabricator-source has-symbols" data-meta="0_4"><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="1"></th><th class="phabricator-source-line"><a data-n="1"></a></th><td class="phabricator-source-code"><span></span><span class="c"># SPDX-License-Identifier: Apache-2.0</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="2"></th><th class="phabricator-source-line"><a data-n="2"></a></th><td class="phabricator-source-code"><span class="c"># == Class profile::analytics::client::limits</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="3"></th><th class="phabricator-source-line"><a data-n="3"></a></th><td class="phabricator-source-code"><span class="c">#</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="4"></th><th class="phabricator-source-line"><a data-n="4"></a></th><td class="phabricator-source-code"><span class="c"># Apply cgroup limits to stat hosts</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="5"></th><th class="phabricator-source-line"><a data-n="5"></a></th><td class="phabricator-source-code"><span class="c"># The stat hosts are used for data crunching,</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="6"></th><th class="phabricator-source-line"><a data-n="6"></a></th><td class="phabricator-source-code"><span class="c"># with data coming from Hadoop. It's easy to accidentally</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="7"></th><th class="phabricator-source-line"><a data-n="7"></a></th><td class="phabricator-source-code"><span class="c"># ask for too many resources, so let's limit them to preserve</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="8"></th><th class="phabricator-source-line"><a data-n="8"></a></th><td class="phabricator-source-code"><span class="c"># stability on these hosts.</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="9"></th><th class="phabricator-source-line"><a data-n="9"></a></th><td class="phabricator-source-code"> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="10"></th><th class="phabricator-source-line"><a data-n="10"></a></th><td class="phabricator-source-code"><span class="c"># class { 'systemd::slice::all_users':</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="11"></th><th class="phabricator-source-line"><a data-n="11"></a></th><td class="phabricator-source-code"><span class="c"># all_users_global_slice_config => template('profile/analytics/client/limits/user-resource-control.conf.erb'),</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="12"></th><th class="phabricator-source-line"><a data-n="12"></a></th><td class="phabricator-source-code"> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="13"></th><th class="phabricator-source-line"><a data-n="13"></a></th><td class="phabricator-source-code"><span class="k">class</span> <span class="na">profile</span><span class="p">::</span><span class="na">analytics</span><span class="p">::</span><span class="na">client</span><span class="p">::</span><span class="na">limits</span> <span class="p">{</span><span class="c"></span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="14"></th><th class="phabricator-source-line"><a data-n="14"></a></th><td class="phabricator-source-code"><span class="c"> # From the systemd docs for CPUQuota:</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="15"></th><th class="phabricator-source-line"><a data-n="15"></a></th><td class="phabricator-source-code"><span class="c"> # 'Use values > 100% for allotting CPU time on more than one CPU'</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="16"></th><th class="phabricator-source-line"><a data-n="16"></a></th><td class="phabricator-source-code"> <span class="nv">$cpu_val</span> <span class="o">=</span> <span class="p">(</span><span class="nv">$facts['processors']</span><span class="p">[</span><span class="s">'count'</span><span class="p">]</span> <span class="o">*</span> <span class="mi">95</span><span class="p">)</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="17"></th><th class="phabricator-source-line"><a data-n="17"></a></th><td class="phabricator-source-code"> <span class="nv">$cpu_quota</span> <span class="o">=</span> <span class="na">floor</span><span class="p">(</span><span class="nv">$cpu_val)</span><span class="c"></span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="18"></th><th class="phabricator-source-line"><a data-n="18"></a></th><td class="phabricator-source-code"><span class="c"> # Cap the maximum amount of CPU % for all the combined total of all processes</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="19"></th><th class="phabricator-source-line"><a data-n="19"></a></th><td class="phabricator-source-code"><span class="c"> # launched by users at 95%</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="20"></th><th class="phabricator-source-line"><a data-n="20"></a></th><td class="phabricator-source-code"> <span class="na">systemd</span><span class="p">::</span><span class="na">override</span> <span class="p">{</span><span class="s">'total-user-resources.conf'</span><span class="p">:</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="21"></th><th class="phabricator-source-line"><a data-n="21"></a></th><td class="phabricator-source-code"> <span class="na">content</span> <span class="o">=></span> <span class="k">template</span><span class="p">(</span><span class="s">'profile/analytics/client/limits/total-user-resource-control.conf.erb'</span><span class="p">),</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="22"></th><th class="phabricator-source-line"><a data-n="22"></a></th><td class="phabricator-source-code"> <span class="na">unit</span> <span class="o">=></span> <span class="s">'user.slice'</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="23"></th><th class="phabricator-source-line"><a data-n="23"></a></th><td class="phabricator-source-code"> <span class="p">}</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="24"></th><th class="phabricator-source-line"><a data-n="24"></a></th><td class="phabricator-source-code"> <span class="na">systemd</span><span class="p">::</span><span class="na">override</span> <span class="p">{</span><span class="s">'individual-user-resources.conf'</span><span class="p">:</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="25"></th><th class="phabricator-source-line"><a data-n="25"></a></th><td class="phabricator-source-code"> <span class="na">content</span> <span class="o">=></span> <span class="k">template</span><span class="p">(</span><span class="s">'profile/analytics/client/limits/individual-user-resource-control.conf.erb'</span><span class="p">),</span><span class="c"></span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="26"></th><th class="phabricator-source-line"><a data-n="26"></a></th><td class="phabricator-source-code"><span class="c"> # the '-' (hyphen) on the below is significant; see</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="27"></th><th class="phabricator-source-line"><a data-n="27"></a></th><td class="phabricator-source-code"><span class="c"> # https://www.freedesktop.org/software/systemd/man/latest/</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="28"></th><th class="phabricator-source-line"><a data-n="28"></a></th><td class="phabricator-source-code"><span class="c"> # user@.service.html#Controlling%20resources%20for%20logged-in%20users</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="29"></th><th class="phabricator-source-line"><a data-n="29"></a></th><td class="phabricator-source-code"><span class="c"> # for more details</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="30"></th><th class="phabricator-source-line"><a data-n="30"></a></th><td class="phabricator-source-code"> <span class="na">unit</span> <span class="o">=></span> <span class="s">'user-.slice'</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="31"></th><th class="phabricator-source-line"><a data-n="31"></a></th><td class="phabricator-source-code"> <span class="p">}</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="32"></th><th class="phabricator-source-line"><a data-n="32"></a></th><td class="phabricator-source-code"> <span class="na">systemd</span><span class="p">::</span><span class="na">override</span> <span class="p">{</span><span class="s">'guarantee-system-resource-minimum.conf'</span><span class="p">:</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="33"></th><th class="phabricator-source-line"><a data-n="33"></a></th><td class="phabricator-source-code"> <span class="na">content</span> <span class="o">=></span> <span class="k">template</span><span class="p">(</span><span class="s">'profile/analytics/client/limits/guarantee-system-resource-minimum.conf.erb'</span><span class="p">),</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="34"></th><th class="phabricator-source-line"><a data-n="34"></a></th><td class="phabricator-source-code"> <span class="na">unit</span> <span class="o">=></span> <span class="s">'system.slice'</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="35"></th><th class="phabricator-source-line"><a data-n="35"></a></th><td class="phabricator-source-code"> <span class="p">}</span><span class="c"></span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="36"></th><th class="phabricator-source-line"><a data-n="36"></a></th><td class="phabricator-source-code"> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="37"></th><th class="phabricator-source-line"><a data-n="37"></a></th><td class="phabricator-source-code"><span class="c"> # By default the cron.service unit runs under the system.slice.</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="38"></th><th class="phabricator-source-line"><a data-n="38"></a></th><td class="phabricator-source-code"><span class="c"> # This means that all crontab's processes escape the limits imposed</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="39"></th><th class="phabricator-source-line"><a data-n="39"></a></th><td class="phabricator-source-code"><span class="c"> # by the user.slice, so an explicit override is needed.</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="40"></th><th class="phabricator-source-line"><a data-n="40"></a></th><td class="phabricator-source-code"> <span class="nv">$cron_slice</span> <span class="o">=</span> <span class="s">'user.slice'</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="41"></th><th class="phabricator-source-line"><a data-n="41"></a></th><td class="phabricator-source-code"> <span class="na">systemd</span><span class="p">::</span><span class="na">unit</span> <span class="p">{</span> <span class="s">'cron'</span><span class="p">:</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="42"></th><th class="phabricator-source-line"><a data-n="42"></a></th><td class="phabricator-source-code"> <span class="na">ensure</span> <span class="o">=></span> <span class="k">present</span><span class="p">,</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="43"></th><th class="phabricator-source-line"><a data-n="43"></a></th><td class="phabricator-source-code"> <span class="na">content</span> <span class="o">=></span> <span class="k">template</span><span class="p">(</span><span class="s">'profile/analytics/client/limits/cron-override.systemd.erb'</span><span class="p">),</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="44"></th><th class="phabricator-source-line"><a data-n="44"></a></th><td class="phabricator-source-code"> <span class="na">restart</span> <span class="o">=></span> <span class="k">false</span><span class="p">,</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="45"></th><th class="phabricator-source-line"><a data-n="45"></a></th><td class="phabricator-source-code"> <span class="na">override</span> <span class="o">=></span> <span class="k">true</span><span class="p">,</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="46"></th><th class="phabricator-source-line"><a data-n="46"></a></th><td class="phabricator-source-code"> <span class="p">}</span> </td></tr><tr><th class="phabricator-source-blame-skip" data-blame="skip"></th><th class="phabricator-source-blame-info" data-blame="info" data-blame-lines="47"></th><th class="phabricator-source-line"><a data-n="47"></a></th><td class="phabricator-source-code"><span class="p">}</span> </td></tr></table></div></div></div></div></div></div></div><div class="phabricator-standard-page-footer grouped"><span>Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct.</span> 路 <a href="https://wikimediafoundation.org/">Wikimedia Foundation</a> 路 <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Non-wiki_privacy_policy">Privacy Policy</a> 路 <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Code_of_Conduct">Code of Conduct</a> 路 <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use/Phabricator">Terms of Use</a> 路 <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:General_disclaimer">Disclaimer</a> 路 <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA</a> 路 <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GPL</a> 路 <a href="https://www.mediawiki.org/wiki/Phabricator/Credits">Credits</a></div></div></div></div><script type="text/javascript" src="https://phab.wmfusercontent.org/res/defaultX/phabricator/0d915ff5/rsrc/js/core/behavior-line-linker.js"></script><script type="text/javascript" src="https://phab.wmfusercontent.org/res/defaultX/phabricator/2eeda9e0/core.pkg.js"></script><script type="text/javascript" src="https://phab.wmfusercontent.org/res/defaultX/phabricator/46fcb3af/differential.pkg.js"></script><script type="text/javascript" src="https://phab.wmfusercontent.org/res/defaultX/phabricator/243d6c22/rsrc/js/application/files/behavior-document-engine.js"></script><data data-javelin-init-kind="merge" data-javelin-init-data="{"block":0,"data":[[],[],[],[],{"uri":"","symbols":{"repositories":["PHID-REPO-btgpar4hzf7xza77eogo"],"lang":"pp","path":"modules\/profile\/manifests\/analytics\/client\/limits.pp"}},[],[],{"viewportID":"UQ0_0","viewKey":"source","views":[{"viewKey":"source","icon":"fa-code","color":null,"name":"View as Source","engineURI":"\/source\/operations-puppet\/document\/production\/modules\/profile\/manifests\/analytics\/client\/limits.pp;77f6a96d9356f20ec20d638fc484169bfa0b7e6e?as=source&filePHID=PHID-FILE-4ull2k3bqeh63buvhzkb","viewURI":"\/source\/operations-puppet\/browse\/production\/modules\/profile\/manifests\/analytics\/client\/limits.pp;77f6a96d9356f20ec20d638fc484169bfa0b7e6e?as=source","loadingMarkup":"\u003cdiv class=\"document-engine-loading\"\u003e\u003cspan class=\"visual-only phui-icon-view phui-font-fa fa-gear ph-spin\" data-meta=\"0_0\" aria-hidden=\"true\"\u003e\u003c\/span\u003eLoading...\u003c\/div\u003e","canEncode":true,"canHighlight":true,"canBlame":true},{"viewKey":"hexdump","icon":"fa-microchip","color":null,"name":"View as Hexdump","engineURI":"\/source\/operations-puppet\/document\/production\/modules\/profile\/manifests\/analytics\/client\/limits.pp;77f6a96d9356f20ec20d638fc484169bfa0b7e6e?as=hexdump&filePHID=PHID-FILE-4ull2k3bqeh63buvhzkb","viewURI":"\/source\/operations-puppet\/browse\/production\/modules\/profile\/manifests\/analytics\/client\/limits.pp;77f6a96d9356f20ec20d638fc484169bfa0b7e6e?as=hexdump","loadingMarkup":"\u003cdiv class=\"document-engine-loading\"\u003e\u003cspan class=\"visual-only phui-icon-view phui-font-fa fa-gear ph-spin\" data-meta=\"0_1\" aria-hidden=\"true\"\u003e\u003c\/span\u003eLoading...\u003c\/div\u003e","canEncode":false,"canHighlight":false,"canBlame":false},{"viewKey":"remarkup","icon":"fa-file-text-o","color":null,"name":"View as Remarkup","engineURI":"\/source\/operations-puppet\/document\/production\/modules\/profile\/manifests\/analytics\/client\/limits.pp;77f6a96d9356f20ec20d638fc484169bfa0b7e6e?as=remarkup&filePHID=PHID-FILE-4ull2k3bqeh63buvhzkb","viewURI":"\/source\/operations-puppet\/browse\/production\/modules\/profile\/manifests\/analytics\/client\/limits.pp;77f6a96d9356f20ec20d638fc484169bfa0b7e6e?as=remarkup","loadingMarkup":"\u003cdiv class=\"document-engine-loading\"\u003e\u003cspan class=\"visual-only phui-icon-view phui-font-fa fa-gear ph-spin\" data-meta=\"0_2\" aria-hidden=\"true\"\u003e\u003c\/span\u003eLoading...\u003c\/div\u003e","canEncode":false,"canHighlight":false,"canBlame":false},{"viewKey":"json","icon":"fa-database","color":null,"name":"View as JSON","engineURI":"\/source\/operations-puppet\/document\/production\/modules\/profile\/manifests\/analytics\/client\/limits.pp;77f6a96d9356f20ec20d638fc484169bfa0b7e6e?as=json&filePHID=PHID-FILE-4ull2k3bqeh63buvhzkb","viewURI":"\/source\/operations-puppet\/browse\/production\/modules\/profile\/manifests\/analytics\/client\/limits.pp;77f6a96d9356f20ec20d638fc484169bfa0b7e6e?as=json","loadingMarkup":"\u003cdiv class=\"document-engine-loading\"\u003e\u003cspan class=\"visual-only phui-icon-view phui-font-fa fa-gear ph-spin\" data-meta=\"0_3\" aria-hidden=\"true\"\u003e\u003c\/span\u003eLoading...\u003c\/div\u003e","canEncode":true,"canHighlight":false,"canBlame":false}],"encode":{"icon":"fa-font","name":"Change Text Encoding...","uri":"\/services\/encoding\/","value":null},"highlight":{"icon":"fa-lightbulb-o","name":"Highlight As...","uri":"\/services\/highlight\/","value":null},"blame":{"icon":"fa-backward","hide":"Hide Blame","show":"Show Blame","uri":"\/source\/operations-puppet\/blame\/production\/modules\/profile\/manifests\/analytics\/client\/limits.pp;77f6a96d9356f20ec20d638fc484169bfa0b7e6e","enabled":true,"value":null},"coverage":{"labels":[{"C":"Covered","U":"Not Covered","N":"Not Executable","X":"Not Reachable"}]}},[],[],[],[],[],[],[],[],{"map":{"UQ0_2":"phabricator-search-menu-expanded","UQ0_3":"menu-icon-selected"}},{"items":[{"name":"Search"},{"icon":"fa-globe","name":"All Documents","value":"all"},{"icon":"fa-code","name":"Current Application","value":"application"},{"name":"Saved Queries"},{"icon":"fa-certificate","name":"Open Documents","value":"open"},{"icon":"fa-certificate","name":"Authored Documents","value":"MaJUpIp4XQjD"},{"icon":"fa-certificate","name":"Subscribed Documents","value":"icqHFhjyxmbF"},{"icon":"fa-certificate","name":"Owned Documents","value":"xCgkkySoe4z7"},{"icon":"fa-certificate","name":"Open Tasks","value":"open-tasks"},{"name":"More Options"},{"icon":"fa-search-plus","name":"Advanced Search","href":"\/search\/query\/advanced\/"},{"icon":"fa-book","name":"User Guide: Search","href":"https:\/\/we.phorge.it\/diviner\/find\/?name=Search%20User%20Guide&type=article&jump=1"}],"icon":"fa-globe","value":"all"},[],[],[],[]]}"></data><data data-javelin-init-kind="behaviors" data-javelin-init-data="{"refresh-csrf":[{"tokenName":"__csrf__","header":"X-Phabricator-Csrf","viaHeader":"X-Phabricator-Via","current":"B@vsaprgod2fa1893d7b9797c6"}],"history-install":[]}"></data><data data-javelin-init-kind="behaviors" data-javelin-init-data="{"phabricator-line-linker":[],"repository-crossreference":[],"document-engine":[{"controlID":"UQ0_1","next":"blame"}],"workflow":[],"lightbox-attachments":[],"aphront-form-disable-on-submit":[],"toggle-class":[],"phabricator-gesture":[],"device":[],"high-security-warning":[{"show":false,"uri":"\/auth\/session\/downgrade\/","message":"Your session is in high security mode. When you finish using it, click here to leave."}],"phabricator-keyboard-shortcuts":[{"helpURI":"\/help\/keyboardshortcut\/","searchID":"UQ0_4","pht":{"\/":"Give keyboard focus to the search box.","?":"Show keyboard shortcut help for the current page."}}],"phabricator-search-typeahead":[{"id":"UQ0_5","input":"UQ0_4","button":"UQ0_6","selectorID":"UQ0_7","applicationID":"UQ0_8","defaultApplicationIcon":"fa-dot-circle-o","appScope":"application","src":"\/typeahead\/class\/PhabricatorSearchDatasource\/","limit":10,"placeholder":"Search","scopeUpdateURI":"\/settings\/adjust\/?key=search-scope"}],"quicksand-blacklist":[{"patterns":["\/phame\/live\/.*","\/conpherence\/.*","\/Z\\d+","\/file\/(data|download)\/.*","\/phortune\/.*","\/auth\/.*"]}]}"></data></body></html>