Bug 1509640

Summary: The network-environment.yaml validator hangs with IPv6 addresses
Product: Red Hat OpenStack Reporter: Udi Kalifon <ukalifon>
Component: openstack-tripleo-validationsAssignee: Florian Fuchs <flfuchs>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: urgent Docs Contact:
Priority: high    
Version: 12.0 (Pike)CC: beth.white, jjoyce, jpichon, jschluet, slinaber, tvignaud
Target Milestone: betaKeywords: Triaged
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-validations-8.3.1-0.20180304031640.d5546cd.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-27 13:39:00 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: 1301549, 1513624    

Description Udi Kalifon 2017-11-05 11:45:33 UTC
Description of problem:
I uploaded a network-environment.yaml file with IPv6 addresses to the plan:

parameter_defaults:
  InternalApiNetCidr: 'fd00:fd00:fd00:2000::/64'
  InternalApiAllocationPools: [{'start': 'fd00:fd00:fd00:2000::10', 'end': 'fd00:fd00:fd00:2000:ffff:ffff:ffff:fffe'}]
  InternalApiNetworkVlanID: 200

  StorageNetCidr: 'fd00:fd00:fd00:3000::/64'
  StorageAllocationPools: [{'start': 'fd00:fd00:fd00:3000::10', 'end': 'fd00:fd00:fd00:3000:ffff:ffff:ffff:fffe'}]
  StorageNetworkVlanID: 300

  StorageMgmtNetCidr: 'fd00:fd00:fd00:4000::/64'
  StorageMgmtAllocationPools: [{'start': 'fd00:fd00:fd00:4000::10', 'end': 'fd00:fd00:fd00:4000:ffff:ffff:ffff:fffe'}]
  StorageMgmtNetworkVlanID: 301

  ExternalNetCidr: '2001:db8:ca2:4::/64'
  ExternalAllocationPools: [{'start': '2001:db8:ca2:4::0100', 'end': '2001:db8:ca2:4:ffff:ffff:ffff:ff00'}]
  ExternalInterfaceDefaultRoute: 2001:db8:ca2:4::1
  ExternalNetworkVlanID: 10

  TenantNetCidr: 10.0.1.128/25
  TenantAllocationPools: [{'start': '10.0.1.138', 'end': '10.0.1.200'}]

  ControlPlaneSubnetCidr: "25"
  ControlPlaneDefaultRoute: 192.0.2.1
  # ControlPlaneDefaultRoute: 192.168.0.1

  EC2MetadataIp: 192.0.2.1
  # EC2MetadataIp: 192.168.0.1
  DnsServers: ["10.16.36.29","8.8.8.8"]
  NtpServer: ["clock.redhat.com","clock.redhat.com"]


When I ran the validator, it hanged.


Version-Release number of selected component (if applicable):
openstack-tripleo-validations-7.4.2-0.20171016115241.c2c9bf2.el7ost.noarch


How reproducible:
100%


Steps to Reproduce:
1. Edit your network-environment.yaml file with the above changes.
2. Upload the file to the plan:
openstack object create overcloud environments/network-environment.yaml
3. Run the validator:
ansible-playbook -i /usr/bin/tripleo-ansible-inventory /usr/share/openstack-tripleo-validations/validations/network-environment.yaml


Actual results:
It hangs forever

Comment 3 Florian Fuchs 2018-01-08 13:46:19 UTC
The reason why the validation hangs is that it test *all* IPs in a range defined in *AllocationPools against the corresponding *NetCidr subnet. If the range is as large as in the example the validation runs for a *very* long time.

The fix attached to the report uses the IPRange python object to check the validity of the range instead of testing every IP separately.

Comment 6 Udi Kalifon 2018-04-18 07:17:06 UTC
Verified: openstack-tripleo-validations-8.4.0-1.el7ost.noarch

A new problem was found, where if the network-environment.yaml file is missing, the GUI doesn't show the failure and the spinner spins forever: https://bugzilla.redhat.com/show_bug.cgi?id=1568706

Comment 8 errata-xmlrpc 2018-06-27 13:39:00 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-2018:2086