Bug 1838032

Summary: [IPI][OSP] installer fails on user-provided-network if .1 address is on use
Product: OpenShift Container Platform Reporter: David Sanz <dsanzmor>
Component: InstallerAssignee: egarcia
Installer sub component: OpenShift on OpenStack QA Contact: David Sanz <dsanzmor>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: egarcia, m.andre, pprinett
Version: 4.5Keywords: UpcomingSprint
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:40:28 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:

Description David Sanz 2020-05-20 11:51:15 UTC
Description of problem:

When installing with user-provided-network feature (machinesSubnet), installer is selecting .1 address (or first address of the network, I am not sure) to connect to router.

If that address is already being used in the network, installer fails:

13:22:29  level=error msg="Error: Error creating openstack_networking_router_interface_v2: Expected HTTP response code [200] when accessing [PUT https://rhos-d.infra.prod.upshift.rdu2.redhat.com:13696/v2.0/routers/5e2baa2c-efcc-45d8-bed1-3eee0abe65f1/add_router_interface], but got 409 instead"
13:22:29  level=error msg="{\"NeutronError\": {\"message\": \"IP address 192.168.0.1 already allocated in subnet c8dcb634-ec20-43e2-8a8e-ea7ba3e4c3a7\", \"type\": \"IpAddressAlreadyAllocated\", \"detail\": \"\"}}"
13:22:29  level=error
13:22:29  level=error msg="  on ../../../../tmp/openshift-install-026215893/topology/private-network.tf line 140, in resource \"openstack_networking_router_interface_v2\" \"nodes_router_interface\":"
13:22:29  level=error msg=" 140: resource \"openstack_networking_router_interface_v2\" \"nodes_router_interface\" {"
13:22:29  level=error
13:22:29  level=error
13:22:29  level=fatal msg="failed to fetch Cluster: failed to generate asset \"Cluster\": failed to create cluster: failed to apply using Terraform"

Version-Release number of the following components:
rpm -q openshift-ansible
rpm -q ansible
ansible --version

How reproducible:

Steps to Reproduce:
1.Create a network and subnet on openstack, and use first address to create something
2.Install IPI on OSP with machinesSubnet pointing to that subnet

Actual results:
Installer fails because the address is on use

Expected results:
Installer select the IP address dynamically from a free one

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 1 egarcia 2020-05-20 13:58:18 UTC
Openstack DHCP takes the .1 address by default. I'm not sure we can do anything about this.

Comment 3 Martin André 2020-05-20 18:44:33 UTC
This is happening in the context of BYO Network, the simple solution is to stop creating a router in this case.
https://github.com/openshift/installer/pull/3632 should fix it.

Comment 7 David Sanz 2020-05-21 10:58:38 UTC
Also having problems with ingress_port:

12:55:20  level=error msg="Error: Error creating openstack_networking_port_v2: Expected HTTP response code [] when accessing [POST https://rhos-d.infra.prod.upshift.rdu2.redhat.com:13696/v2.0/ports], but got 409 instead"
12:55:20  level=error msg="{\"NeutronError\": {\"message\": \"IP address 192.168.0.7 already allocated in subnet c15de955-d2f7-4c27-bc98-a583ba8ff7b6\", \"type\": \"IpAddressAlreadyAllocated\", \"detail\": \"\"}}"

Comment 9 Pierre Prinetti 2020-05-28 15:06:34 UTC
The issue with the router being created on user-provisioned networks is solved. @morenod do you mind reporting any further problem in a separate BZ?

Marking as MODIFIED.

Comment 11 David Sanz 2020-05-29 08:41:37 UTC
Verified

Comment 12 errata-xmlrpc 2020-07-13 17:40:28 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/RHBA-2020:2409