Bug 987993

Summary: [oVirt] [foreman] Adding default config fails
Product: [Retired] oVirt Reporter: Mike Kolesnik <mkolesni>
Component: ovirt-engine-coreAssignee: Oved Ourfali <oourfali>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.3CC: acathrow, iheim, mkolesni, yzaslavs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-23 07:27:38 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 Mike Kolesnik 2013-07-24 14:01:58 UTC
Description of problem:
Adding anew provider of type foreman which is unconfigured fails


Version-Release number of selected component (if applicable):


How reproducible:
Always


Steps to Reproduce:
1. Go to external providers
2. Add a new foreman provider, don't fill other fields
3. Click OK
  
Actual results:
An error is returned:
Error while executing action AddProvider: Failed to communicate with the external provider.


Expected results:
The provider should be added successfully


Additional info:
Since the provider communication can wtop working in any point in it's life, it makes little sense to block it specifically on add.

Comment 1 Oved Ourfali 2013-07-24 14:06:29 UTC
Did you set a username and password?
The error there is a bit misleading if that's the case...

We should either make a better message there, or require those fields for the foreman provider, as it requires credentials.

Also please attach the log, if something there is relevant.

Comment 2 Mike Kolesnik 2013-07-25 05:59:52 UTC
(In reply to Oved Ourfali from comment #1)
> Did you set a username and password?
> The error there is a bit misleading if that's the case...
> 

No I didn't check the "Authentication required" checkbox.

> We should either make a better message there, or require those fields for
> the foreman provider, as it requires credentials.

I'm not sure a better message is the way, if those fields are mandatory then they should be required by the dialog and you shouldn't be able to hit OK (those fields should light up) - and the checkbox should be checked and greyed out.

> 
> Also please attach the log, if something there is relevant.

This is what you see in the log:

2013-07-25 08:58:31,130 INFO  [org.ovirt.engine.core.bll.provider.AddProviderCommand] (ajp--127.0.0.1-8702-5) Running command: AddProviderCommand internal: false. Entities affected :  ID: aaa00000-0000-0000-0000-123456789aaa Type: System
2013-07-25 08:58:31,134 ERROR [org.ovirt.engine.core.bll.provider.AddProviderCommand] (ajp--127.0.0.1-8702-5) Command org.ovirt.engine.core.bll.provider.AddProviderCommand throw Vdc Bll exception. With error message VdcBLLException: Username may not be null (Failed with VDSM error PROVIDER_FAILURE and code 5050)
2013-07-25 08:58:31,136 ERROR [org.ovirt.engine.core.bll.provider.AddProviderCommand] (ajp--127.0.0.1-8702-5) Transaction rolled-back for command: org.ovirt.engine.core.bll.provider.AddProviderCommand.
2013-07-25 08:58:31,145 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp--127.0.0.1-8702-5) Correlation ID: 14846596, Call Stack: null, Custom Event ID: -1, Message: Failed to add provider for. (User: admin@internal)

Comment 3 Itamar Heim 2013-08-21 16:40:27 UTC
as RC is built, moving to ON_QA (hopefully did not catch incorrect bugs when doing this)

Comment 4 Itamar Heim 2013-09-23 07:27:38 UTC
closing as this should be in 3.3 (doing so in bulk, so may be incorrect)