Merge pull request #129 from FHE3/linux-system-elevator
Add elevator parameter to GRUB_CMDLINE_LINUX_DEFAULT
diff --git a/README.rst b/README.rst
index cafb41c..b90c0f5 100644
--- a/README.rst
+++ b/README.rst
@@ -1437,7 +1437,7 @@
mount: ${linux:storage:mount:data}
Create partitions on disk. Specify size in MB. It expects empty
-disk without any existing partitions.
+disk without any existing partitions. (set startsector=1, if you want to start partitions from 2048)
.. code-block:: yaml
@@ -1445,6 +1445,7 @@
storage:
disk:
first_drive:
+ startsector: 1
name: /dev/loop1
type: gpt
partitions:
diff --git a/linux/meta/fluentd.yml b/linux/meta/fluentd.yml
index c2e5b77..6b4041c 100644
--- a/linux/meta/fluentd.yml
+++ b/linux/meta/fluentd.yml
@@ -1,41 +1,47 @@
-config:
- label:
- systemd:
- input:
- systemd:
- type: systemd
- tag: systemd.source
- path: /run/log/journal
- pos_file: /var/log/td-agent/tmp/systemd.source.pos
- entry:
- field_map:
- MESSAGE: 'Payload'
- _CMDLINE: 'process'
- _PID: 'Pid'
- _COMM: 'programname'
- _SYSTEMD_UNIT: 'service'
- syslog_identifier: 'ident'
- priority: 'Severity'
- field_map_strict: True
- fields_strip_underscores: True
- fields_lowercase: True
- filter:
- add_severity_label:
- tag: systemd.source
- type: record_transformer
- enable_ruby: true
- record:
- - name: severity_label
- value: '${ {"TRACE"=>8,"DEBUG"=>7,"INFO"=>6,"NOTICE"=>5,"WARNING"=>4,"ERROR"=>3,"CRITICAL"=>2,"ALERT"=>1,"EMERGENCY"=>0}.key(record["Severity"].to_i) }'
- match:
- rewrite_tag:
- tag: systemd.source
- type: rewrite_tag_filter
- rule:
- - name: service
- regexp: '^(.*)\.(.*)$'
- result: __TAG__.$1
- push_to_default:
- tag: 'systemd.source.*'
- type: relabel
- label: default_output
+{%- if grains.get('init') == 'systemd' %}
+agent:
+ plugin:
+ fluent-plugin-systemd:
+ gem: ['fluent-plugin-systemd']
+ config:
+ label:
+ systemd:
+ input:
+ systemd:
+ type: systemd
+ tag: systemd.source
+ path: /run/log/journal
+ pos_file: {{ pillar.fluentd.agent.dir.positiondb }}/systemd.source.pos
+ entry:
+ field_map:
+ MESSAGE: 'Payload'
+ _CMDLINE: 'process'
+ _PID: 'Pid'
+ _COMM: 'programname'
+ _SYSTEMD_UNIT: 'service'
+ syslog_identifier: 'ident'
+ priority: 'Severity'
+ field_map_strict: True
+ fields_strip_underscores: True
+ fields_lowercase: True
+ filter:
+ add_severity_label:
+ tag: systemd.source
+ type: record_transformer
+ enable_ruby: true
+ record:
+ - name: severity_label
+ value: '${ {"TRACE"=>8,"DEBUG"=>7,"INFO"=>6,"NOTICE"=>5,"WARNING"=>4,"ERROR"=>3,"CRITICAL"=>2,"ALERT"=>1,"EMERGENCY"=>0}.key(record["Severity"].to_i) }'
+ match:
+ rewrite_tag:
+ tag: systemd.source
+ type: rewrite_tag_filter
+ rule:
+ - name: service
+ regexp: '^(.*)\.(.*)$'
+ result: __TAG__.$1
+ push_to_default:
+ tag: 'systemd.source.*'
+ type: relabel
+ label: default_output
+{%- endif %}
diff --git a/linux/meta/salt.yml b/linux/meta/salt.yml
index 9ca9ee9..20c9be9 100644
--- a/linux/meta/salt.yml
+++ b/linux/meta/salt.yml
@@ -12,9 +12,12 @@
{%- for service_name, service in pillar.items() %}
{%- if service.get('_support', {}).get('sphinx', {}).get('enabled', False) %}
{%- set grains_fragment_file = service_name+'/meta/sphinx.yml' %}
- {%- macro load_grains_file() %}{% include grains_fragment_file %}{% endmacro %}
- {%- set grains_yaml = load_grains_file()|load_yaml %}
- {%- do service_grains.sphinx.doc.update({ service_name: grains_yaml.doc }) %}
+ {%- macro load_grains_file() %}{% include grains_fragment_file ignore missing %}{% endmacro %}
+ {%- set grains = load_grains_file()|load_yaml %}
+ {%- if grains %}
+ {%- set grains_yaml = load_grains_file()|load_yaml %}
+ {%- do service_grains.sphinx.doc.update({ service_name: grains_yaml.doc }) %}
+ {%- endif %}
{%- endif %}
{%- endfor %}
{{ service_grains|yaml(False)|indent(4) }}
diff --git a/linux/network/dpdk.sls b/linux/network/dpdk.sls
index 751941c..1ac9e25 100644
--- a/linux/network/dpdk.sls
+++ b/linux/network/dpdk.sls
@@ -55,6 +55,10 @@
]
%}
+{%- if network.openvswitch.get('vhost_socket_dir',{}).get('path') %}
+{%- do ovs_options.append("vhost-sock-dir=\""+network.openvswitch.vhost_socket_dir.path+"\"") %}
+{%- endif %}
+
{%- for option in ovs_options %}
linux_network_dpdk_ovs_option_{{ option }}:
diff --git a/linux/storage/disk.sls b/linux/storage/disk.sls
index 4fc96e5..f6c70c5 100644
--- a/linux/storage/disk.sls
+++ b/linux/storage/disk.sls
@@ -20,6 +20,9 @@
- pkg: parted
{% set end_size = 0 -%}
+{% if disk.get('startsector', None) %}
+{% set end_size = disk.get('startsector')|int %}
+{% endif %}
{%- for partition in disk.get('partitions', []) %}
diff --git a/linux/system/apt.sls b/linux/system/apt.sls
index 938bc8b..dca8135 100644
--- a/linux/system/apt.sls
+++ b/linux/system/apt.sls
@@ -9,9 +9,9 @@
{%- for key, config in system.apt.get('config', {}).iteritems() %}
-linux_apt_conf_{{ key }}
+linux_apt_conf_{{ key }}:
file.managed:
- - name: /etc/apt/apt.conf.d/99{{ key }}-salt:
+ - name: /etc/apt/apt.conf.d/99{{ key }}-salt
- template: jinja
- source: salt://linux/files/apt.conf
- defaults:
diff --git a/tests/pillar/network_openvswitch_dpdk.sls b/tests/pillar/network_openvswitch_dpdk.sls
index fa96cb9..d4e6785 100644
--- a/tests/pillar/network_openvswitch_dpdk.sls
+++ b/tests/pillar/network_openvswitch_dpdk.sls
@@ -16,6 +16,9 @@
dpdk_socket_mem: "1024"
dpdk_lcore_mask: "0x400"
memory_channels: "2"
+ vhost_socket_dir:
+ name: "openvswitch-vhost"
+ path: "/run/openvswitch-vhost"
interface:
dpdk0:
name: enp5s0f1