From 42c31731ec623073c3e8099bd4cf15ff9efae985 Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Fri, 14 Jun 2024 11:46:05 +0200 Subject: [PATCH 01/14] Adding nfs storage network support --- playbooks/install_stack.yaml | 2 +- playbooks/network.yaml | 7 ++++++ playbooks/prepare_stack.yaml | 16 +++++++++++++ .../templates/dev-install_net_config.yaml.j2 | 23 +++++++++++++++++++ ...standalone_parameters.ceph_ansible.yaml.j2 | 2 +- .../templates/standalone_parameters.yaml.j2 | 4 ++-- playbooks/vars/defaults.yaml | 9 +++++++- 7 files changed, 58 insertions(+), 5 deletions(-) diff --git a/playbooks/install_stack.yaml b/playbooks/install_stack.yaml index 636ab20..493b4fa 100644 --- a/playbooks/install_stack.yaml +++ b/playbooks/install_stack.yaml @@ -280,7 +280,7 @@ block: - name: Set fact for base_bridge_mappings when DPDK is disabled ansible.builtin.set_fact: - base_bridge_mappings: "external:br-ex,hostonly:br-hostonly" + base_bridge_mappings: "external:br-ex,hostonly:br-hostonly,hostonly-nfs:br-hostonly-nfs" when: - dpdk_interface is not defined - name: Set fact for base_bridge_mappings when DPDK is enabled diff --git a/playbooks/network.yaml b/playbooks/network.yaml index b842135..b586c1f 100644 --- a/playbooks/network.yaml +++ b/playbooks/network.yaml @@ -50,6 +50,13 @@ enabled: false ipv6: enabled: false + - name: dummy2 + type: dummy + state: up + ipv4: + enabled: false + ipv6: + enabled: false - name: Define dummy interfaces to be created when using DPDK when: diff --git a/playbooks/prepare_stack.yaml b/playbooks/prepare_stack.yaml index e5a05e4..f66e43a 100644 --- a/playbooks/prepare_stack.yaml +++ b/playbooks/prepare_stack.yaml @@ -153,6 +153,22 @@ fi environment: OS_CLOUD: standalone + + - name: Create hostonly nfs network # noqa no-changed-when + when: manila_enabled + ansible.builtin.shell: | + if ! openstack network show hostonly-nfs; then + openstack network create --project openshift --share --external --provider-physical-network hostonly-nfs --provider-network-type flat hostonly-nfs + fi + if ! openstack subnet show hostonly-nfs-subnet; then + openstack subnet create --project openshift hostonly-nfs-subnet --subnet-range "{{ hostonly_nfs_cidr }}" \ + --dhcp --gateway "{{ hostonly_nfs_gateway }}" \ + --dns-nameserver "{{ network_info.dns | first }}" \ + --allocation-pool "start={{ hostonly_nfs_fip_pool_start }},end={{ hostonly_nfs_fip_pool_end }}" \ + --network hostonly-nfs + fi + environment: + OS_CLOUD: standalone - name: Create basic security group which allows SSH # noqa no-changed-when ansible.builtin.shell: | diff --git a/playbooks/templates/dev-install_net_config.yaml.j2 b/playbooks/templates/dev-install_net_config.yaml.j2 index dbddb3e..786619b 100644 --- a/playbooks/templates/dev-install_net_config.yaml.j2 +++ b/playbooks/templates/dev-install_net_config.yaml.j2 @@ -64,6 +64,29 @@ network_config: name: dummy1 nm_controlled: true mtu: {{ dcn_az is defined | ternary(hostonly_mtu, public_mtu) }} +- type: ovs_bridge + name: br-hostonly-nfs + use_dhcp: false + ovs_extra: + - br-set-external-id br-hostonly-nfs bridge-id br-hostonly-nfs + addresses: + - ip_netmask: {{ hostonly_nfs_gateway }}/32 + routes: + - destination: {{ hostonly_nfs_cidr }} + nexthop: {{ hostonly_nfs_gateway }} + members: +{% for ip in tunnel_remote_ips %} + - type: ovs_tunnel + name: "tun-hostonly-nfs-{{ ip | to_uuid }}" + tunnel_type: vxlan + ovs_options: + - remote_ip={{ ip }} + - key=102 +{% endfor %} + - type: interface + name: dummy2 + nm_controlled: true + mtu: {{ dcn_az is defined | ternary(hostonly_mtu, public_mtu) }} {% if sriov_interface is defined %} - type: sriov_pf name: {{ sriov_interface }} diff --git a/playbooks/templates/standalone_parameters.ceph_ansible.yaml.j2 b/playbooks/templates/standalone_parameters.ceph_ansible.yaml.j2 index f753718..dae118f 100644 --- a/playbooks/templates/standalone_parameters.ceph_ansible.yaml.j2 +++ b/playbooks/templates/standalone_parameters.ceph_ansible.yaml.j2 @@ -26,5 +26,5 @@ cluster_network: {{ control_plane_cidr }} public_network: {{ control_plane_cidr }} {% if manila_enabled %} - ceph_nfs_bind_addr: "{{ public_api }}" + ceph_nfs_bind_addr: "{{ hostonly_nfs_ganesha }}" {% endif %} diff --git a/playbooks/templates/standalone_parameters.yaml.j2 b/playbooks/templates/standalone_parameters.yaml.j2 index 0cbbd55..fb89d7f 100644 --- a/playbooks/templates/standalone_parameters.yaml.j2 +++ b/playbooks/templates/standalone_parameters.yaml.j2 @@ -183,9 +183,9 @@ parameter_defaults: oslo_messaging_rpc_use_ssl: false {% endif %} {% if manila_enabled %} - ganesha_vip: "{{ public_api }}" + ganesha_vip: "{{ hostonly_nfs_ganesha }}" # for cephadm support on OSP 17 - tripleo_cephadm_ceph_nfs_bind_addr: "{{ public_api }}" + tripleo_cephadm_ceph_nfs_bind_addr: "{{ hostonly_nfs_ganesha }}" {% endif %} {% if standalone_extra_config|length > 0 %} {% for key, value in standalone_extra_config.items() %} diff --git a/playbooks/vars/defaults.yaml b/playbooks/vars/defaults.yaml index d89a97c..e787936 100644 --- a/playbooks/vars/defaults.yaml +++ b/playbooks/vars/defaults.yaml @@ -80,6 +80,13 @@ hostonly_sriov_prefix: "{{ hostonly_sriov_cidr | ansible.utils.ipaddr('prefix') hostonly_sriov_fip_pool_start: "{{ hostonly_sriov_cidr | nthhost(2) }}" hostonly_sriov_fip_pool_end: "{{ hostonly_sriov_cidr | nthhost(-2) }}" +hostonly_nfs_cidr: 192.168.27.0/24 +hostonly_nfs_gateway: "{{ hostonly_nfs_cidr | nthhost(1) }}" +hostonly_nfs_prefix: "{{ hostonly_nfs_cidr | ansible.utils.ipaddr('prefix') }}" +hostonly_nfs_fip_pool_start: "{{ hostonly_nfs_cidr | nthhost(3) }}" +hostonly_nfs_fip_pool_end: "{{ hostonly_nfs_cidr | nthhost(-2) }}" +hostonly_nfs_ganesha: "{{ hostonly_nfs_cidr | nthhost(2) }}" + # Configuration used only by prepare_stack_testconfig, which is not run by # default. testconfig_private_cidr: 192.168.100.0/24 @@ -121,7 +128,7 @@ low_memory_usage: false # This param can be overriden, but only when overriding the network_config, otherwise the default # should work as is: # neutron_bridge_mappings: -neutron_flat_networks: "external,hostonly,hostonly-sriov" +neutron_flat_networks: "external,hostonly,hostonly-sriov,hostonly-nfs" # If we have more than one SR-IOV device, it can be useful to override this one, but the default is safe # if we only use `sriov_interface` for one device. From 39c171faae0bf3af495df76187b3be0aece04ae2 Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Fri, 14 Jun 2024 12:19:35 +0200 Subject: [PATCH 02/14] Change the ganesha_vip by hostonly_nfs_gateway --- .../templates/standalone_parameters.ceph_ansible.yaml.j2 | 2 +- playbooks/templates/standalone_parameters.yaml.j2 | 4 ++-- playbooks/vars/defaults.yaml | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/playbooks/templates/standalone_parameters.ceph_ansible.yaml.j2 b/playbooks/templates/standalone_parameters.ceph_ansible.yaml.j2 index dae118f..cd1f077 100644 --- a/playbooks/templates/standalone_parameters.ceph_ansible.yaml.j2 +++ b/playbooks/templates/standalone_parameters.ceph_ansible.yaml.j2 @@ -26,5 +26,5 @@ cluster_network: {{ control_plane_cidr }} public_network: {{ control_plane_cidr }} {% if manila_enabled %} - ceph_nfs_bind_addr: "{{ hostonly_nfs_ganesha }}" + ceph_nfs_bind_addr: "{{ hostonly_nfs_gateway }}" {% endif %} diff --git a/playbooks/templates/standalone_parameters.yaml.j2 b/playbooks/templates/standalone_parameters.yaml.j2 index fb89d7f..7b2ee9e 100644 --- a/playbooks/templates/standalone_parameters.yaml.j2 +++ b/playbooks/templates/standalone_parameters.yaml.j2 @@ -183,9 +183,9 @@ parameter_defaults: oslo_messaging_rpc_use_ssl: false {% endif %} {% if manila_enabled %} - ganesha_vip: "{{ hostonly_nfs_ganesha }}" + ganesha_vip: "{{ hostonly_nfs_gateway }}" # for cephadm support on OSP 17 - tripleo_cephadm_ceph_nfs_bind_addr: "{{ hostonly_nfs_ganesha }}" + tripleo_cephadm_ceph_nfs_bind_addr: "{{ hostonly_nfs_gateway }}" {% endif %} {% if standalone_extra_config|length > 0 %} {% for key, value in standalone_extra_config.items() %} diff --git a/playbooks/vars/defaults.yaml b/playbooks/vars/defaults.yaml index e787936..48c5b4f 100644 --- a/playbooks/vars/defaults.yaml +++ b/playbooks/vars/defaults.yaml @@ -83,9 +83,8 @@ hostonly_sriov_fip_pool_end: "{{ hostonly_sriov_cidr | nthhost(-2) }}" hostonly_nfs_cidr: 192.168.27.0/24 hostonly_nfs_gateway: "{{ hostonly_nfs_cidr | nthhost(1) }}" hostonly_nfs_prefix: "{{ hostonly_nfs_cidr | ansible.utils.ipaddr('prefix') }}" -hostonly_nfs_fip_pool_start: "{{ hostonly_nfs_cidr | nthhost(3) }}" +hostonly_nfs_fip_pool_start: "{{ hostonly_nfs_cidr | nthhost(2) }}" hostonly_nfs_fip_pool_end: "{{ hostonly_nfs_cidr | nthhost(-2) }}" -hostonly_nfs_ganesha: "{{ hostonly_nfs_cidr | nthhost(2) }}" # Configuration used only by prepare_stack_testconfig, which is not run by # default. From c5e1d995051a0e3d56bfa6b73996595132633231 Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Wed, 19 Jun 2024 14:53:22 +0200 Subject: [PATCH 03/14] Create the StorageNFS Network using the datacentre interface --- playbooks/install_stack.yaml | 2 +- playbooks/prepare_stack.yaml | 12 +++++----- .../templates/dev-install_net_config.yaml.j2 | 23 ------------------- ...standalone_parameters.ceph_ansible.yaml.j2 | 2 +- .../templates/standalone_parameters.yaml.j2 | 4 ++-- playbooks/vars/defaults.yaml | 6 ++--- 6 files changed, 13 insertions(+), 36 deletions(-) diff --git a/playbooks/install_stack.yaml b/playbooks/install_stack.yaml index 493b4fa..636ab20 100644 --- a/playbooks/install_stack.yaml +++ b/playbooks/install_stack.yaml @@ -280,7 +280,7 @@ block: - name: Set fact for base_bridge_mappings when DPDK is disabled ansible.builtin.set_fact: - base_bridge_mappings: "external:br-ex,hostonly:br-hostonly,hostonly-nfs:br-hostonly-nfs" + base_bridge_mappings: "external:br-ex,hostonly:br-hostonly" when: - dpdk_interface is not defined - name: Set fact for base_bridge_mappings when DPDK is enabled diff --git a/playbooks/prepare_stack.yaml b/playbooks/prepare_stack.yaml index f66e43a..d731210 100644 --- a/playbooks/prepare_stack.yaml +++ b/playbooks/prepare_stack.yaml @@ -157,15 +157,15 @@ - name: Create hostonly nfs network # noqa no-changed-when when: manila_enabled ansible.builtin.shell: | - if ! openstack network show hostonly-nfs; then - openstack network create --project openshift --share --external --provider-physical-network hostonly-nfs --provider-network-type flat hostonly-nfs + if ! openstack network show StorageNFS; then + openstack network create StorageNFS --share --provider-network-type vlan --provider-physical-network datacentre --provider-segment 70 fi - if ! openstack subnet show hostonly-nfs-subnet; then - openstack subnet create --project openshift hostonly-nfs-subnet --subnet-range "{{ hostonly_nfs_cidr }}" \ - --dhcp --gateway "{{ hostonly_nfs_gateway }}" \ + if ! openstack subnet show StorageNFSSubnet; then + openstack subnet create --project openshift StorageNFSSubnet --subnet-range "{{ hostonly_nfs_cidr }}" \ + --dhcp --gateway none \ --dns-nameserver "{{ network_info.dns | first }}" \ --allocation-pool "start={{ hostonly_nfs_fip_pool_start }},end={{ hostonly_nfs_fip_pool_end }}" \ - --network hostonly-nfs + --network StorageNFS fi environment: OS_CLOUD: standalone diff --git a/playbooks/templates/dev-install_net_config.yaml.j2 b/playbooks/templates/dev-install_net_config.yaml.j2 index 786619b..dbddb3e 100644 --- a/playbooks/templates/dev-install_net_config.yaml.j2 +++ b/playbooks/templates/dev-install_net_config.yaml.j2 @@ -64,29 +64,6 @@ network_config: name: dummy1 nm_controlled: true mtu: {{ dcn_az is defined | ternary(hostonly_mtu, public_mtu) }} -- type: ovs_bridge - name: br-hostonly-nfs - use_dhcp: false - ovs_extra: - - br-set-external-id br-hostonly-nfs bridge-id br-hostonly-nfs - addresses: - - ip_netmask: {{ hostonly_nfs_gateway }}/32 - routes: - - destination: {{ hostonly_nfs_cidr }} - nexthop: {{ hostonly_nfs_gateway }} - members: -{% for ip in tunnel_remote_ips %} - - type: ovs_tunnel - name: "tun-hostonly-nfs-{{ ip | to_uuid }}" - tunnel_type: vxlan - ovs_options: - - remote_ip={{ ip }} - - key=102 -{% endfor %} - - type: interface - name: dummy2 - nm_controlled: true - mtu: {{ dcn_az is defined | ternary(hostonly_mtu, public_mtu) }} {% if sriov_interface is defined %} - type: sriov_pf name: {{ sriov_interface }} diff --git a/playbooks/templates/standalone_parameters.ceph_ansible.yaml.j2 b/playbooks/templates/standalone_parameters.ceph_ansible.yaml.j2 index cd1f077..dae118f 100644 --- a/playbooks/templates/standalone_parameters.ceph_ansible.yaml.j2 +++ b/playbooks/templates/standalone_parameters.ceph_ansible.yaml.j2 @@ -26,5 +26,5 @@ cluster_network: {{ control_plane_cidr }} public_network: {{ control_plane_cidr }} {% if manila_enabled %} - ceph_nfs_bind_addr: "{{ hostonly_nfs_gateway }}" + ceph_nfs_bind_addr: "{{ hostonly_nfs_ganesha }}" {% endif %} diff --git a/playbooks/templates/standalone_parameters.yaml.j2 b/playbooks/templates/standalone_parameters.yaml.j2 index 7b2ee9e..fb89d7f 100644 --- a/playbooks/templates/standalone_parameters.yaml.j2 +++ b/playbooks/templates/standalone_parameters.yaml.j2 @@ -183,9 +183,9 @@ parameter_defaults: oslo_messaging_rpc_use_ssl: false {% endif %} {% if manila_enabled %} - ganesha_vip: "{{ hostonly_nfs_gateway }}" + ganesha_vip: "{{ hostonly_nfs_ganesha }}" # for cephadm support on OSP 17 - tripleo_cephadm_ceph_nfs_bind_addr: "{{ hostonly_nfs_gateway }}" + tripleo_cephadm_ceph_nfs_bind_addr: "{{ hostonly_nfs_ganesha }}" {% endif %} {% if standalone_extra_config|length > 0 %} {% for key, value in standalone_extra_config.items() %} diff --git a/playbooks/vars/defaults.yaml b/playbooks/vars/defaults.yaml index 48c5b4f..19fb841 100644 --- a/playbooks/vars/defaults.yaml +++ b/playbooks/vars/defaults.yaml @@ -80,10 +80,10 @@ hostonly_sriov_prefix: "{{ hostonly_sriov_cidr | ansible.utils.ipaddr('prefix') hostonly_sriov_fip_pool_start: "{{ hostonly_sriov_cidr | nthhost(2) }}" hostonly_sriov_fip_pool_end: "{{ hostonly_sriov_cidr | nthhost(-2) }}" -hostonly_nfs_cidr: 192.168.27.0/24 -hostonly_nfs_gateway: "{{ hostonly_nfs_cidr | nthhost(1) }}" +hostonly_nfs_cidr: 172.17.0.0/24 +hostonly_nfs_ganesha: "{{ hostonly_nfs_cidr | nthhost(129) }}" hostonly_nfs_prefix: "{{ hostonly_nfs_cidr | ansible.utils.ipaddr('prefix') }}" -hostonly_nfs_fip_pool_start: "{{ hostonly_nfs_cidr | nthhost(2) }}" +hostonly_nfs_fip_pool_start: "{{ hostonly_nfs_cidr | nthhost(150) }}" hostonly_nfs_fip_pool_end: "{{ hostonly_nfs_cidr | nthhost(-2) }}" # Configuration used only by prepare_stack_testconfig, which is not run by From 2bccf4713dc9bbb7b42bc54539148dab2c20a7f5 Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Wed, 19 Jun 2024 14:57:38 +0200 Subject: [PATCH 04/14] Removing the hostonly-nfs network mapping from the neutron_flat_networks --- playbooks/vars/defaults.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/vars/defaults.yaml b/playbooks/vars/defaults.yaml index 19fb841..9e52fbb 100644 --- a/playbooks/vars/defaults.yaml +++ b/playbooks/vars/defaults.yaml @@ -127,7 +127,7 @@ low_memory_usage: false # This param can be overriden, but only when overriding the network_config, otherwise the default # should work as is: # neutron_bridge_mappings: -neutron_flat_networks: "external,hostonly,hostonly-sriov,hostonly-nfs" +neutron_flat_networks: "external,hostonly,hostonly-sriov" # If we have more than one SR-IOV device, it can be useful to override this one, but the default is safe # if we only use `sriov_interface` for one device. From 8daf04058b5afa0b7a33effc7decbe6bf86ebcd4 Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Wed, 19 Jun 2024 15:05:24 +0200 Subject: [PATCH 05/14] dummy2 interface not necessary anymore --- playbooks/network.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/playbooks/network.yaml b/playbooks/network.yaml index b586c1f..b842135 100644 --- a/playbooks/network.yaml +++ b/playbooks/network.yaml @@ -50,13 +50,6 @@ enabled: false ipv6: enabled: false - - name: dummy2 - type: dummy - state: up - ipv4: - enabled: false - ipv6: - enabled: false - name: Define dummy interfaces to be created when using DPDK when: From a033eaec214b03499a97bb4f809b6035a28562ec Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Wed, 26 Jun 2024 11:19:22 +0200 Subject: [PATCH 06/14] Ganesha enable --- playbooks/install_stack.yaml | 2 +- .../roles/ceph/tasks/storage-network.yml | 43 +++++++++++++++++++ .../templates/standalone_parameters.yaml.j2 | 16 ++++++- playbooks/vars/defaults.yaml | 2 +- 4 files changed, 59 insertions(+), 4 deletions(-) diff --git a/playbooks/install_stack.yaml b/playbooks/install_stack.yaml index 636ab20..20c5141 100644 --- a/playbooks/install_stack.yaml +++ b/playbooks/install_stack.yaml @@ -293,7 +293,7 @@ neutron_bridge_mappings: "{{ base_bridge_mappings }}" - name: Create standalone_parameters.yaml - no_log: true + no_log: false ansible.builtin.template: mode: '644' src: standalone_parameters.yaml.j2 diff --git a/playbooks/roles/ceph/tasks/storage-network.yml b/playbooks/roles/ceph/tasks/storage-network.yml index a82ddb3..e2b1dc2 100644 --- a/playbooks/roles/ceph/tasks/storage-network.yml +++ b/playbooks/roles/ceph/tasks/storage-network.yml @@ -14,6 +14,16 @@ storage_subnet: ip_subnet: '{{ ceph_network }}' allocation_pools: [{'start': '{{ start }}', 'end': '{{ end }}'}] + - name: StorageNFS + mtu: 1500 + vlan: 70 + vip: true + name_lower: storage_nfs + service_net_map_replace: storage_nfs + subnets: + storage_subnet: + ip_subnet: '{{ hostonly_nfs_cidr }}' + allocation_pools: [{'start': '{{ hostonly_nfs_fip_pool_start }}', 'end': '{{ hostonly_nfs_fip_pool_end }}'}] - name: Create deployed_network environment file (with VIPs) ansible.builtin.copy: @@ -35,6 +45,10 @@ ip_address: {{ mon_ip }} ip_subnet: {{ dummy_ip_cidr }} ip_address_uri: {{ mon_ip }} + storage_nfs: + ip_address: {{ hostonly_nfs_cidr | nthhost(1) }} + ip_subnet: {{ hostonly_nfs_cidr }} + ip_address_uri: {{ hostonly_nfs_cidr | nthhost(1) }} ControlPlaneVipData: fixed_ips: - ip_address: {{ control_plane_ip }} @@ -49,6 +63,12 @@ ip_address: {{ dummy_vip }} ip_address_uri: {{ dummy_vip }} ip_subnet: {{ dummy_vip ~ '/' ~ control_plane_prefix | string }} + storage_nfs: + ip_address: {{ hostonly_nfs_ganesha }} + ip_address_uri: {{ hostonly_nfs_ganesha }} + ip_subnet: {{ hostonly_nfs_cidr }} + VipSubnetMap: + StorageNFS: storage_nfs_subnet DeployedNetworkEnvironment: net_attributes_map: storage: @@ -69,8 +89,31 @@ host_routes: [] ip_version: 4 name: storage_subnet + storage_nfs: + network: + dns_domain: storagenfs.mydomain.tld. + mtu: 1500 + name: storage_nfs + tags: + - tripleo_network_name=StorageNFS + - tripleo_net_idx=1 + - tripleo_service_net_map_replace=storage_nfs + - tripleo_vip=true + subnets: + storage_nfs_subnet: + cidr: {{ hostonly_nfs_cidr }} + dns_nameservers: [] + gateway_ip: null + host_routes: [] + ip_version: 4 + name: storage_nfs_subnet + tags: + - tripleo_vlan_id=70 net_cidr_map: storage: - {{ ceph_network }} + storage_nfs: + - {{ hostonly_nfs_cidr }} net_ip_version_map: storage: 4 + storage_nfs: 4 diff --git a/playbooks/templates/standalone_parameters.yaml.j2 b/playbooks/templates/standalone_parameters.yaml.j2 index fb89d7f..ac885d3 100644 --- a/playbooks/templates/standalone_parameters.yaml.j2 +++ b/playbooks/templates/standalone_parameters.yaml.j2 @@ -46,6 +46,18 @@ resource_registry: {% endif %} parameter_defaults: CloudName: {{ hostname }}.{{ clouddomain }} + # Enable ganesha + EnableGanesha: true + # Enable StorageNFS network + StorageNFS: true + ServiceNetMap: + GaneshaNetwork: storage_nfs + StorageNFSNetworkVlanID: 70 + # Define network configuration for StorageNFS + StorageNFSNetCidr: {{ hostonly_nfs_cidr }} + StorageNFSAllocationPools: + - start: {{ hostonly_sriov_fip_pool_start }} + - end: {{ hostonly_sriov_fip_pool_end }} ContainerCli: podman Debug: true DeploymentUser: {{ ansible_env.USER }} @@ -183,9 +195,9 @@ parameter_defaults: oslo_messaging_rpc_use_ssl: false {% endif %} {% if manila_enabled %} - ganesha_vip: "{{ hostonly_nfs_ganesha }}" + ganesha_vip: {{ hostonly_nfs_ganesha }} # for cephadm support on OSP 17 - tripleo_cephadm_ceph_nfs_bind_addr: "{{ hostonly_nfs_ganesha }}" + tripleo_cephadm_ceph_nfs_bind_addr: {{ hostonly_nfs_ganesha }} {% endif %} {% if standalone_extra_config|length > 0 %} {% for key, value in standalone_extra_config.items() %} diff --git a/playbooks/vars/defaults.yaml b/playbooks/vars/defaults.yaml index 9e52fbb..03b2dd0 100644 --- a/playbooks/vars/defaults.yaml +++ b/playbooks/vars/defaults.yaml @@ -80,7 +80,7 @@ hostonly_sriov_prefix: "{{ hostonly_sriov_cidr | ansible.utils.ipaddr('prefix') hostonly_sriov_fip_pool_start: "{{ hostonly_sriov_cidr | nthhost(2) }}" hostonly_sriov_fip_pool_end: "{{ hostonly_sriov_cidr | nthhost(-2) }}" -hostonly_nfs_cidr: 172.17.0.0/24 +hostonly_nfs_cidr: 172.17.5.0/24 hostonly_nfs_ganesha: "{{ hostonly_nfs_cidr | nthhost(129) }}" hostonly_nfs_prefix: "{{ hostonly_nfs_cidr | ansible.utils.ipaddr('prefix') }}" hostonly_nfs_fip_pool_start: "{{ hostonly_nfs_cidr | nthhost(150) }}" From 714d41719f579e65fe4dc6c23c8352d15a338b26 Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Wed, 26 Jun 2024 18:32:23 +0200 Subject: [PATCH 07/14] Back to no_log: true in Create standalone_parameters.yaml --- playbooks/install_stack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/install_stack.yaml b/playbooks/install_stack.yaml index 20c5141..636ab20 100644 --- a/playbooks/install_stack.yaml +++ b/playbooks/install_stack.yaml @@ -293,7 +293,7 @@ neutron_bridge_mappings: "{{ base_bridge_mappings }}" - name: Create standalone_parameters.yaml - no_log: false + no_log: true ansible.builtin.template: mode: '644' src: standalone_parameters.yaml.j2 From eedf96aaa7c92effc7ec6a6bc4ad0769fb27de9d Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Wed, 26 Jun 2024 19:00:50 +0200 Subject: [PATCH 08/14] space in L156 prepare_stack.yaml --- playbooks/prepare_stack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare_stack.yaml b/playbooks/prepare_stack.yaml index d731210..3051fe1 100644 --- a/playbooks/prepare_stack.yaml +++ b/playbooks/prepare_stack.yaml @@ -153,7 +153,7 @@ fi environment: OS_CLOUD: standalone - + - name: Create hostonly nfs network # noqa no-changed-when when: manila_enabled ansible.builtin.shell: | From c2f4de4a8cf201891830729207c453ca6c1e21e4 Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Wed, 26 Jun 2024 19:10:33 +0200 Subject: [PATCH 09/14] Trailing spaces --- playbooks/prepare_stack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare_stack.yaml b/playbooks/prepare_stack.yaml index 3051fe1..42b821e 100644 --- a/playbooks/prepare_stack.yaml +++ b/playbooks/prepare_stack.yaml @@ -153,7 +153,7 @@ fi environment: OS_CLOUD: standalone - + - name: Create hostonly nfs network # noqa no-changed-when when: manila_enabled ansible.builtin.shell: | From a58f205a9e1e3a378f53cb6188310e109e8ad83d Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Mon, 1 Jul 2024 09:36:50 +0200 Subject: [PATCH 10/14] Add StorageNFS into Network Data Undercloud --- playbooks/install_stack.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/playbooks/install_stack.yaml b/playbooks/install_stack.yaml index 636ab20..f48daaa 100644 --- a/playbooks/install_stack.yaml +++ b/playbooks/install_stack.yaml @@ -492,6 +492,18 @@ when: - ceph_enabled + - name: Add StorageNFS into Network Data Undercloud + ansible.builtin.blockinfile: + dest: /usr/share/openstack-tripleo-heat-templates/network_data_undercloud.yaml + append_newline: true + prepend_newline: true + block: | + - name: StorageNFS + vip: true + name_lower: storage_nfs + become: true + become_user: root + - name: Run TripleO deploy ansible.builtin.import_role: name: tripleo.operator.tripleo_deploy From 2dcb33cb9f58ae1a17a84d838d89b6b5b62be561 Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Mon, 1 Jul 2024 09:42:50 +0200 Subject: [PATCH 11/14] when: manila_enabled --- playbooks/install_stack.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playbooks/install_stack.yaml b/playbooks/install_stack.yaml index f48daaa..c75b288 100644 --- a/playbooks/install_stack.yaml +++ b/playbooks/install_stack.yaml @@ -475,6 +475,7 @@ mode: '644' become: true become_user: root + when: manila_enabled - name: Block to figure out if --standalone needs to be passed when deploying tripleo when: @@ -492,7 +493,7 @@ when: - ceph_enabled - - name: Add StorageNFS into Network Data Undercloud + - name: Add StorageNFS into Network Data Undercloud ansible.builtin.blockinfile: dest: /usr/share/openstack-tripleo-heat-templates/network_data_undercloud.yaml append_newline: true From 3383b4a15d061df005dc0d8a0c826838217d3c2a Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Mon, 1 Jul 2024 09:53:53 +0200 Subject: [PATCH 12/14] space --- playbooks/install_stack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/install_stack.yaml b/playbooks/install_stack.yaml index c75b288..114fa3f 100644 --- a/playbooks/install_stack.yaml +++ b/playbooks/install_stack.yaml @@ -492,7 +492,7 @@ name: ceph when: - ceph_enabled - + - name: Add StorageNFS into Network Data Undercloud ansible.builtin.blockinfile: dest: /usr/share/openstack-tripleo-heat-templates/network_data_undercloud.yaml From 96eed3a98a9c4a7264a14d2c26f542f8c54b253b Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Mon, 1 Jul 2024 10:56:02 +0200 Subject: [PATCH 13/14] trailing-spaces --- playbooks/install_stack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/install_stack.yaml b/playbooks/install_stack.yaml index 114fa3f..c75b288 100644 --- a/playbooks/install_stack.yaml +++ b/playbooks/install_stack.yaml @@ -492,7 +492,7 @@ name: ceph when: - ceph_enabled - + - name: Add StorageNFS into Network Data Undercloud ansible.builtin.blockinfile: dest: /usr/share/openstack-tripleo-heat-templates/network_data_undercloud.yaml From 36baaf6a9ae5fadd0747032d08d0b6777074aa34 Mon Sep 17 00:00:00 2001 From: Miguel Carpio Date: Tue, 2 Jul 2024 17:02:55 +0200 Subject: [PATCH 14/14] Add StorageNfsVip and StorageNfsIp --- playbooks/install_stack.yaml | 2 +- playbooks/network.yaml | 7 +++++++ playbooks/prepare_stack.yaml | 2 +- .../roles/ceph/tasks/storage-network.yml | 9 +++------ .../templates/dev-install_net_config.yaml.j2 | 20 +++++++++++++++++++ .../templates/standalone_parameters.yaml.j2 | 4 +++- playbooks/vars/defaults.yaml | 2 +- 7 files changed, 36 insertions(+), 10 deletions(-) diff --git a/playbooks/install_stack.yaml b/playbooks/install_stack.yaml index c75b288..4814f06 100644 --- a/playbooks/install_stack.yaml +++ b/playbooks/install_stack.yaml @@ -280,7 +280,7 @@ block: - name: Set fact for base_bridge_mappings when DPDK is disabled ansible.builtin.set_fact: - base_bridge_mappings: "external:br-ex,hostonly:br-hostonly" + base_bridge_mappings: "external:br-ex,hostonly:br-hostonly,storage_nfs:br-storage_nfs" when: - dpdk_interface is not defined - name: Set fact for base_bridge_mappings when DPDK is enabled diff --git a/playbooks/network.yaml b/playbooks/network.yaml index b842135..b586c1f 100644 --- a/playbooks/network.yaml +++ b/playbooks/network.yaml @@ -50,6 +50,13 @@ enabled: false ipv6: enabled: false + - name: dummy2 + type: dummy + state: up + ipv4: + enabled: false + ipv6: + enabled: false - name: Define dummy interfaces to be created when using DPDK when: diff --git a/playbooks/prepare_stack.yaml b/playbooks/prepare_stack.yaml index 42b821e..081bb45 100644 --- a/playbooks/prepare_stack.yaml +++ b/playbooks/prepare_stack.yaml @@ -158,7 +158,7 @@ when: manila_enabled ansible.builtin.shell: | if ! openstack network show StorageNFS; then - openstack network create StorageNFS --share --provider-network-type vlan --provider-physical-network datacentre --provider-segment 70 + openstack network create --project openshift --share --external --provider-physical-network storage_nfs --provider-network-type flat StorageNFS fi if ! openstack subnet show StorageNFSSubnet; then openstack subnet create --project openshift StorageNFSSubnet --subnet-range "{{ hostonly_nfs_cidr }}" \ diff --git a/playbooks/roles/ceph/tasks/storage-network.yml b/playbooks/roles/ceph/tasks/storage-network.yml index e2b1dc2..0d9f429 100644 --- a/playbooks/roles/ceph/tasks/storage-network.yml +++ b/playbooks/roles/ceph/tasks/storage-network.yml @@ -15,8 +15,7 @@ ip_subnet: '{{ ceph_network }}' allocation_pools: [{'start': '{{ start }}', 'end': '{{ end }}'}] - name: StorageNFS - mtu: 1500 - vlan: 70 + mtu: 1350 vip: true name_lower: storage_nfs service_net_map_replace: storage_nfs @@ -92,7 +91,7 @@ storage_nfs: network: dns_domain: storagenfs.mydomain.tld. - mtu: 1500 + mtu: 1350 name: storage_nfs tags: - tripleo_network_name=StorageNFS @@ -106,9 +105,7 @@ gateway_ip: null host_routes: [] ip_version: 4 - name: storage_nfs_subnet - tags: - - tripleo_vlan_id=70 + name: storage_nfs_subnet net_cidr_map: storage: - {{ ceph_network }} diff --git a/playbooks/templates/dev-install_net_config.yaml.j2 b/playbooks/templates/dev-install_net_config.yaml.j2 index dbddb3e..18875a5 100644 --- a/playbooks/templates/dev-install_net_config.yaml.j2 +++ b/playbooks/templates/dev-install_net_config.yaml.j2 @@ -64,6 +64,26 @@ network_config: name: dummy1 nm_controlled: true mtu: {{ dcn_az is defined | ternary(hostonly_mtu, public_mtu) }} +- type: ovs_bridge + name: br-storage_nfs + use_dhcp: false + ovs_extra: + - br-set-external-id br-storage_nfs bridge-id br-storage_nfs + addresses: + - ip_netmask: {{ hostonly_nfs_cidr | nthhost(1) }}/{{ hostonly_nfs_cidr | ansible.utils.ipaddr('prefix') }} + members: +{% for ip in tunnel_remote_ips %} + - type: ovs_tunnel + name: "tun-storage_nfs-{{ ip | to_uuid }}" + tunnel_type: vxlan + ovs_options: + - remote_ip={{ ip }} + - key=102 +{% endfor %} + - type: interface + name: dummy2 + nm_controlled: true + mtu: {{ dcn_az is defined | ternary(hostonly_mtu, public_mtu) }} {% if sriov_interface is defined %} - type: sriov_pf name: {{ sriov_interface }} diff --git a/playbooks/templates/standalone_parameters.yaml.j2 b/playbooks/templates/standalone_parameters.yaml.j2 index ac885d3..81a8dcb 100644 --- a/playbooks/templates/standalone_parameters.yaml.j2 +++ b/playbooks/templates/standalone_parameters.yaml.j2 @@ -52,7 +52,9 @@ parameter_defaults: StorageNFS: true ServiceNetMap: GaneshaNetwork: storage_nfs - StorageNFSNetworkVlanID: 70 + # Define StorageNFSIPs + StorageNfsIp: 172.17.5.1 + StorageNfsVip: 172.17.5.129 # Define network configuration for StorageNFS StorageNFSNetCidr: {{ hostonly_nfs_cidr }} StorageNFSAllocationPools: diff --git a/playbooks/vars/defaults.yaml b/playbooks/vars/defaults.yaml index 03b2dd0..a7a4280 100644 --- a/playbooks/vars/defaults.yaml +++ b/playbooks/vars/defaults.yaml @@ -127,7 +127,7 @@ low_memory_usage: false # This param can be overriden, but only when overriding the network_config, otherwise the default # should work as is: # neutron_bridge_mappings: -neutron_flat_networks: "external,hostonly,hostonly-sriov" +neutron_flat_networks: "external,hostonly,hostonly-sriov,storage_nfs" # If we have more than one SR-IOV device, it can be useful to override this one, but the default is safe # if we only use `sriov_interface` for one device.