mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
net/haproxy: remove process-related options, refs #3026
This commit is contained in:
parent
4f617b6d9c
commit
4538a854d5
7 changed files with 9 additions and 103 deletions
|
|
@ -9,6 +9,11 @@ Plugin Changelog
|
|||
Changed:
|
||||
* update URLs to HAProxy 2.6 documentation
|
||||
|
||||
Removed:
|
||||
* remove Processes/nbproc option (use Threads/nbthread instead)
|
||||
* remove "Process ID" from CPU Affinity settings (now always 1)
|
||||
* remove "bind-process" option (replaced by the "process" bind keyword)
|
||||
|
||||
3.12
|
||||
|
||||
Added:
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ class SettingsController extends ApiMutableModelControllerBase
|
|||
|
||||
public function searchCpusAction()
|
||||
{
|
||||
return $this->searchBase('cpus.cpu', array('enabled', 'name', 'process_id', 'thread_id', 'cpu_id'), 'name');
|
||||
return $this->searchBase('cpus.cpu', array('enabled', 'name', 'thread_id', 'cpu_id'), 'name');
|
||||
}
|
||||
|
||||
public function getGroupAction($uuid = null)
|
||||
|
|
|
|||
|
|
@ -11,12 +11,6 @@
|
|||
<type>text</type>
|
||||
<help>Choose a name for this CPU affinity rule.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>cpu.process_id</id>
|
||||
<label>Process ID</label>
|
||||
<type>dropdown</type>
|
||||
<help>Process ID that should bind to a specific CPU set. Any process IDs above nbproc are ignored.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>cpu.thread_id</id>
|
||||
<label>Thread ID</label>
|
||||
|
|
|
|||
|
|
@ -10,13 +10,6 @@
|
|||
<help><![CDATA[Enable or disable HAProxy running as user root. Enabling this option is strongly discouraged.<br/><div class="text-info"><b>NOTE:</b> Running as user root could be a security issue but it may be required by some features.</div>]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>haproxy.general.tuning.nbproc</id>
|
||||
<label>HAProxy processes (DEPRECATED)</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Number of HAProxy processes to start.<br/><div class="text-info"><b>WARNING:</b> This option is deprecated and will be removed in a future version of HAProxy, threads should be used instead.</div>]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>haproxy.general.tuning.nbthread</id>
|
||||
<label>HAProxy threads</label>
|
||||
|
|
|
|||
|
|
@ -72,13 +72,6 @@
|
|||
<ValidationMessage>Please specify a value between 0 and 10000000.</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</maxConnections>
|
||||
<nbproc type="IntegerField">
|
||||
<default>1</default>
|
||||
<MinimumValue>1</MinimumValue>
|
||||
<MaximumValue>128</MaximumValue>
|
||||
<ValidationMessage>Please specify a value between 1 and 128.</ValidationMessage>
|
||||
<Required>Y</Required>
|
||||
</nbproc>
|
||||
<nbthread type="IntegerField">
|
||||
<default>1</default>
|
||||
<MinimumValue>1</MinimumValue>
|
||||
|
|
@ -2712,77 +2705,6 @@
|
|||
<ValidationMessage>Should be a string between 1 and 255 characters.</ValidationMessage>
|
||||
<Required>Y</Required>
|
||||
</name>
|
||||
<process_id type="OptionField">
|
||||
<Required>Y</Required>
|
||||
<OptionValues>
|
||||
<all>All HAProxy processes</all>
|
||||
<odd>Processes with odd ID</odd>
|
||||
<even>Processes with even ID</even>
|
||||
<x1>Process 1</x1>
|
||||
<x2>Process 2</x2>
|
||||
<x3>Process 3</x3>
|
||||
<x4>Process 4</x4>
|
||||
<x5>Process 5</x5>
|
||||
<x6>Process 6</x6>
|
||||
<x7>Process 7</x7>
|
||||
<x8>Process 8</x8>
|
||||
<x9>Process 9</x9>
|
||||
<x10>Process 10</x10>
|
||||
<x11>Process 11</x11>
|
||||
<x12>Process 12</x12>
|
||||
<x13>Process 13</x13>
|
||||
<x14>Process 14</x14>
|
||||
<x15>Process 15</x15>
|
||||
<x16>Process 16</x16>
|
||||
<x17>Process 17</x17>
|
||||
<x18>Process 18</x18>
|
||||
<x19>Process 19</x19>
|
||||
<x20>Process 20</x20>
|
||||
<x21>Process 21</x21>
|
||||
<x22>Process 22</x22>
|
||||
<x23>Process 23</x23>
|
||||
<x24>Process 24</x24>
|
||||
<x25>Process 25</x25>
|
||||
<x26>Process 26</x26>
|
||||
<x27>Process 27</x27>
|
||||
<x28>Process 28</x28>
|
||||
<x29>Process 29</x29>
|
||||
<x30>Process 30</x30>
|
||||
<x31>Process 31</x31>
|
||||
<x32>Process 32</x32>
|
||||
<x33>Process 33</x33>
|
||||
<x34>Process 34</x34>
|
||||
<x35>Process 35</x35>
|
||||
<x36>Process 36</x36>
|
||||
<x37>Process 37</x37>
|
||||
<x38>Process 38</x38>
|
||||
<x39>Process 39</x39>
|
||||
<x40>Process 40</x40>
|
||||
<x41>Process 41</x41>
|
||||
<x42>Process 42</x42>
|
||||
<x43>Process 43</x43>
|
||||
<x44>Process 44</x44>
|
||||
<x45>Process 45</x45>
|
||||
<x46>Process 46</x46>
|
||||
<x47>Process 47</x47>
|
||||
<x48>Process 48</x48>
|
||||
<x49>Process 49</x49>
|
||||
<x50>Process 50</x50>
|
||||
<x51>Process 51</x51>
|
||||
<x52>Process 52</x52>
|
||||
<x53>Process 53</x53>
|
||||
<x54>Process 54</x54>
|
||||
<x55>Process 55</x55>
|
||||
<x56>Process 56</x56>
|
||||
<x57>Process 57</x57>
|
||||
<x58>Process 58</x58>
|
||||
<x59>Process 59</x59>
|
||||
<x60>Process 60</x60>
|
||||
<x61>Process 61</x61>
|
||||
<x62>Process 62</x62>
|
||||
<x63>Process 63</x63>
|
||||
</OptionValues>
|
||||
</process_id>
|
||||
<thread_id type="OptionField">
|
||||
<Required>Y</Required>
|
||||
<OptionValues>
|
||||
|
|
|
|||
|
|
@ -1131,7 +1131,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
<th data-column-id="cpuid" data-type="number" data-visible="false">{{ lang._('CPU Rule ID') }}</th>
|
||||
<th data-column-id="enabled" data-width="6em" data-type="string" data-formatter="rowtoggle">{{ lang._('Enabled') }}</th>
|
||||
<th data-column-id="name" data-type="string">{{ lang._('Name') }}</th>
|
||||
<th data-column-id="process_id" data-type="string">{{ lang._('Process ID') }}</th>
|
||||
<th data-column-id="thread_id" data-type="string">{{ lang._('Thread ID') }}</th>
|
||||
<th data-column-id="cpu_id" data-type="string">{{ lang._('CPU ID') }}</th>
|
||||
<th data-column-id="commands" data-width="7em" data-formatter="commands" data-sortable="false">{{ lang._('Commands') }}</th>
|
||||
|
|
|
|||
|
|
@ -960,14 +960,13 @@ global
|
|||
{% else %}
|
||||
stats socket /var/run/haproxy.socket group proxy mode 775 level admin
|
||||
{% endif %}
|
||||
nbproc {{OPNsense.HAProxy.general.tuning.nbproc}}
|
||||
{% if OPNsense.HAProxy.general.tuning.nbthread|default('') != '' %}
|
||||
nbthread {{OPNsense.HAProxy.general.tuning.nbthread}}
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.HAProxy.cpus.cpu') %}
|
||||
{% for cpu_map in helpers.toList('OPNsense.HAProxy.cpus.cpu') %}
|
||||
{% if cpu_map.enabled == '1' %}
|
||||
cpu-map {{cpu_map.process_id|replace('x', '')}}/{{cpu_map.thread_id|replace('x', '')}} {{cpu_map.cpu_id|replace('x', '')|replace(',', ' ')}}
|
||||
cpu-map 1/{{cpu_map.thread_id|replace('x', '')}} {{cpu_map.cpu_id|replace('x', '')|replace(',', ' ')}}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
|
@ -1372,20 +1371,14 @@ frontend {{frontend.name}}
|
|||
{% do adv_options.append('proto h2') %}
|
||||
{% endif %}
|
||||
{# # CPU affinity configuration #}
|
||||
{% set bind_process = [] %}
|
||||
{% if frontend.linkedCpuAffinityRules|default('') != '' %}
|
||||
{% for cpu_map in frontend.linkedCpuAffinityRules.split(',') %}
|
||||
{% set cpu_map_data = helpers.getUUID(cpu_map) %}
|
||||
{% if cpu_map_data.enabled == '1' %}
|
||||
{# # Limit visibility to a certain set of processes #}
|
||||
{% do bind_process.append(cpu_map_data.process_id|replace('x', '')) %}
|
||||
{# # Restrict the list of processes/threads on which this listener is allowed to run #}
|
||||
{% do adv_options.append('process ' ~ cpu_map_data.process_id|replace('x', '') ~ '/' ~ cpu_map_data.thread_id|replace('x', '')) %}
|
||||
{# # Restrict the list of threads on which this listener is allowed to run #}
|
||||
{% do adv_options.append('process ' ~ '1/' ~ cpu_map_data.thread_id|replace('x', '')) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if bind_process|length > 0 %}
|
||||
bind-process {{bind_process|join(' ')}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# # bind/listen configuration #}
|
||||
{% if frontend.bind|default("") != "" %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue