Bug 1438883

Summary: No enum constant ProviderType.http://localhost:9696
Product: [oVirt] ovirt-engine Reporter: jniederm
Component: BLL.InfraAssignee: Martin Perina <mperina>
Status: CLOSED DUPLICATE QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: futureCC: bugs, mmirecki, oourfali
Target Milestone: ---   
Target Release: ---   
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: 2017-04-05 07:48:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
stacktrace.txt
none
whole-engine.log.zip none

Description jniederm 2017-04-04 16:02:58 UTC
Created attachment 1268715 [details]
stacktrace.txt

Description of problem:
I can see following stacktrace in engine log right after logging in the webadmin

2017-04-04 17:38:48,989+02 ERROR [org.ovirt.engine.core.bll.provider.GetAllProvidersQuery] (default task-101) [b421c4c1-1602-4c41-88f6-b5ff20888713] Exception: java.lang.IllegalArgumentException: No enum constant org.ovirt.engine.core.common.businessentities.ProviderType.http://localhost:9696

Full stacktrace in attached. The stacktrace is repeatedly printed to the log.


Version-Release number of selected component (if applicable):
4.2 master, commit 747cbac

How reproducible:
100%

Steps to Reproduce:
1. Open webadmin
2.
3.

Actual results:
Error stanctrace in engine log

Expected results:
no errors in engine log

Additional info:
I have very strange content in `providers` db table.

engine=> select name, url, provider_type from providers
;
          name          |             url              |     provider_type     
------------------------+------------------------------+-----------------------
 ovirt-image-repository | http://glance.ovirt.org:9292 | OPENSTACK_IMAGE
 ovirt-provider-ovn     | EXTERNAL_NETWORK             | http://localhost:9696
(2 rows)

Comment 1 jniederm 2017-04-04 16:04:01 UTC
Created attachment 1268716 [details]
whole-engine.log.zip

Comment 2 jniederm 2017-04-04 17:16:55 UTC
Workaround:
* swap values of columns 'url' and 'provider_type' for row where name = 'ovirt-provider-ovn' in db table providers
* set value of column 'custom_properties' to null in the same row

Comment 3 Martin Perina 2017-04-05 07:48:15 UTC

*** This bug has been marked as a duplicate of bug 1436965 ***

Comment 4 Marcin Mirecki 2017-04-05 08:28:47 UTC
The fix for the issue is in:
https://gerrit.ovirt.org/#/c/74968/

This fixes the setup script.

If you have an existing setup that is affected by the bug, please do the following update on your db:

sudo -u postgres psql
\connect <YOUR DBNAME>
delete from providers where url='EXTERNAL_NETWORK';
\q