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

Bug 1489321

Summary: ERROR [org.ovirt.engine.core.bll.provider.network.GetExternalSubnetsOnProviderByNetworkQuery]
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: BLL.NetworkAssignee: Marcin Mirecki <mmirecki>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: high Docs Contact:
Priority: high    
Version: 4.2.0CC: bugs, danken, mburman, mkalfon, mmirecki
Target Milestone: ovirt-4.2.0Keywords: Regression
Target Release: 4.2.0Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:37:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 988285    
Attachments:
Description Flags
Logs none

Description Michael Burman 2017-09-07 08:24:19 UTC
Created attachment 1322967 [details]
Logs

Description of problem:
ERROR [org.ovirt.engine.core.bll.provider.network.GetExternalSubnetsOnProviderByNetworkQuery].

Not possible to get the subnet query of an external network with error exception on engine - 

2017-09-07 11:13:37,178+03 ERROR [org.ovirt.engine.core.bll.provider.network.GetExternalSubnetsOnProviderByNetworkQuery] (default task-4) [5b03381d-3b20-4d8f-b049-b0d3f8492cf2] Exception: org.jboss.resteasy.spi.Re
aderException: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.lang.String out of START_ARRAY token
 at [Source: org.jboss.resteasy.client.core.BaseClientResponse$InputStreamWrapper@6e9d4b70; line: 1, column: 131] (through reference chain: com.woorea.openstack.quantum.model.Subnets["subnets"]->com.woorea.opensta
ck.quantum.model.Subnet["gateway_ip"])

Caused by: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.lang.String out of START_ARRAY token
 at [Source: org.jboss.resteasy.client.core.BaseClientResponse$InputStreamWrapper@6defe277; line: 1, column: 131] (through reference chain: com.woorea.openstack.quantum.model.Subnets["subnets"]->com.woorea.openstack.quantum.model.Subnet["gateway_ip"])
        at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163) [jackson-mapper-asl-1.9.13.jar:1.9.13]


Version-Release number of selected component (if applicable):
ovirt-engine-4.2.0-0.0.master.20170906185835.gitcee3e58.el7.centos.noarch


Steps to Reproduce:
1. Import external network with subnet from external network provider
2. Go to networks > external network > subnets 

Actual result:
Can't get subnet with exception in engine log

Expected results:
Should work as expected

Comment 1 Dan Kenigsberg 2017-09-07 09:22:40 UTC
Michael, which ovirt-provider-ovn version do you have?

Comment 2 Red Hat Bugzilla Rules Engine 2017-09-07 09:22:47 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 3 Michael Burman 2017-09-07 09:25:29 UTC
(In reply to Dan Kenigsberg from comment #1)
> Michael, which ovirt-provider-ovn version do you have?

Latest - ovirt-provider-ovn-1.1-2.20170905145914.gitaf4fe87.el7.centos.noarch

Comment 4 Mor 2017-09-10 06:53:21 UTC
Regarding this issue, I am not sure if another BZ is required, It appears that there is another high severity bug that might be related to this issue.

Engine throws an error when creating OVN network with subnet (with DNS and gateway values) "Error while executing action Add Subnet to Provider: Failed to communicate with the external provider, see log for additional details."

engine log:
2017-09-10 09:49:42,798+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-8) [73d2d973-8699-4318-8ce2-22042064b26c] EVENT_ID: SUBNET_ADDITION_FAILED(1,143), Failed to add subnet test_sub on provider ovirt-provider-ovn. (User: admin@internal-authz)

ovirt-provider-ovn log:
2017-09-10 09:49:42,594   Request: POST : /v2.0/subnets
2017-09-10 09:49:42,595   Request body:
{
  "subnet" : {
    "name" : "test_sub",
    "cidr" : "10.0.0.0/24",
    "enable_dhcp" : true,
    "network_id" : "a8bb2086-3dcb-4d0e-beb0-64db258916c2",
    "tenant_id" : "00000000000000000000000000000001",
    "dns_nameservers" : [ "10.0.0.1" ],
    "ip_version" : 4,
    "gateway_ip" : "10.0.0.1"
  }
}
2017-09-10 09:49:42,597   Starting new HTTPS connection (1): network-ge-2.scl.lab.tlv.redhat.com
2017-09-10 09:49:42,642   "POST /ovirt-engine/sso/oauth/token-info HTTP/1.1" 200 322
2017-09-10 09:49:42,755   Response code: 201
2017-09-10 09:49:42,755   Response body: {"subnet": {"name": "test_sub", "network_id": "a8bb2086-3dcb-4d0e-beb0-64db258916c2", "tenant_id": "00000000000000000000000000000001", "gateway_ip": ["10.0.0.1"], "ip_version": 4, "cidr": "10.0.0.0/24", "id": "90ea09ea-764f-4f1f-9711-1be87ed75661"}}

Comment 5 Michael Burman 2017-09-26 05:42:53 UTC
Verified on - 4.2.0-0.0.master.20170925172449.git9d850a9.el7.centos

Comment 6 Sandro Bonazzola 2017-12-20 11:37:44 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.