Description of problem: the validator fails with unclear error message: Task 'Validate the network environment files' failed: Host: undercloud Message: MODULE FAILURE stderr: Traceback (most recent call last): File "/tmp/ansible_JPzqrd/ansible_module_network_environment.py", line 27, in <module> from os_net_config import validator ImportError: No module named os_net_config Failure! The validation failed for all hosts: * undercloud Version-Release number of selected component (if applicable): openstack-tripleo-validations-9.3.1-0.20181008110747.4064fb7.el7ost.noarch How reproducible: Steps to Reproduce: 1. Install OSP14 from 2018-10-19.1 2. Go to GUI and run the validation "Validate the Heat environment file for network configuration " Actual results: the validator fails with unclear error message: Task 'Validate the network environment files' failed: Host: undercloud Message: MODULE FAILURE stderr: Traceback (most recent call last): File "/tmp/ansible_JPzqrd/ansible_module_network_environment.py", line 27, in <module> from os_net_config import validator ImportError: No module named os_net_config Failure! The validation failed for all hosts: * undercloud Expected results: Additional info: Also I tried to run this validation from CLI and got another error: (undercloud) [stack@undercloud-0 ~]$ ansible-playbook -i /usr/bin/tripleo-ansible-inventory /usr/share/openstack-tripleo-validations/validations/network-environment.yaml [ERROR]: /usr/lib/python2.7/site-packages/urllib3/connection.py:344: SubjectAltNameWarning: Certificate for 192.168.24.2 has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.) SubjectAltNameWarning /usr/lib/python2.7/site-packages/urllib3/connection.py:344: SubjectAltNameWarning: Certificate for 192.168.24.2 has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.) SubjectAltNameWarning PLAY [undercloud] ************************************************************************************************************************************************************************************************* TASK [Gathering Facts] ******************************************************************************************************************************************************************************************** ok: [undercloud] TASK [Validate the network environment files] ********************************************************************************************************************************************************************* /usr/lib/python2.7/site-packages/urllib3/connection.py:344: SubjectAltNameWarning: Certificate for 192.168.24.2 has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.) SubjectAltNameWarning fatal: [undercloud]: FAILED! => {"changed": false, "msg": "network/config/single-nic-vlans/compute.yaml failed schema validation at network_config/0:\n {'dns_servers': {'get_param': 'DnsServers'}, 'name': 'bridge_name', 'members': [{'type': 'interface', 'name': 'nic1', 'primary': True}, {'routes': {'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageIpSubnet'}}], 'vlan_id': {'get_param': 'StorageNetworkVlanID'}}, {'routes': {'list_concat_unique': [{'get_param': 'InternalApiInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'InternalApiIpSubnet'}}], 'vlan_id': {'get_param': 'InternalApiNetworkVlanID'}}, {'routes': {'list_concat_unique': [{'get_param': 'TenantInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'TenantIpSubnet'}}], 'vlan_id': {'get_param': 'TenantNetworkVlanID'}}], 'routes': [{'ip_netmask': '169.254.169.254/32', 'next_hop': {'get_param': 'EC2MetadataIp'}}, {'default': True, 'next_hop': {'get_param': 'ControlPlaneDefaultRoute'}}], 'use_dhcp': False, 'type': 'ovs_bridge', 'addresses': [{'ip_netmask': {'list_join': ['/', [{'get_param': 'ControlPlaneIp'}, {'get_param': 'ControlPlaneSubnetCidr'}]]}}]} is not valid under any of the given schemas\n Sub-schemas tested and not matching:\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageIpSubnet'}}], 'vlan_id': {'get_param': 'StorageNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}' is not of type 'array'\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'InternalApiInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'InternalApiIpSubnet'}}], 'vlan_id': {'get_param': 'InternalApiNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'InternalApiInterfaceRoutes'}]}' is not of type 'array'\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'TenantInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'TenantIpSubnet'}}], 'vlan_id': {'get_param': 'TenantNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'TenantInterfaceRoutes'}]}' is not of type 'array'\nnetwork/config/single-nic-vlans/cinder-storage.yaml failed schema validation at network_config/0:\n {'dns_servers': {'get_param': 'DnsServers'}, 'name': 'br-storage', 'members': [{'type': 'interface', 'name': 'nic1', 'primary': True}, {'routes': {'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageIpSubnet'}}], 'vlan_id': {'get_param': 'StorageNetworkVlanID'}}, {'routes': {'list_concat_unique': [{'get_param': 'StorageMgmtInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageMgmtIpSubnet'}}], 'vlan_id': {'get_param': 'StorageMgmtNetworkVlanID'}}, {'routes': {'list_concat_unique': [{'get_param': 'InternalApiInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'InternalApiIpSubnet'}}], 'vlan_id': {'get_param': 'InternalApiNetworkVlanID'}}], 'routes': [{'ip_netmask': '169.254.169.254/32', 'next_hop': {'get_param': 'EC2MetadataIp'}}, {'default': True, 'next_hop': {'get_param': 'ControlPlaneDefaultRoute'}}], 'use_dhcp': False, 'type': 'ovs_bridge', 'addresses': [{'ip_netmask': {'list_join': ['/', [{'get_param': 'ControlPlaneIp'}, {'get_param': 'ControlPlaneSubnetCidr'}]]}}]} is not valid under any of the given schemas\n Sub-schemas tested and not matching:\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageIpSubnet'}}], 'vlan_id': {'get_param': 'StorageNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}' is not of type 'array'\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'StorageMgmtInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageMgmtIpSubnet'}}], 'vlan_id': {'get_param': 'StorageMgmtNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'StorageMgmtInterfaceRoutes'}]}' is not of type 'array'\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'InternalApiInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'InternalApiIpSubnet'}}], 'vlan_id': {'get_param': 'InternalApiNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'InternalApiInterfaceRoutes'}]}' is not of type 'array'\nnetwork/config/single-nic-vlans/ceph-storage.yaml failed schema validation at network_config/0:\n {'dns_servers': {'get_param': 'DnsServers'}, 'name': 'br-storage', 'members': [{'type': 'interface', 'name': 'nic1', 'primary': True}, {'routes': {'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageIpSubnet'}}], 'vlan_id': {'get_param': 'StorageNetworkVlanID'}}, {'routes': {'list_concat_unique': [{'get_param': 'StorageMgmtInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageMgmtIpSubnet'}}], 'vlan_id': {'get_param': 'StorageMgmtNetworkVlanID'}}], 'routes': [{'ip_netmask': '169.254.169.254/32', 'next_hop': {'get_param': 'EC2MetadataIp'}}, {'default': True, 'next_hop': {'get_param': 'ControlPlaneDefaultRoute'}}], 'use_dhcp': False, 'type': 'ovs_bridge', 'addresses': [{'ip_netmask': {'list_join': ['/', [{'get_param': 'ControlPlaneIp'}, {'get_param': 'ControlPlaneSubnetCidr'}]]}}]} is not valid under any of the given schemas\n Sub-schemas tested and not matching:\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageIpSubnet'}}], 'vlan_id': {'get_param': 'StorageNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}' is not of type 'array'\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'StorageMgmtInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageMgmtIpSubnet'}}], 'vlan_id': {'get_param': 'StorageMgmtNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'StorageMgmtInterfaceRoutes'}]}' is not of type 'array'\nnetwork/config/single-nic-vlans/swift-storage.yaml failed schema validation at network_config/0:\n {'dns_servers': {'get_param': 'DnsServers'}, 'name': 'br-storage', 'members': [{'type': 'interface', 'name': 'nic1', 'primary': True}, {'routes': {'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageIpSubnet'}}], 'vlan_id': {'get_param': 'StorageNetworkVlanID'}}, {'routes': {'list_concat_unique': [{'get_param': 'StorageMgmtInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageMgmtIpSubnet'}}], 'vlan_id': {'get_param': 'StorageMgmtNetworkVlanID'}}, {'routes': {'list_concat_unique': [{'get_param': 'InternalApiInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'InternalApiIpSubnet'}}], 'vlan_id': {'get_param': 'InternalApiNetworkVlanID'}}], 'routes': [{'ip_netmask': '169.254.169.254/32', 'next_hop': {'get_param': 'EC2MetadataIp'}}, {'default': True, 'next_hop': {'get_param': 'ControlPlaneDefaultRoute'}}], 'use_dhcp': False, 'type': 'ovs_bridge', 'addresses': [{'ip_netmask': {'list_join': ['/', [{'get_param': 'ControlPlaneIp'}, {'get_param': 'ControlPlaneSubnetCidr'}]]}}]} is not valid under any of the given schemas\n Sub-schemas tested and not matching:\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageIpSubnet'}}], 'vlan_id': {'get_param': 'StorageNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}' is not of type 'array'\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'StorageMgmtInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageMgmtIpSubnet'}}], 'vlan_id': {'get_param': 'StorageMgmtNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'StorageMgmtInterfaceRoutes'}]}' is not of type 'array'\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'InternalApiInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'InternalApiIpSubnet'}}], 'vlan_id': {'get_param': 'InternalApiNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'InternalApiInterfaceRoutes'}]}' is not of type 'array'\nnetwork/config/single-nic-vlans/controller.yaml failed schema validation at network_config/0:\n {'dns_servers': {'get_param': 'DnsServers'}, 'name': 'bridge_name', 'members': [{'type': 'interface', 'name': 'nic1', 'primary': True}, {'routes': {'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageIpSubnet'}}], 'vlan_id': {'get_param': 'StorageNetworkVlanID'}}, {'routes': {'list_concat_unique': [{'get_param': 'StorageMgmtInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageMgmtIpSubnet'}}], 'vlan_id': {'get_param': 'StorageMgmtNetworkVlanID'}}, {'routes': {'list_concat_unique': [{'get_param': 'InternalApiInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'InternalApiIpSubnet'}}], 'vlan_id': {'get_param': 'InternalApiNetworkVlanID'}}, {'routes': {'list_concat_unique': [{'get_param': 'TenantInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'TenantIpSubnet'}}], 'vlan_id': {'get_param': 'TenantNetworkVlanID'}}, {'routes': {'list_concat_unique': [{'get_param': 'ExternalInterfaceRoutes'}, [{'default': True, 'next_hop': {'get_param': 'ExternalInterfaceDefaultRoute'}}]]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'ExternalIpSubnet'}}], 'vlan_id': {'get_param': 'ExternalNetworkVlanID'}}], 'routes': [{'ip_netmask': '169.254.169.254/32', 'next_hop': {'get_param': 'EC2MetadataIp'}}], 'use_dhcp': False, 'type': 'ovs_bridge', 'addresses': [{'ip_netmask': {'list_join': ['/', [{'get_param': 'ControlPlaneIp'}, {'get_param': 'ControlPlaneSubnetCidr'}]]}}]} is not valid under any of the given schemas\n Sub-schemas tested and not matching:\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageIpSubnet'}}], 'vlan_id': {'get_param': 'StorageNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'StorageInterfaceRoutes'}]}' is not of type 'array'\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'StorageMgmtInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'StorageMgmtIpSubnet'}}], 'vlan_id': {'get_param': 'StorageMgmtNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'StorageMgmtInterfaceRoutes'}]}' is not of type 'array'\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'InternalApiInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'InternalApiIpSubnet'}}], 'vlan_id': {'get_param': 'InternalApiNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'InternalApiInterfaceRoutes'}]}' is not of type 'array'\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'TenantInterfaceRoutes'}]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'TenantIpSubnet'}}], 'vlan_id': {'get_param': 'TenantNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'TenantInterfaceRoutes'}]}' is not of type 'array'\n - items/oneOf/ovs_bridge/members/items/oneOf: {'routes': {'list_concat_unique': [{'get_param': 'ExternalInterfaceRoutes'}, [{'default': True, 'next_hop': {'get_param': 'ExternalInterfaceDefaultRoute'}}]]}, 'type': 'vlan', 'addresses': [{'ip_netmask': {'get_param': 'ExternalIpSubnet'}}], 'vlan_id': {'get_param': 'ExternalNetworkVlanID'}} is not valid under any of the given schemas\n -- items/oneOf/ovs_bridge/members/items/oneOf/vlan/routes/type: '{'list_concat_unique': [{'get_param': 'ExternalInterfaceRoutes'}, [{'default': True, 'next_hop': {'get_param': 'ExternalInterfaceDefaultRoute'}}]]}' is not of type 'array'"} [WARNING]: Could not create retry file '/usr/share/openstack-tripleo-validations/validations/network-environment.retry'. [Errno 13] Permission denied: u'/usr/share/openstack-tripleo- validations/validations/network-environment.retry' PLAY RECAP ******************************************************************************************************************************************************************************************************** undercloud : ok=1 changed=0 unreachable=0 failed=1
*** Bug 1648929 has been marked as a duplicate of this bug. ***
The longer output (from the ansible-playbook command) is the result of a schema validation of some of the templates. You will see the same output in the UI as soon as the patch is applied. It looks like a legitimate validation result, even though it lets the validation fail. As a follow up, we should check (I'm doing that) why the schema validation fails with our default templates and if this should be fixed.
I still get the same error
It was tested in wrong version, need to test it again...
Verified: openstack-tripleo-validations-9.3.1-0.20181008110752.4064fb7.el7ost.noarch
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2019:0045
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days