[ovirt-users] Ovirt and Foreman integration failure to provision

2018-11-15 Thread 0pk0de
Hello,

I am trying to integrate ovirt and foreman, foreman is able to create VMs but 
fails to provision them correctly (image/template based). The IP address does 
not get set to the correct one, cloud-init doesnt run either since the password 
is not correct after booting.

My questions are the following: 

1. how does the normal provisioning setup looks like (using image/template)? I 
assumed it would just provision it depending on my puppet classes after 
booting, is this incorrect?

2. What does foreman *need* from ovirt? does it need a template that for 
example already has puppet installed? I assumed this was not the case... 

3. How is it possible to initially "seed" the vm with the puppet master details 
when not using cloud-init (which seems optional), what magic can make this 
happen behind the scenes? is it something like libguestfs? Can I just use a 
cloud glance image like "centos 7 generic cloud v1805" and import that as a 
template and then create a host on foreman using this template? and then it 
should provision it?
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/BWSKTKUKPSBJSQ3BP7AOZX65UH2GNMIP/


Re: [ovirt-users] oVirt and Foreman

2017-08-01 Thread Juan Hernández

On 07/28/2017 06:03 PM, Davide Ferrari wrote:



On 28/07/17 17:46, Juan Hernández wrote:


The oVirt access log indeed shows that three disks are added to the 
virtual machine. May it be that Foreman thinks that it has to 
explicitly add a boot disk? Ohad, Ivan, any idea?




I've explicitly added the template id to the hammer command line and 
still adds 3 disks but at least now two of them respect the size I'm 
passing through Hammer. But it still sets a random disk as the bootable 
one and I cannot find a way to force to use the disk already present in 
the oVirt template as the bootable one
Is there a way in oVirt to log the JSONs passed in the various POST 
requests?




There is no such mechanism available by default You can get some more 
information about the requests and responses using the WildFly request 
dumping filter, but it won't give you the request or response bodies. If 
you want to do that first you need to go to the oVirt engine machine and 
start the "jboss-cli.sh" tool:


  # /usr/share/ovirt-engine-wildfly/bin/jboss-cli.sh \
  --controller=localhost:8706 \
  --user=admin@internal \
  --connect

That will as for the password of the "admin@internal" user, and then it 
should display you a prompt like this:


  [standalone@localhost:8706 /]

In that prompt you can type any WildFly management command. For more 
information see here:


  https://docs.jboss.org/author/display/WFLY/Command+Line+Interface

In this particular case you can first add the request dumping filter to 
the configuration, typing the following command:


  /subsystem=undertow/configuration=filter/custom-filter=myfilter:\
 add(class-name=io.undertow.server.handlers.RequestDumpingHandler,\
  module=io.undertow.core)

