Hi again, I really need your help guys. I tried to use the default bond_vlans.j2 without any modification, and I got the same error :
"logging": "Deploy attempt failed on node computeHCI0 (UUID 1d536020-50d6-43b6-9be4-1e5f60fa27d4), cleaning up\nTraceback (most r ecent call last):\n File \"/usr/lib/python3.6/site-packages/metalsmith/_provisioner.py\", line 392, in provision_node\n nics.vali date()\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 60, in validate\n result.append(('network', self._ge t_network(nic)))\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 128, in _get_network\n 'Unexpected fields for a network: %s' % ', '.join(unexpected))\nmetalsmith.exceptions.InvalidNIC: Unexpected fields for a network: subnet\nDeploy attemp t failed on node computeHCI1 (UUID bf283f08-bef1-4f63-8bcd-d3c518c22e36), cleaning up\nTraceback (most recent call last):\n File \"$ usr/lib/python3.6/site-packages/metalsmith/_provisioner.py\", line 392, in provision_node\n nics.validate()\n File \"/usr/lib/pyt hon3.6/site-packages/metalsmith/_nics.py\", line 60, in validate\n result.append(('network', self._get_network(nic)))\n File \"/u sr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 128, in _get_network\n 'Unexpected fields for a network: %s' % ', '.joi n(unexpected))\nmetalsmith.exceptions.InvalidNIC: Unexpected fields for a network: subnet\nDeploy attempt failed on node controller1 (UUID 8e4eb00b-6c34-4dcd-a9a5-aef3d9ec6c0a), cleaning up\nTraceback (most recent call last):\n File \"/usr/lib/python3.6/site-packag es/metalsmith/_provisioner.py\", line 392, in provision_node\n nics.validate()\n File \"/usr/lib/python3.6/site-packages/metalsmi th/_nics.py\", line 60, in validate\n result.append(('network', self._get_network(nic)))\n File \"/usr/lib/python3.6/site-package s/metalsmith/_nics.py\", line 128, in _get_network\n 'Unexpected fields for a network: %s' % ', '.join(unexpected))\nmetalsmith.ex ceptions.InvalidNIC: Unexpected fields for a network: subnet\nDeploy attempt failed on node computeHCI2 (UUID 0932aeac-e72c-4047-8c6b -c8fff674b0f3), cleaning up\nTraceback (most recent call last):\n File \"/usr/lib/python3.6/site-packages/metalsmith/_provisioner.py \", line 392, in provision_node\n nics.validate()\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 60, in va lidate\n result.append(('network', self._get_network(nic)))\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 128, in _get_network\n 'Unexpected fields for a network: %s' % ', '.join(unexpected))\nmetalsmith.exceptions.InvalidNIC
What am I missing ?????? Regards. Le ven. 27 août 2021 à 23:40, wodel youchi <wodel.youchi@gmail.com> a écrit :
Hi again, I redid my deployment from scratch, I reinstalled my undercloud and prepared the network template. Then I started the baremetal provisioning again, and I get this error:
Deploy attempt failed on node computeHCI0 (UUID
1d536020-50d6-43b6-9be4-1e5f60fa27d4), cleaning up\nTraceback (most recent call last):\n File \"/usr/lib/python3.6/site-pack ages/metalsmith/_provisioner.py\", line 392, in provision_node\n nics.validate()\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 60, in validate\n result.append (('network', self._get_network(nic)))\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 128, in _get_network\n '*Unexpected fields for a network: %s' % '*, '.join(unex pected))\nmetalsmith.exceptions.InvalidNIC: *Unexpected fields for a network: subnet*\nDeploy attempt failed on node computeHCI2 (UUID 0932aeac-e72c-4047-8c6b-c8fff674b0f3), cleaning up\nTrac eback (most recent call last):\n File \"/usr/lib/python3.6/site-packages/metalsmith/_provisioner.py\", line 392, in provision_node\n nics.validate()\n File \"/usr/lib/python3.6/site-pa ckages/metalsmith/_nics.py\", line 60, in validate\n result.append(('network', self._get_network(nic)))\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 128, in _ge t_network\n 'Unexpected fields for a network: %s' % ', '.join(unexpected))\nmetalsmith.exceptions.InvalidNIC: Unexpected fields for a network: subnet\nDeploy attempt failed on node contr oller1 (UUID 8e4eb00b-6c34-4dcd-a9a5-aef3d9ec6c0a), cleaning up\nTraceback (most recent call last):\n File \"/usr/lib/python3.6/site-packages/metalsmith/_provisioner.py\", line 392, in pro vision_node\n nics.validate()\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 60, in validate\n result.append(('network', self._get_network(nic)))\n File \"/us r/lib/python3.6/site-packages/metalsmith/_nics.py\", line 128, in _get_network\n 'Unexpected fields for a network: %s' % ', '.join(unexpected))\nmetalsmith.exceptions.InvalidNIC: Unexpec ted fields for a network: subnet\nDeploy attempt failed on node controller0 (UUID 8f794261-53c1-4516-aa51-11bee6d887e8), cleaning up\nTraceback (most recent call last):\n File \"/usr/lib/p ython3.6/site-packages/metalsmith/_provisioner.py\", line 392, in provision_node\n nics.validate()\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 60, in validate\ n result.append(('network', self._get_network(nic)))\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 128, in _get_network\n 'Unexpected fields for a network: %s ' % ', '.join(unexpected))\nmetalsmith.exceptions.InvalidNIC: Unexpected fields for a network: subnet\nDeploy attempt failed on node controller2 (UUID 32e591a3-d598-43aa-ac05-b646eecef073), cleaning up\nTraceback (most recent call last):\n File \"/usr/lib/python3.6/site-packages/metalsmith/_provisioner.py\", line 392, in provision_node\n nics.validate()\n File \"/usr/lib /python3.6/site-packages/metalsmith/_nics.py\", line 60, in validate\n result.append(('network', self._get_network(nic)))\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\" , line 128, in _get_network\n 'Unexpected fields for a network: %s' % ', '.join(unexpected))\nmetalsmith.exceptions.InvalidNIC: Unexpected fields for a network: subnet\nDeploy attempt fa iled on node computeHCI1 (UUID bf283f08-bef1-4f63-8bcd-d3c518c22e36), cleaning up\nTraceback (most recent call last):\n File \"/usr/lib/python3.6/site-packages/metalsmith/_provisioner.py\" , line 392, in provision_node\n nics.validate()\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 60, in validate\n result.append(('network', self._get_network(ni c)))\n File \"/usr/lib/python3.6/site-packages/metalsmith/_nics.py\", line 128, in _get_network\n 'Unexpected fields for a network: %s' % ', '.join(unexpected))\nmetalsmith.exceptions.I nvalidNIC: Unexpected fields for a network: subnet\n",
"msg": "Unexpected fields for a network: subnet"
Here is my modified bonds_vlan.j2 file
---
{% set mtu_ctlplane_list = [ctlplane_mtu] %} {% set mtu_dataplane_list = [] %} {% for network in role_networks %} {% if network.startswith('Tenant') %} {{ mtu_dataplane_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} {% else %} {{ mtu_ctlplane_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} {%- endif %} {%- endfor %} {% set min_viable_mtu_ctlplane = mtu_ctlplane_list | max %} {% set min_viable_mtu_dataplane = mtu_dataplane_list | max %} network_config: - type: interface name: nic1 mtu: {{ ctlplane_mtu }} use_dhcp: false addresses: - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }} routes: {{ ctlplane_host_routes }} - type: ovs_bridge name: br1str dns_servers: {{ ctlplane_dns_nameservers }} domain: {{ dns_search_domains }} members: - type: ovs_bond name: bond-str mtu: {{ min_viable_mtu_dataplane }} bonding_options: {{ bond_interface_ovs_options }} members: - type: interface name: nic2 mtu: {{ min_viable_mtu_dataplane }} primary: true - type: interface name: nic3 mtu: {{ min_viable_mtu_dataplane }} {% for network in role_networks if network* not in ["External", "Tenant", "InternalApi"] %} * - type: vlan device: bond-str mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} addresses: - ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} {% endfor %} - type: ovs_bridge name: {{ neutron_physical_bridge_name }} dns_servers: {{ ctlplane_dns_nameservers }} members: - type: ovs_bond name: bond-data mtu: {{ min_viable_mtu_dataplane }} bonding_options: {{ bond_interface_ovs_options }} members: - type: interface name: nic4 mtu: {{ min_viable_mtu_dataplane }} primary: true - type: interface name: nic5 mtu: {{ min_viable_mtu_dataplane }} {% for network in role_networks if network *in ["External", "Tenant", "InternalApi"] %}* - type: vlan device: bond-data mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} addresses: - ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} {%- endfor %}
Could someone help me understand where have I made mistakes? In my setup I use 5 nics : - 1 nic for provisioning - nic 2 and 3 : bonded for storage and storage management - nic 4 and 5 : bonded for tenant, api and external
Here is my baremetal file
- name: Controller count: 3 defaults: networks: - network: ctlplane subnet: ctlplane_subnet vif: true - network: external subnet: external_subnet - network: internal_api subnet: internal_api_subnet - network: storage subnet: storage_subnet - network: storage_mgmt subnet: storage_mgmt_subnet - network: tenant subnet: tenant_subnet network_config: template: /home/stack/templates/nic-configs/bonds_vlans.j2 bond_interface_ovs_options: bond_mode=active-backup default_route_network: - external - name: ComputeHCI count: 3 defaults: networks: - network: ctlplane subnet: ctlplane_subnet vif: true - network: external subnet: external_subnet - network: internal_api subnet: internal_api_subnet - network: storage subnet: storage_subnet - network: storage_mgmt subnet: storage_mgmt_subnet - network: tenant subnet: tenant_subnet network_config: template: /home/stack/templates/nic-configs/bonds_vlans.j2 bond_interface_ovs_options: bond_mode=active-backup default_route_network: - external
And here is my network_data file
- name: Storage
name_lower: storage vip: true mtu: 1500 subnets: storage_subnet: ip_subnet: 10.100.8.0/24 allocation_pools: - start: 10.100.8.150 end: 10.100.8.250 vlan: 1108 - name: StorageMgmt name_lower: storage_mgmt vip: true mtu: 1500 subnets: storage_mgmt_subnet: ip_subnet: 10.100.7.0/24 allocation_pools: - start: 10.100.7.150 end: 10.100.7.250 vlan: 1107 - name: InternalApi name_lower: internal_api vip: true mtu: 1500 subnets: internal_api_subnet: ip_subnet: 10.100.5.0/24 allocation_pools: - start: 10.100.5.150 end: 10.100.5.250 vlan: 1105 - name: Tenant vip: false # Tenant network does not use VIPs mtu: 1500 name_lower: tenant subnets: tenant_subnet: ip_subnet: 10.100.6.0/24 allocation_pools: - start: 10.100.6.150 end: 10.100.6.250 vlan: 1106 - name: External name_lower: external vip: true mtu: 1500 subnets: external_subnet: ip_subnet: 10.1.0.0/24 allocation_pools: - start: 10.1.0.10 end: 10.1.0.200 gateway_ip: 10.1.0.1 vlan: 2100
Thanks in advance
Regards.
Le mer. 25 août 2021 à 13:38, wodel youchi <wodel.youchi@gmail.com> a écrit :
Hi and thanks
I disabled the hide variable, and executed the command again, and this is the result :
2021-08-25 13:27:21.834140 | 52540075-9baf-e9c1-3396-0000000000a0 |
FATAL | Render network_config from template | computehci-1 | error={
"changed": false,
* "msg": "AnsibleUndefinedVariable: 'bond_interface_ovs_options' is undefined" *
}
I understand that this is a variable, but I don't see where it is being loaded from. I have a *network-environment-overrides.yaml* file which contains this :
parameter_defaults:
ControllerNetworkConfigTemplate: '/home/stack/templates/nic-configs/bonds_vlans.j2' CephStorageNetworkConfigTemplate: '/home/stack/templates/nic-configs/bonds_vlans.j2' ComputeNetworkConfigTemplate: '/home/stack/templates/nic-configs/bonds_vlans.j2'
NeutronNetworkVLANRanges: 'datacentre:1:100,provider:400:1000' NeutronExternalNetworkBridge: "''" NeutronNetworkType: 'vlan,flat' *BondInterfaceOvsOptions: "bond_mode=active-backup"*
But I don't see how to connect them?
Regards.
Le mer. 25 août 2021 à 09:08, Harald Jensas <hjensas@redhat.com> a écrit :
On 8/24/21 7:07 PM, wodel youchi wrote:
*2021-08-24 18:01:18.371725 | 52540075-9baf-8232-d4fa-0000000000a0
|
FATAL | Render network_config from template | computehci-1 | error={ "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false }
This looks like a problem with your nic config template, /home/stack/templates/nic-configs/bonds_vlans.j2. To debug disable "hideing" of sensitive logs.
sudo sed -i 's/tripleo_network_config_hide_sensitive_logs: true/tripleo_network_config_hide_sensitive_logs: false/g' /usr/share/ansible/roles/tripleo-network-config/defaults/main.yml
-- Harald