Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1643943

Summary: The validator fails with unclear error message
Product: Red Hat OpenStack Reporter: Andrey Fiodorov <afiodoro>
Component: openstack-tripleo-validationsAssignee: Florian Fuchs <flfuchs>
Status: CLOSED ERRATA QA Contact: Andrey Fiodorov <afiodoro>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 14.0 (Rocky)CC: beth.white, flfuchs, gchamoul, jjoyce, jschluet, mbarnett, slinaber, tvignaud, ukalifon
Target Milestone: rcKeywords: Triaged
Target Release: 14.0 (Rocky)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-validations-9.3.1-0.20181008110752.4064fb7.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-11 11:54:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1512800    

Description Andrey Fiodorov 2018-10-29 13:48:59 UTC
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

Comment 1 Gaƫl Chamoulaud 2018-11-12 13:39:58 UTC
*** Bug 1648929 has been marked as a duplicate of this bug. ***

Comment 2 Florian Fuchs 2018-11-13 11:21:42 UTC
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.

Comment 18 Andrey Fiodorov 2018-11-22 09:43:39 UTC
I still get the same error

Comment 19 Andrey Fiodorov 2018-11-22 11:30:54 UTC
It was tested in wrong version, need to test it again...

Comment 24 Udi Kalifon 2018-11-27 12:04:54 UTC
Verified: openstack-tripleo-validations-9.3.1-0.20181008110752.4064fb7.el7ost.noarch

Comment 27 errata-xmlrpc 2019-01-11 11:54:26 UTC
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

Comment 28 Red Hat Bugzilla 2023-09-14 04:41:28 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days