Hi,
Thanks, that was the problem, it works now.
Regards,
Arsène
On 09/08/2016 06:16 PM, Karli Sjöberg wrote:
Den 8 sep 2016 15:32 skrev Arsène Gschwind <arsene.gschwind(a)unibas.ch>:
>
> Hi,
>
> Sorry for this late reply, i've been busy with some other projects
in the last weeks.
>
> I did some log analysing and could find the following in the foreman
log when trying to add foreman as an external provider for oVirt:
>
> 2016-09-08 15:20:03 [app] [I] Started GET "/api/v2" for 10.0.10.10
at 2016-09-08 15:20:03 +0200
>
> 2016-09-08 15:20:03 [app] [I] Processing by
Api::V2::HomeController#index as JSON
>
> 2016-09-08 15:20:03 [app] [I] Parameters: {"apiv"=>"v2",
"home"=>{}}
>
> 2016-09-08 15:20:03 [app] [I] Authorized user ovirt(oVirt org)
>
> 2016-09-08 15:20:03 [app] [I] Rendered api/v2/home/index.json.rabl
(81.8ms)
>
> 2016-09-08 15:20:03 [app] [I] Completed 200 OK in 104ms (Views:
82.3ms | ActiveRecord: 4.6ms)
>
> 2016-09-08 15:20:03 [app] [I] Started GET "/api/v2/discovered_hosts"
for 10.0.10.10 at 2016-09-08 15:20:03 +0200
>
> 2016-09-08 15:20:03 [app] [F]
>
> | ActionController::RoutingError (No route matches [GET]
"/api/v2/discovered_hosts"):
>
> | actionpack (4.2.5.1)
lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
>
> | actionpack (4.2.5.1)
lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
>
> | railties (4.2.5.1) lib/rails/rack/logger.rb:38:in `call_app'
>
> It looks like ovirt is calling an api method which doesn't exist :
/api/v2/discovered_hosts
>
> an extract from ovirt-engine.log
>
> 2016-09-08 15:20:00,862 INFO
[org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumesListVDSCommand]
(DefaultQuartzScheduler3) [] FINISH, GlusterVolumesListVDSCommand,
return: {d6f938d1-8886-40f3-8210-e5be397f951c=org.ovirt.engine.core.c
>
> ommon.businessentities.gluster.GlusterVolumeEntity@a32edae4,
7ef3b155-47d7-4405-aa70-82a9b8be4033=org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity@d94d8f95,
af169181-d72e-4325-9947-d7dd09e512f0=org.ovirt.engine.c
>
> ore.common.businessentities.gluster.GlusterVolumeEntity@2a649db3,
6d3c8561-4e52-4221-9473-88fd48ef4909=org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity@a35e1b82},
log id: 5ffa2bf1
>
> 2016-09-08 15:20:03,173 INFO
[org.ovirt.engine.core.bll.provider.ImportProviderCertificateCommand]
(default task-24) [146f761a] Running command:
ImportProviderCertificateCommand internal: false. Entities affected :
ID: aaa00000-0000-00
>
> 00-0000-123456789aaa Type: SystemAction group CREATE_STORAGE_POOL
with role type ADMIN
>
> 2016-09-08 15:20:03,178 INFO
[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector]
(default task-24) [146f761a] Correlation ID: 146f761a, Call Stack:
null, Custom Event ID: -1, Message: Certificate for provider spfy-dep
was imported. (User: admin@internal-authz)
>
> 2016-09-08 15:20:03,295 INFO
[org.ovirt.engine.core.bll.provider.TestProviderConnectivityCommand]
(default task-23) [6f5d9746] Running command:
TestProviderConnectivityCommand internal: false. Entities affected :
ID: aaa00000-0000-0000-0000-123456789aaa Type: SystemAction group
CREATE_STORAGE_POOL with role type ADMIN
>
> 2016-09-08 15:20:03,955 ERROR
[org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostProviderProxy]
(default task-23) [6f5d9746] Exception is
https://spfy-dep.host.sapify.ch:443/api/v2/discovered_hosts
>
> 2016-09-08 15:20:03,955 ERROR
[org.ovirt.engine.core.bll.provider.TestProviderConnectivityCommand]
(default task-23) [6f5d9746] Command
'org.ovirt.engine.core.bll.provider.TestProviderConnectivityCommand'
failed: EngineException:
https://spfy-dep.host.sapify.ch:443/api/v2/discovered_hosts (Failed
with error PROVIDER_FAILURE and code 5050)
>
> 2016-09-08 15:20:04,279 INFO
[org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher]
(DefaultQuartzScheduler4) [] Fetched 3 VMs from VDS
'd36d9aff-a953-466b-bdf7-70ba4f63e180'
>
>
> Thanks for any hint/help.
That's a plugin you need to install into Foreman:
https://theforeman.org/plugins/foreman_discovery/2.0/
/K
>
> rgds,
> Arsène
>
>
>
> On 08/22/2016 08:22 AM, Oved Ourfali wrote:
>>
>> Can you please attach the complete logs of ovirt and foreman?
>>
>>
>> On Wed, Aug 17, 2016 at 10:25 AM, Martin Perina
<mperina(a)redhat.com> wrote:
>>>
>>> Adding Yaniv ...
>>>
>>> On Wed, Aug 17, 2016 at 9:16 AM, Arsène Gschwind
<arsene.gschwind(a)unibas.ch> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Thanks a lot this did work on the Foreman side using
https://<server>/ovirt-engine/api/v3 .
>>>>
>>>> But on the oVirt Side, to define Foreman as an external provider,
it still doesn't work, is there also a special URL to enter? I didn't
find anything in the docs.
>>>>
>>>> Thanks for any hint.
>>>>
>>>> Regards,
>>>> Arsène
>>>>
>>>>
>>>> On 08/16/2016 05:01 PM, Juan Hernández wrote:
>>>>>
>>>>> On 08/16/2016 11:58 AM, Arsène Gschwind wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> has anybody been able to configure Foreman with oVirt 4 ? When
trying to
>>>>>> add Foreman as an external provider and test the login it
always return
>>>>>> : Failed to communicate with the external provider, see log for
>>>>>> additional details.
>>>>>>
>>>>>> On the Foreman side i get an SSO failed in the log, the user
and
>>>>>> password entered are correct.
>>>>>>
>>>>>> Running version:
>>>>>>
>>>>>> oVirt Engine Version: 4.0.2.6-1.el7.centos
>>>>>> Foreman Version 1.12.1
>>>>>>
>>>>>> Please find the log extract attached.
>>>>>> Thanks for any help/hint.
>>>>>>
>>>>>> Regards,
>>>>>> Arsène
>>>>>>
>>>>> There are two important differences in version 4 of oVirt
>>>>>
>>>>> 1. The URL is now only /ovirt-engine/api (it used to accept /api
and
>>>>> /ovirt-engine/api).
>>>>>
>>>>> 2. There are two versions of the API now, v3, compatible with
oVirt 3,
>>>>> and v4, new and incompatible. Foreman only supports v3.
>>>>>
>>>>> So, I'd suggest you try to use
"https://.../ovirt-engine/api/v3"
in the
>>>>> URL. Does that work? If it doesn't, can you provide more
details? Log files?
>>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users(a)ovirt.org
>>>>
http://lists.ovirt.org/mailman/listinfo/users
>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users(a)ovirt.org
>>>
http://lists.ovirt.org/mailman/listinfo/users
>>>
>>
>