Bug 1568811 - Adding interface to router fails with `response' for #<Fog::Network::OpenStack::NotFound:0x000000000f54cc70> Did you mean? respond_to?
Summary: Adding interface to router fails with `response' for #<Fog::Network::OpenStac...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.3
Assignee: Marek Aufart
QA Contact: Radim Hrazdil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-18 09:30 UTC by Radim Hrazdil
Modified: 2018-04-30 13:58 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-30 07:12:38 UTC
Category: ---
Cloudforms Team: RHEVM
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
evm.log (23.55 KB, text/plain)
2018-04-18 09:30 UTC, Radim Hrazdil
no flags Details
ovirt-provider-ovn.log (4.02 KB, text/plain)
2018-04-23 06:33 UTC, Radim Hrazdil
no flags Details

Description Radim Hrazdil 2018-04-18 09:30:18 UTC
Created attachment 1423404 [details]
evm.log

Description of problem:
When trying to add an interface to a router, it fails with:

Unable to add Subnet "ovn_router": undefined method `response' for #<Fog::Network::OpenStack::NotFound:0x000000000f54cc70> Did you mean? respond_to?

Using OVN provider for all entitties.

Version-Release number of selected component (if applicable):
cfme - 5.9.2.2.20180410215257_6961422
ovirt-engine-4.2.2.5-0.1.el7.noarch

ovirt-provider-ovn-1.2.9-1.el7ev.noarch
openvswitch-ovn-common-2.9.0-1.el7fdp.x86_64
openvswitch-ovn-central-2.9.0-1.el7fdp.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create network, subnet and router in ovirt OVN provider
2. Go to add interface to the router, select the created subnet
3.

Actual results:
Unable to add Subnet "ovn_router": undefined method `response' for #<Fog::Network::OpenStack::NotFound:0x000000000f54cc70> Did you mean? respond_to?

Expected results:
interface added

Additional info:
It may be somehow related issue to BZ 1561962

Comment 2 Alona Kaplan 2018-04-22 07:40:06 UTC
I tried to reproduce the bug and it worked for me. Can you please add the ovirt-provider-ovn.log?

Comment 3 Radim Hrazdil 2018-04-23 06:33:29 UTC
Created attachment 1425560 [details]
ovirt-provider-ovn.log

Comment 4 Alona Kaplan 2018-04-26 12:13:30 UTC
Marcin, please take a look at the ovn-provider log.

Comment 5 Marcin Mirecki 2018-04-27 12:16:40 UTC
The subnet given as a parameter for the router interface seems to be incorrect.
The rest request to add a router interface looks like:
/v2.0/routers/{router_id}/add_router_interface
{
    "subnet_id": "{subnet_id}"
}
and a record for {subnet_id} seems not to exist.

Is it possible to send a rest query to list all the subnets?
If so, please do:
  curl --insecure  https://{host where provider is installed}:9696/v2.0/subnets/

in case you have authentication enabled do:

  curl --insecure --data '{"auth":{"tenantName": "customer-x","passwordCredentials": {"username": "admin@internal","password": "{admin pasword}"}}}' https://{host where provider is installed}:35357/v2.0/tokens
and use the received token:
  curl --insecure --header 'X-Auth-Token: {token}' https://{host where provider is installed}:9696/v2.0/networks

Comment 6 Radim Hrazdil 2018-04-30 07:12:38 UTC
output of: curl --insecure --header 'X-Auth-Token: {token}' https://{host where provider is installed}:9696/v2.0/subnets

{"subnets": [{"ip_version": 4, "allocation_pools": [{"start": "10.0.0.2", "stop": "10.0.0.255"}], "name": "my_subnet", "enable_dhcp": true, "network_id": "db1170be-3343-415b-851f-37808aabc908", "tenant_id": "00000000000000000000000000000001", "cidr": "10.0.0.1/24", "dns_nameservers": [], "id": "d1e937c6-2b72-4c41-a7af-9259aa442339"}]}


However, with the recent change to parsing errors [1], I found out that the problem was that the subnet I tried to attach to a router interface didn't have specified default gateway. 

With default gateway specified, the subnet is successfully attached to router interface. 

Therefore closing as not a bug. 

[1] https://github.com/ManageIQ/manageiq-providers-openstack/pull/263


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