From 90761625c3dd5ec2667ef29f0f0608f256af212a Mon Sep 17 00:00:00 2001 From: pavel-z1 <> Date: Thu, 7 Nov 2019 10:41:57 +0200 Subject: [PATCH 1/4] Add posibility to configure IPV6ADDR_SECONDARIES on the RedHat based systems --- README.rst | 27 +++++++++++++++++++++++++++ linux/network/interface.sls | 3 +++ 2 files changed, 30 insertions(+) diff --git a/README.rst b/README.rst index e0f823d4..121679aa 100644 --- a/README.rst +++ b/README.rst @@ -1971,6 +1971,33 @@ DPDK OVS interfaces address: ${_param:tenant_address} netmask: ${_param:tenant_network_netmask} +**Linux Network Interface configuration** + +Configuration of network interface eth0 on RedHad. +Parameter ipv6addrs used to bind ipv6 aliases to the network interface. + +.. code-block:: yaml + + linux: + network: + ... + interface: + eth0: + enabled: true + type: eth + address: 192.168.0.1 + netmask: 255.255.255.0 + gateway: 192.168.0.154 + name_servers: + - 192.168.0.10 + - 192.168.0.11 + ipv6_address: fd8f:a45a:2ed2:d37c::7 + ipv6_netmask: 64 + ipv6_gateway: fd8f:a45a:2ed2:d37c::1 + ipv6addrs: + - fd8f:a45a:2ed2:d37c:ffff:fffe/128 + - fd8f:a45a:2ed2:d37c:ffff:ffff/128 + **DPDK OVS bridge for VXLAN** If VXLAN is used as tenant segmentation, IP address must diff --git a/linux/network/interface.sls b/linux/network/interface.sls index 6e13ae36..48e0b3e0 100644 --- a/linux/network/interface.sls +++ b/linux/network/interface.sls @@ -314,6 +314,9 @@ linux_interface_{{ interface_name }}: - slaves: {{ interface.slaves }} - mode: {{ interface.mode }} {%- endif %} + {%- if interface.ipv6addrs is defined %} + - ipv6addrs: {{ interface.ipv6addrs }} + {%- endif %} {%- if salt['grains.get']('saltversion') < '2017.7' %} From 249691383740000f3dc1f1ea67ef8d1302c9c1d3 Mon Sep 17 00:00:00 2001 From: pavel-z1 <> Date: Fri, 8 Nov 2019 14:07:15 +0200 Subject: [PATCH 2/4] Add option make_fs that will allow to manage making file system for the new mounted device --- linux/storage/mount.sls | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linux/storage/mount.sls b/linux/storage/mount.sls index 26c315ea..45c03752 100644 --- a/linux/storage/mount.sls +++ b/linux/storage/mount.sls @@ -7,6 +7,7 @@ {%- if not mount.file_system in ['nfs', 'nfs4', 'cifs', 'tmpfs'] %} +{%- if mount.make_fs is defined and mount.make_fs %} mkfs_{{ mount.device}}: cmd.run: - name: "mkfs.{{ mount.file_system }} -L {{ name }} {{ mount.device }}" @@ -16,11 +17,14 @@ mkfs_{{ mount.device}}: {%- if mount.file_system == 'xfs' %} - require: - pkg: xfs_packages_{{ mount.device }} + {%- endif %} +{%- endif %} +{%- if mount.file_system == 'xfs' %} xfs_packages_{{ mount.device }}: pkg.installed: - name: xfsprogs - {%- endif %} +{% endif %} {%- endif %} From 8927750809b50289d34146b460c8da55e84be566 Mon Sep 17 00:00:00 2001 From: pavel-z1 <> Date: Fri, 8 Nov 2019 14:08:42 +0200 Subject: [PATCH 3/4] Add option that will allow to not mount device automatically. In case if you need only safe cmmount config to the /etc/fstab --- linux/storage/mount.sls | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/storage/mount.sls b/linux/storage/mount.sls index 45c03752..29c905fe 100644 --- a/linux/storage/mount.sls +++ b/linux/storage/mount.sls @@ -41,6 +41,7 @@ linux_storage_nfs_packages: - fstype: {{ mount.file_system }} - mkmnt: True - opts: {{ mount.get('opts', 'defaults,noatime') }} + - mount: {{ mount.get('mount', 'True') }} {%- if mount.file_system == 'xfs' %} - require: - pkg: xfs_packages_{{ mount.device }} From 22339cb4c1f4796b337f4e6182dda69692865e67 Mon Sep 17 00:00:00 2001 From: pavel-z1 <> Date: Fri, 8 Nov 2019 14:09:32 +0200 Subject: [PATCH 4/4] Add posibility to save mount options to the fstab file --- linux/storage/mount.sls | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/storage/mount.sls b/linux/storage/mount.sls index 29c905fe..482e1b34 100644 --- a/linux/storage/mount.sls +++ b/linux/storage/mount.sls @@ -42,6 +42,7 @@ linux_storage_nfs_packages: - mkmnt: True - opts: {{ mount.get('opts', 'defaults,noatime') }} - mount: {{ mount.get('mount', 'True') }} + - persist: {{ mount.get('save_to_fstab', 'False') }} {%- if mount.file_system == 'xfs' %} - require: - pkg: xfs_packages_{{ mount.device }}