Bug 1643943 - The validator fails with unclear error message
Summary: The validator fails with unclear error message
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-validations
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 14.0 (Rocky)
Assignee: Florian Fuchs
QA Contact: Andrey Fiodorov
URL:
Whiteboard:
: 1648929 (view as bug list)
Depends On:
Blocks: 1512800
TreeView+ depends on / blocked
 
Reported: 2018-10-29 13:48 UTC by Andrey Fiodorov
Modified: 2023-09-14 04:41 UTC (History)
9 users (show)

Fixed In Version: openstack-tripleo-validations-9.3.1-0.20181008110752.4064fb7.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-11 11:54:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 619184 0 None MERGED Skip schema check in network validation 2020-12-24 09:10:05 UTC
RDO 17304 0 None None None 2018-11-08 13:50:32 UTC
Red Hat Product Errata RHEA-2019:0045 0 None None None 2019-01-11 11:54:40 UTC

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


Note You need to log in before you can comment on or make changes to this bug.