Then you can enable that filter for the /ovirt-engine/api/* URL:


/subsystem=undertow/server=default-server/host=default-host/filter-ref=myfilter:add(predicate="regex['/ovirt-engine/api.*']")

Note again that this won't give you the request and response bodies, so 
it may not be worth.


Another thing you may want to try, in the Foreman side, is to modify the 
"rbovirt" gem so it writes the request bodies to some place. For 
example, you can locate the "rbovirt.rb" file in your Foreman 
installation, and then, after this line:


  https://github.com/abenari/rbovirt/blob/v0.1.3/lib/rbovirt.rb#L131

Add something that writes the request body to a file, for example:

  open('/tmp/mylog', 'a') { |f| f.write(body) }

Then you will probably need to restart Foreman.

Remember to restore the "rbovirt.rb" file when you finish.



More over, looking at 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks it 
throws a 404, the endpoint seems to be 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/diskattachments 
while 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks 
seems to work only with API v3. Maybe I should change the base URL 
for the ovirt's API in foreman config, shouldn't I?




I think you don't need to change anything there. Foreman uses 
'rbovirt', and 'rbovirt' explicitly requests version 3 of the API 
using the 'Version: 3' header. 


Well, I've added it anyway and it didn't break anything :)



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt and Foreman

2017-07-28 Thread Davide Ferrari



On 28/07/17 17:46, Juan Hernández wrote:


The oVirt access log indeed shows that three disks are added to the 
virtual machine. May it be that Foreman thinks that it has to 
explicitly add a boot disk? Ohad, Ivan, any idea?




I've explicitly added the template id to the hammer command line and 
still adds 3 disks but at least now two of them respect the size I'm 
passing through Hammer. But it still sets a random disk as the bootable 
one and I cannot find a way to force to use the disk already present in 
the oVirt template as the bootable one
Is there a way in oVirt to log the JSONs passed in the various POST 
requests?




More over, looking at 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks it 
throws a 404, the endpoint seems to be 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/diskattachments 
while 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks 
seems to work only with API v3. Maybe I should change the base URL 
for the ovirt's API in foreman config, shouldn't I?




I think you don't need to change anything there. Foreman uses 
'rbovirt', and 'rbovirt' explicitly requests version 3 of the API 
using the 'Version: 3' header. 


Well, I've added it anyway and it didn't break anything :)

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt and Foreman

2017-07-28 Thread Juan Hernández

On 07/28/2017 04:53 PM, Davide Ferrari wrote:



On 28/07/17 16:14, Juan Hernández wrote:
Ah, I see, in your command you are listing Gluster volumes, not 
storage domains. They are different kinds of objects inside oVirt, and 
thus they have different identifiers. That is completely normal. If 
you want to get the identifiers of the storage domains use "list 
storagedomains".




Oh, got it. Thanks for the tip!

Anyway, I've replaced the storage domain UUID with the one that works 
with the REST API and something improved: now I don't get the 404 
from ovirt and the machine is not deleted BUT:  I've added 2 disks 
(20GB and 30GB) plus the base template 8Gb disk, and I get a VM with 
four (4) 8GB disks, and the bootable one is a random disk


I've attached the engine.log with the (I hope) relevant messages



Are you adding those disks and template using the Foreman CLI? Can you 
share the commands that you are using?




Yes, I'm using Hammer CLI

hammer host create --architecture-id=1 --domain billy.preprod 
--operatingsystem-id=7 --hostgroup-title Billy/Preprod --name foobar03 
--partition-table-id=192 --provision-method image --root-password 
billy12345 --compute-resource 'LeaseWeb VMs prod' --image CentOS_7.3 
--compute-attributes 
cluster=0002-0002-0002-0002-0345,cores=2,memory=4294967296,start=1 
--volume 
'"size_gb=20,storage_domain=ba2bd397-9222-424d-aecc-eb652c0169d9,bootable=0"' 
--volume 
'"size_gb=30,storage_domain=ba2bd397-9222-424d-aecc-eb652c0169d9,bootable=0"' 




Also, can you share again the relevant part of the 
/var/log/ovirt-engine/ssl_access_log file? There we can see what 
requests are actually sent to the oVirt engine. 


These are the requests arriving from Foreman:
192.168.10.158 - - [28/Jul/2017:14:19:42 +] "GET 
/ovirt-engine/api/vms/24831007-97ad-4f6d-9009-e6fb68a585f9 HTTP/1.1" 200 
2865
192.168.10.158 - - [28/Jul/2017:14:26:19 +] "GET 
/ovirt-engine/api/datacenters?search= HTTP/1.1" 200 408
192.168.10.158 - - [28/Jul/2017:14:26:19 +] "GET 
/ovirt-engine/api/operatingsystems HTTP/1.1" 200 2943
192.168.10.158 - - [28/Jul/2017:14:26:20 +] "GET 
/ovirt-engine/api/datacenters?search= HTTP/1.1" 200 408
192.168.10.158 - - [28/Jul/2017:14:26:20 +] "GET 
/ovirt-engine/api/operatingsystems HTTP/1.1" 200 2943
192.168.10.158 - - [28/Jul/2017:14:26:20 +] "GET 
/ovirt-engine/api/datacenters?search= HTTP/1.1" 200 408
192.168.10.158 - - [28/Jul/2017:14:26:20 +] "GET 
/ovirt-engine/api/clusters/ HTTP/1.1" 200 1091
192.168.10.158 - - [28/Jul/2017:14:26:20 +] "POST 
/ovirt-engine/api/vms HTTP/1.1" 202 1612
192.168.10.158 - - [28/Jul/2017:14:26:22 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2256
192.168.10.158 - - [28/Jul/2017:14:26:22 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/nics 
HTTP/1.1" 200 409
192.168.10.158 - - [28/Jul/2017:14:26:22 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2256
192.168.10.158 - - [28/Jul/2017:14:26:23 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2256
192.168.10.158 - - [28/Jul/2017:14:26:26 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2256
192.168.10.158 - - [28/Jul/2017:14:26:30 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2252
192.168.10.158 - - [28/Jul/2017:14:26:30 +] "DELETE 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/nics/bf0dabd2-796b-4b07-bd69-db3915409939 
HTTP/1.1" 200 119
192.168.10.158 - - [28/Jul/2017:14:26:30 +] "POST 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/nics 
HTTP/1.1" 201 430
192.168.10.158 - - [28/Jul/2017:14:26:31 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/nics 
HTTP/1.1" 200 442
192.168.10.158 - - [28/Jul/2017:14:26:31 +] "GET /ovirt-engine/api/ 
HTTP/1.1" 200 873
192.168.10.158 - - [28/Jul/2017:14:26:31 +] "GET 
/ovirt-engine/api/datacenters/0001-0001-0001-0001-03e3 
HTTP/1.1" 200 396
192.168.10.158 - - [28/Jul/2017:14:26:31 +] "POST 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks 
HTTP/1.1" 201 674
192.168.10.158 - - [28/Jul/2017:14:26:32 +] "POST 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks 
HTTP/1.1" 201 676
192.168.10.158 - - [28/Jul/2017:14:26:33 +] "POST 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks 
HTTP/1.1" 201 677
192.168.10.158 - - [28/Jul/2017:14:26:33 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks 
HTTP/1.1" 200 1136
192.168.10.158 - - [28/Jul/2017:14:26:34 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2668
192.168.10.158 - - [28/Jul/2017:14:26:34 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2668
192.168.10.158 - - [28/Jul/2017:14:26:34 +] "GET 

Re: [ovirt-users] oVirt and Foreman

2017-07-28 Thread Davide Ferrari



On 28/07/17 16:14, Juan Hernández wrote:
Ah, I see, in your command you are listing Gluster volumes, not 
storage domains. They are different kinds of objects inside oVirt, and 
thus they have different identifiers. That is completely normal. If 
you want to get the identifiers of the storage domains use "list 
storagedomains".




Oh, got it. Thanks for the tip!

Anyway, I've replaced the storage domain UUID with the one that works 
with the REST API and something improved: now I don't get the 404 
from ovirt and the machine is not deleted BUT:  I've added 2 disks 
(20GB and 30GB) plus the base template 8Gb disk, and I get a VM with 
four (4) 8GB disks, and the bootable one is a random disk


I've attached the engine.log with the (I hope) relevant messages



Are you adding those disks and template using the Foreman CLI? Can you 
share the commands that you are using?




Yes, I'm using Hammer CLI

hammer host create --architecture-id=1 --domain billy.preprod 
--operatingsystem-id=7 --hostgroup-title Billy/Preprod --name foobar03 
--partition-table-id=192 --provision-method image --root-password 
billy12345 --compute-resource 'LeaseWeb VMs prod' --image CentOS_7.3 
--compute-attributes 
cluster=0002-0002-0002-0002-0345,cores=2,memory=4294967296,start=1 
--volume 
'"size_gb=20,storage_domain=ba2bd397-9222-424d-aecc-eb652c0169d9,bootable=0"' 
--volume 
'"size_gb=30,storage_domain=ba2bd397-9222-424d-aecc-eb652c0169d9,bootable=0"'



Also, can you share again the relevant part of the 
/var/log/ovirt-engine/ssl_access_log file? There we can see what 
requests are actually sent to the oVirt engine. 


These are the requests arriving from Foreman:
192.168.10.158 - - [28/Jul/2017:14:19:42 +] "GET 
/ovirt-engine/api/vms/24831007-97ad-4f6d-9009-e6fb68a585f9 HTTP/1.1" 200 
2865
192.168.10.158 - - [28/Jul/2017:14:26:19 +] "GET 
/ovirt-engine/api/datacenters?search= HTTP/1.1" 200 408
192.168.10.158 - - [28/Jul/2017:14:26:19 +] "GET 
/ovirt-engine/api/operatingsystems HTTP/1.1" 200 2943
192.168.10.158 - - [28/Jul/2017:14:26:20 +] "GET 
/ovirt-engine/api/datacenters?search= HTTP/1.1" 200 408
192.168.10.158 - - [28/Jul/2017:14:26:20 +] "GET 
/ovirt-engine/api/operatingsystems HTTP/1.1" 200 2943
192.168.10.158 - - [28/Jul/2017:14:26:20 +] "GET 
/ovirt-engine/api/datacenters?search= HTTP/1.1" 200 408
192.168.10.158 - - [28/Jul/2017:14:26:20 +] "GET 
/ovirt-engine/api/clusters/ HTTP/1.1" 200 1091
192.168.10.158 - - [28/Jul/2017:14:26:20 +] "POST 
/ovirt-engine/api/vms HTTP/1.1" 202 1612
192.168.10.158 - - [28/Jul/2017:14:26:22 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2256
192.168.10.158 - - [28/Jul/2017:14:26:22 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/nics 
HTTP/1.1" 200 409
192.168.10.158 - - [28/Jul/2017:14:26:22 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2256
192.168.10.158 - - [28/Jul/2017:14:26:23 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2256
192.168.10.158 - - [28/Jul/2017:14:26:26 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2256
192.168.10.158 - - [28/Jul/2017:14:26:30 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2252
192.168.10.158 - - [28/Jul/2017:14:26:30 +] "DELETE 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/nics/bf0dabd2-796b-4b07-bd69-db3915409939 
HTTP/1.1" 200 119
192.168.10.158 - - [28/Jul/2017:14:26:30 +] "POST 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/nics 
HTTP/1.1" 201 430
192.168.10.158 - - [28/Jul/2017:14:26:31 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/nics 
HTTP/1.1" 200 442
192.168.10.158 - - [28/Jul/2017:14:26:31 +] "GET /ovirt-engine/api/ 
HTTP/1.1" 200 873
192.168.10.158 - - [28/Jul/2017:14:26:31 +] "GET 
/ovirt-engine/api/datacenters/0001-0001-0001-0001-03e3 
HTTP/1.1" 200 396
192.168.10.158 - - [28/Jul/2017:14:26:31 +] "POST 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks 
HTTP/1.1" 201 674
192.168.10.158 - - [28/Jul/2017:14:26:32 +] "POST 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks 
HTTP/1.1" 201 676
192.168.10.158 - - [28/Jul/2017:14:26:33 +] "POST 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks 
HTTP/1.1" 201 677
192.168.10.158 - - [28/Jul/2017:14:26:33 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks 
HTTP/1.1" 200 1136
192.168.10.158 - - [28/Jul/2017:14:26:34 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2668
192.168.10.158 - - [28/Jul/2017:14:26:34 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7 HTTP/1.1" 200 
2668
192.168.10.158 - - [28/Jul/2017:14:26:34 +] "GET 
/ovirt-engine/api/vms/47f5035a-696c-4578-ace9-b23d865c6aa7/disks 
HTTP/1.1" 

Re: [ovirt-users] oVirt and Foreman

2017-07-28 Thread Juan Hernández

On 07/28/2017 01:27 PM, Davide Ferrari wrote:



On 28/07/17 10:50, Juan Hernández wrote:
[oVirt shell (connected)]# list glustervolumes --cluster-identifier 
0002-0002-0002-0002-0345


id : 23f8f1ae-a3ac-47bf-8223-5b5f7c29e508
name   : data_ssd

id : 6be35972-4720-4d34-b2b0-26ffc294f8a3
name   : engine

id : 66f33b1e-7bc8-44cf-9cca-9041b0e0dd15
name   : export

id : cc2c9765-6a3d-4281-8af8-c3526a81cfab
name   : iso

So there is something wrong with the "data_ssd" storage domain, 
apparently, as the identifier that can't be found corresponds to that 
storage domain. Can you try to retrieve that storage domain? Just use 
your browser to get the following URL:



https://yourovirt/ovirt-engine/api/storagedomains/23f8f1ae-a3ac-47bf-8223-5b5f7c29e508 



Also this, in case the problem is related to version 3 of the API:


https://yourovirt/ovirt-engine/api/v3/storagedomains/23f8f1ae-a3ac-47bf-8223-5b5f7c29e508 



Do they work?



Nope, 404 both v4 and v3 API, but if I go to the storagedomains/ root, I 
get completely different UUIDs listed there. For example, in the case of 
the "data_ssd" domain, the UUID is 7a28ea1a-df7e-4205-bb96-45ff2817f175


Why is the ovirt console showing a completely different UUID?



Ah, I see, in your command you are listing Gluster volumes, not storage 
domains. They are different kinds of objects inside oVirt, and thus they 
have different identifiers. That is completely normal. If you want to 
get the identifiers of the storage domains use "list storagedomains".


Anyway, I've replaced the storage domain UUID with the one that works 
with the REST API and something improved: now I don't get the 404 from 
ovirt and the machine is not deleted BUT:  I've added 2 disks (20GB and 
30GB) plus the base template 8Gb disk, and I get a VM with four (4) 8GB 
disks, and the bootable one is a random disk


I've attached the engine.log with the (I hope) relevant messages



Are you adding those disks and template using the Foreman CLI? Can you 
share the commands that you are using?


Also, can you share again the relevant part of the 
/var/log/ovirt-engine/ssl_access_log file? There we can see what 
requests are actually sent to the oVirt engine.


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt and Foreman

2017-07-28 Thread Davide Ferrari



On 28/07/17 10:50, Juan Hernández wrote:
[oVirt shell (connected)]# list glustervolumes --cluster-identifier 
0002-0002-0002-0002-0345


id : 23f8f1ae-a3ac-47bf-8223-5b5f7c29e508
name   : data_ssd

id : 6be35972-4720-4d34-b2b0-26ffc294f8a3
name   : engine

id : 66f33b1e-7bc8-44cf-9cca-9041b0e0dd15
name   : export

id : cc2c9765-6a3d-4281-8af8-c3526a81cfab
name   : iso

So there is something wrong with the "data_ssd" storage domain, 
apparently, as the identifier that can't be found corresponds to that 
storage domain. Can you try to retrieve that storage domain? Just use 
your browser to get the following URL:



https://yourovirt/ovirt-engine/api/storagedomains/23f8f1ae-a3ac-47bf-8223-5b5f7c29e508 



Also this, in case the problem is related to version 3 of the API:


https://yourovirt/ovirt-engine/api/v3/storagedomains/23f8f1ae-a3ac-47bf-8223-5b5f7c29e508 



Do they work?



Nope, 404 both v4 and v3 API, but if I go to the storagedomains/ root, I 
get completely different UUIDs listed there. For example, in the case of 
the "data_ssd" domain, the UUID is 7a28ea1a-df7e-4205-bb96-45ff2817f175


Why is the ovirt console showing a completely different UUID?

Anyway, I've replaced the storage domain UUID with the one that works 
with the REST API and something improved: now I don't get the 404 from 
ovirt and the machine is not deleted BUT:  I've added 2 disks (20GB and 
30GB) plus the base template 8Gb disk, and I get a VM with four (4) 8GB 
disks, and the bootable one is a random disk


I've attached the engine.log with the (I hope) relevant messages

Thanks


ovirt-engine-20170728.log.gz
Description: application/gzip
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt and Foreman

2017-07-28 Thread Juan Hernández

On 07/28/2017 09:34 AM, Davide Ferrari wrote:



On 27/07/17 11:17, Juan Hernández wrote:


Looks like the oVirt engine is rejecting the request to add the disk 
because some of the related entities doesn't exist. This is the 
relevant message in the engine log:


  2017-07-25 08:28:03,063Z ERROR 
[org.ovirt.engine.api.restapi.resource.AbstractBackendResource] 
(default task-51) [] Operation Failed: Entity not found: 
23f8f1ae-a3ac-47bf-8223-5b5f7c29e508


Would be nice if you can check the /var/log/httpd/ssl_access_log in 
the oVirt engine machine. There should be a line there with the 404 
HTTP status, something like this:


  POST /ovirt-engine/api/vms//disks 404

What is the exact content of that line? Is the VM id the one that 
appears in the above message.


Bingo, there's definitely a 404 error log at the same hour:

192.168.10.158 - - [25/Jul/2017:08:28:02 +] "POST 
/ovirt-engine/api/vms/896098c2-5895-42c3-a419-0c3a43b5ff8b/disks 
HTTP/1.1" 404 169


But the ID is different



Also, can you check what are the identifiers of the relevant data 
center and storage domains?




DC and storage UUID "should" be correct, I've copied them from the oVirt 
CLI output into my hammer command
These are the storage IDs for the datacenter where I'm trying to create 
the VM in:


[oVirt shell (connected)]# list glustervolumes --cluster-identifier 
0002-0002-0002-0002-0345


id : 23f8f1ae-a3ac-47bf-8223-5b5f7c29e508
name   : data_ssd

id : 6be35972-4720-4d34-b2b0-26ffc294f8a3
name   : engine

id : 66f33b1e-7bc8-44cf-9cca-9041b0e0dd15
name   : export

id : cc2c9765-6a3d-4281-8af8-c3526a81cfab
name   : iso

and this is the command line I'm using

hammer host create --architecture-id=1 --domain billy.preprod 
--operatingsystem-id=7 --hostgroup-title Billy/Preprod --name foo01 
--partition-table-id=192 --provision-method image --root-password 
billy12345 --compute-resource 'LeaseWeb VMs prod' --image CentOS_7.3 
--compute-attributes 
cluster=0002-0002-0002-0002-0345,cores=2,memory=4294967296,start=1 
--volume 
'"size_gb=20,storage_domain=23f8f1ae-a3ac-47bf-8223-5b5f7c29e508,bootable=0"' 
--volume 
'"size_gb=30,storage_domain=23f8f1ae-a3ac-47bf-8223-5b5f7c29e508,bootable=0"' 



So there is something wrong with the "data_ssd" storage domain, 
apparently, as the identifier that can't be found corresponds to that 
storage domain. Can you try to retrieve that storage domain? Just use 
your browser to get the following URL:



https://yourovirt/ovirt-engine/api/storagedomains/23f8f1ae-a3ac-47bf-8223-5b5f7c29e508

Also this, in case the problem is related to version 3 of the API:


https://yourovirt/ovirt-engine/api/v3/storagedomains/23f8f1ae-a3ac-47bf-8223-5b5f7c29e508

Do they work?




There should also be additional details in the 
/var/log/ovirt-engine/server.log file. Please check it.


Nope, no log with the same timestamp in server.log :/

Thanks for your kind help!



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt and Foreman

2017-07-28 Thread Davide Ferrari



On 27/07/17 11:17, Juan Hernández wrote:


Looks like the oVirt engine is rejecting the request to add the disk 
because some of the related entities doesn't exist. This is the 
relevant message in the engine log:


  2017-07-25 08:28:03,063Z ERROR 
[org.ovirt.engine.api.restapi.resource.AbstractBackendResource] 
(default task-51) [] Operation Failed: Entity not found: 
23f8f1ae-a3ac-47bf-8223-5b5f7c29e508


Would be nice if you can check the /var/log/httpd/ssl_access_log in 
the oVirt engine machine. There should be a line there with the 404 
HTTP status, something like this:


  POST /ovirt-engine/api/vms//disks 404

What is the exact content of that line? Is the VM id the one that 
appears in the above message.


Bingo, there's definitely a 404 error log at the same hour:

192.168.10.158 - - [25/Jul/2017:08:28:02 +] "POST 
/ovirt-engine/api/vms/896098c2-5895-42c3-a419-0c3a43b5ff8b/disks 
HTTP/1.1" 404 169


But the ID is different



Also, can you check what are the identifiers of the relevant data 
center and storage domains?




DC and storage UUID "should" be correct, I've copied them from the oVirt 
CLI output into my hammer command
These are the storage IDs for the datacenter where I'm trying to create 
the VM in:


[oVirt shell (connected)]# list glustervolumes --cluster-identifier 
0002-0002-0002-0002-0345


id : 23f8f1ae-a3ac-47bf-8223-5b5f7c29e508
name   : data_ssd

id : 6be35972-4720-4d34-b2b0-26ffc294f8a3
name   : engine

id : 66f33b1e-7bc8-44cf-9cca-9041b0e0dd15
name   : export

id : cc2c9765-6a3d-4281-8af8-c3526a81cfab
name   : iso

and this is the command line I'm using

hammer host create --architecture-id=1 --domain billy.preprod 
--operatingsystem-id=7 --hostgroup-title Billy/Preprod --name foo01 
--partition-table-id=192 --provision-method image --root-password 
billy12345 --compute-resource 'LeaseWeb VMs prod' --image CentOS_7.3 
--compute-attributes 
cluster=0002-0002-0002-0002-0345,cores=2,memory=4294967296,start=1 
--volume 
'"size_gb=20,storage_domain=23f8f1ae-a3ac-47bf-8223-5b5f7c29e508,bootable=0"' 
--volume 
'"size_gb=30,storage_domain=23f8f1ae-a3ac-47bf-8223-5b5f7c29e508,bootable=0"'



There should also be additional details in the 
/var/log/ovirt-engine/server.log file. Please check it.


Nope, no log with the same timestamp in server.log :/

Thanks for your kind help!

--
Davide
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt and Foreman

2017-07-27 Thread Juan Hernández

On 07/27/2017 09:46 AM, Davide Ferrari wrote:

On 25/07/17 10:59, Davide Ferrari wrote:


Hello

I've attached logs from:

- hammer cli (debug) with the command line I've used

- foreman logs

- ovirt engine logs (server.log)



Any idea about what might be happening?



Looks like the oVirt engine is rejecting the request to add the disk 
because some of the related entities doesn't exist. This is the relevant 
message in the engine log:


  2017-07-25 08:28:03,063Z ERROR 
[org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default 
task-51) [] Operation Failed: Entity not found: 
23f8f1ae-a3ac-47bf-8223-5b5f7c29e508


Would be nice if you can check the /var/log/httpd/ssl_access_log in the 
oVirt engine machine. There should be a line there with the 404 HTTP 
status, something like this:


  POST /ovirt-engine/api/vms//disks 404

What is the exact content of that line? Is the VM id the one that 
appears in the above message.


Also, can you check what are the identifiers of the relevant data center 
and storage domains?


There should also be additional details in the 
/var/log/ovirt-engine/server.log file. Please check it.

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt and Foreman

2017-07-27 Thread Davide Ferrari

On 25/07/17 10:59, Davide Ferrari wrote:


Hello

I've attached logs from:

- hammer cli (debug) with the command line I've used

- foreman logs

- ovirt engine logs (server.log)



Any idea about what might be happening?

--
Davide
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt and Foreman

2017-07-25 Thread Ivan Necas
Oved Ourfali  writes:

> CC-ing Ohad and Ivan from the Foreman team to take a look. 
>
> Also, by default, RHV 4.1 will use v4 of the api, so you have to use a URL in 
> Foreman that uses v3 (as Foreman doesn't support v4 yet).
>
> I assume that's not your issue, otherwise you would have encountered more 
> basic issues. 
>
> Also, can you please share your logs from both environments? 
>
> Ohad/Ivan, any clue? 
>
> Thanks, 
> Oved 
>
> On Jul 24, 2017 18:08, "Davide Ferrari"  wrote:
>
> Hello list
>
> is anybody successfully using oVirt + Foreman for VM creation + 
> provisioning?
>
> I'm using Foremn (latest version, 1.15.2) with latest oVirt version 
> (4.1.3) but I'm encountering several problem, especially related to disks. 
> For example:
>
> - cannot create a VM with multiple disks though Foreman CLI
> (hammer)

Could you send the hammer command you're using

>
> - if I create a multidisk VM from Foreman, the second disk always
> gets the "bootable" flag and not the primary image, making the VMs
> not bootable at all.

Are the compute profiles involved in the provisioning by any chance?

/CC to ori to have more pair of eyes to look at this.

-- Ivan

>
> Any other Foreman user sharing the pain here? Foramn's list is not so 
> useful so I'm trying to ask here. How do you programmatically create virtual 
> machines with oVirt and Foreman? Should I switch do
> directly using oVirt API?
>
> Thanks in advance
>
> Davide
>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt and Foreman

2017-07-25 Thread Davide Ferrari



On 25/07/17 12:19, Maton, Brett wrote:
Last time I looked at creating VM's from foreman there was a problem 
with the compute resource being passed from foreman plugin to the 
ovirt api.


Can't remember exactly what was being sent, but it didn't match any 
available ovirt 'instance type' which is why it was failing to create 
the machine.


Not sure if you're facing the same issue, but maybe worth looking into...

Well, actually I can create a VM both from Foreman UI and Hammer CLI, 
the problem arises when I'm trying to add more disks to that VM

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt and Foreman

2017-07-25 Thread Maton, Brett
Last time I looked at creating VM's from foreman there was a problem with
the compute resource being passed from foreman plugin to the ovirt api.

Can't remember exactly what was being sent, but it didn't match any
available ovirt 'instance type' which is why it was failing to create the
machine.

Not sure if you're facing the same issue, but maybe worth looking into...

On 25 July 2017 at 09:59, Davide Ferrari  wrote:

> Hello
>
> I've attached logs from:
>
> - hammer cli (debug) with the command line I've used
>
> - foreman logs
>
> - ovirt engine logs (server.log)
>
>
> Basically I was trying to create a VM from an ovirt template linked to a
> Foreman image (CentOS_73) which consists of a single disk with the OS, and
> attach via Hammer 2 more disks. In this case I get a 404 Resource Not Found
> from Foreman and what I see in the ovirt logs is that the VM is created and
> then immediately deleted via API
>
>
> Thanks!
>
> On 24/07/17 20:56, Oved Ourfali wrote:
>
> CC-ing Ohad and Ivan from the Foreman team to take a look.
>
> Also, by default, RHV 4.1 will use v4 of the api, so you have to use a URL
> in Foreman that uses v3 (as Foreman doesn't support v4 yet).
>
> I assume that's not your issue, otherwise you would have encountered more
> basic issues.
>
> Also, can you please share your logs from both environments?
>
> Ohad/Ivan, any clue?
>
> Thanks,
> Oved
>
> On Jul 24, 2017 18:08, "Davide Ferrari"  wrote:
>
> Hello list
>
>
> is anybody successfully using oVirt + Foreman for VM creation +
> provisioning?
>
> I'm using Foremn (latest version, 1.15.2) with latest oVirt version
> (4.1.3) but I'm encountering several problem, especially related to disks.
> For example:
>
> - cannot create a VM with multiple disks though Foreman CLI (hammer)
>
> - if I create a multidisk VM from Foreman, the second disk always gets the
> "bootable" flag and not the primary image, making the VMs not bootable at
> all.
>
>
> Any other Foreman user sharing the pain here? Foramn's list is not so
> useful so I'm trying to ask here. How do you programmatically create
> virtual machines with oVirt and Foreman? Should I switch do directly using
> oVirt API?
>
> Thanks in advance
>
> Davide
>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
>
>
>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt and Foreman

2017-07-25 Thread Davide Ferrari

Hello

I've attached logs from:

- hammer cli (debug) with the command line I've used

- foreman logs

- ovirt engine logs (server.log)


Basically I was trying to create a VM from an ovirt template linked to a 
Foreman image (CentOS_73) which consists of a single disk with the OS, 
and attach via Hammer 2 more disks. In this case I get a 404 Resource 
Not Found from Foreman and what I see in the ovirt logs is that the VM 
is created and then immediately deleted via API



Thanks!


On 24/07/17 20:56, Oved Ourfali wrote:

CC-ing Ohad and Ivan from the Foreman team to take a look.

Also, by default, RHV 4.1 will use v4 of the api, so you have to use a 
URL in Foreman that uses v3 (as Foreman doesn't support v4 yet).


I assume that's not your issue, otherwise you would have encountered 
more basic issues.


Also, can you please share your logs from both environments?

Ohad/Ivan, any clue?

Thanks,
Oved

On Jul 24, 2017 18:08, "Davide Ferrari" > wrote:


Hello list


is anybody successfully using oVirt + Foreman for VM creation +
provisioning?

I'm using Foremn (latest version, 1.15.2) with latest oVirt
version (4.1.3) but I'm encountering several problem, especially
related to disks. For example:

- cannot create a VM with multiple disks though Foreman CLI (hammer)

- if I create a multidisk VM from Foreman, the second disk always
gets the "bootable" flag and not the primary image, making the VMs
not bootable at all.


Any other Foreman user sharing the pain here? Foramn's list is not
so useful so I'm trying to ask here. How do you programmatically
create virtual machines with oVirt and Foreman? Should I switch do
directly using oVirt API?

Thanks in advance

Davide

___
Users mailing list
Users@ovirt.org 
http://lists.ovirt.org/mailman/listinfo/users







hammer-ovirt-logs.tar.gz
Description: application/gzip
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt and Foreman

2017-07-24 Thread Oved Ourfali
CC-ing Ohad and Ivan from the Foreman team to take a look.

Also, by default, RHV 4.1 will use v4 of the api, so you have to use a URL
in Foreman that uses v3 (as Foreman doesn't support v4 yet).

I assume that's not your issue, otherwise you would have encountered more
basic issues.

Also, can you please share your logs from both environments?

Ohad/Ivan, any clue?

Thanks,
Oved

On Jul 24, 2017 18:08, "Davide Ferrari"  wrote:

Hello list


is anybody successfully using oVirt + Foreman for VM creation +
provisioning?

I'm using Foremn (latest version, 1.15.2) with latest oVirt version (4.1.3)
but I'm encountering several problem, especially related to disks. For
example:

- cannot create a VM with multiple disks though Foreman CLI (hammer)

- if I create a multidisk VM from Foreman, the second disk always gets the
"bootable" flag and not the primary image, making the VMs not bootable at
all.


Any other Foreman user sharing the pain here? Foramn's list is not so
useful so I'm trying to ask here. How do you programmatically create
virtual machines with oVirt and Foreman? Should I switch do directly using
oVirt API?

Thanks in advance

Davide

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] oVirt and Foreman

2017-07-24 Thread Davide Ferrari

Hello list


is anybody successfully using oVirt + Foreman for VM creation + 
provisioning?


I'm using Foremn (latest version, 1.15.2) with latest oVirt version 
(4.1.3) but I'm encountering several problem, especially related to 
disks. For example:


- cannot create a VM with multiple disks though Foreman CLI (hammer)

- if I create a multidisk VM from Foreman, the second disk always gets 
the "bootable" flag and not the primary image, making the VMs not 
bootable at all.



Any other Foreman user sharing the pain here? Foramn's list is not so 
useful so I'm trying to ask here. How do you programmatically create 
virtual machines with oVirt and Foreman? Should I switch do directly 
using oVirt API?


Thanks in advance

Davide

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt 4 + Foreman

2016-09-13 Thread Arsène Gschwind

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 :
>
> 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: aaa0--00

>
> 00--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: aaa0----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 
 wrote:

>>>
>>> Adding Yaniv ...
>>>
>>> On Wed, Aug 17, 2016 at 9:16 AM, Arsène Gschwind 
 wrote:


 Hi,

 Thanks a lot this did work on the Foreman side using 
https:///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,
>>
>> 

Re: [ovirt-users] oVirt 4 + Foreman

2016-09-08 Thread Arsène Gschwind

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: aaa0--00

00--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: aaa0----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.

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 > wrote:


Adding Yaniv ...

On Wed, Aug 17, 2016 at 9:16 AM, Arsène Gschwind
> wrote:

Hi,

Thanks a lot this did work on the Foreman side using
https:///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 

Re: [ovirt-users] oVirt 4 + Foreman

2016-08-22 Thread Oved Ourfali
Can you please attach the complete logs of ovirt and foreman?


On Wed, Aug 17, 2016 at 10:25 AM, Martin Perina  wrote:

> Adding Yaniv ...
>
> On Wed, Aug 17, 2016 at 9:16 AM, Arsène Gschwind <
> arsene.gschw...@unibas.ch> wrote:
>
>> Hi,
>>
>> Thanks a lot this did work on the Foreman side using https://
>> /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@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
>
>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt 4 + Foreman

2016-08-17 Thread Martin Perina
Adding Yaniv ...

On Wed, Aug 17, 2016 at 9:16 AM, Arsène Gschwind 
wrote:

> Hi,
>
> Thanks a lot this did work on the Foreman side using https://
> /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@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt 4 + Foreman

2016-08-17 Thread Arsène Gschwind

Hi,

Thanks a lot this did work on the Foreman side using 
https:///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@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt 4 + Foreman

2016-08-16 Thread Juan Hernández
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?

-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users