Re: [ovirt-users] Postgres errors after updating to 9.5.7 from 9.5.4

2017-05-24 Thread Fabrice Bacchella
In /etc/yum.repos.d/pgdg-94-centos.repo, I added :

[pgdg94]
...
exclude=postgresql-jdbc


> Le 23 mai 2017 à 23:06, supp...@jac-properties.com a écrit :
> 
> Wow, that looks almost exactly like what we're seeing.
> 
> Unfortunately, downgrading from postgresql-jdbc-42.1.1 to 42.0.0, restarting 
> ovirt-engine and rerunning engine-setup produces the same error messages.
> 
> Logan
> 
>> On May 23, 2017 at 3:39 PM Yedidyah Bar David  wrote:
>> 
>> 
>> On Tue, May 23, 2017 at 11:19 PM, Logan Kuhn  
>> wrote:
>>> Hi
>>> 
>>> We recently upgraded from postgres 9.5.4 to 9.5.6 and then to 9.5.7.  We
>>> restarted ovirt-engine between 9.5.4 and it worked as expected.  After we
>>> updated to 9.5.7 we have started to get postgres errors in engine.log and a
>>> 404 error in the browser when we try to start ovirt-engine.
>>> 
>>> Updates were done on client and server to keep them in sync.
>>> 
>>> The error is complaining about a missing function, but we can verify that
>>> the function exists in the database.  We've also restored engine and
>>> ovirt_engine_history from a backup at 8am this morning when it was working
>>> and before we upgraded to 9.5.7 with no apparent help and run engine-setup
>>> afterwards, still no luck.
>>> 
>>> 2017-05-23 15:07:48,418 INFO  [org.ovirt.engine.core.dal.dbbroker.DbFacade]
>>> (ServerService Thread Pool -- 51) [] Initializing the DbFacade
>>> 2017-05-23 15:07:48,480 INFO  [org.ovirt.engine.core.bll.Backend]
>>> (ServerService Thread Pool -- 51) [] Start initializing Backend
>>> 2017-05-23 15:07:48,502 ERROR
>>> [org.ovirt.engine.core.bll.network.macpool.MacPoolPerDc] (ServerService
>>> Thread Pool -- 46) [] Error initializing: PreparedStatementCallback; bad SQL
>>> grammar [select * from  getallmacpoolrangesbymacpoolid()]; nested exception
>>> is org.postgresql.util.PSQL
>>> Exception: ERROR: function getallmacpoolrangesbymacpoolid() does not exist
>>> Hint: No function matches the given name and argument types. You might need
>>> to add explicit type casts.
>>> Position: 16
>>> 2017-05-23 15:07:48,517 ERROR [org.ovirt.engine.core.bll.Backend]
>>> (ServerService Thread Pool -- 51) [] Error during initialization:
>>> org.jboss.weld.exceptions.WeldException: WELD-49: Unable to invoke
>>> public void
>>> org.ovirt.engine.core.bll.hostedengine.PreviousHostedEngineHost.cre
>>> ate() on
>>> org.ovirt.engine.core.bll.hostedengine.PreviousHostedEngineHost@3a35f461
>>>   at
>>> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:100)
>>> [weld-core-impl-2.3.5.Final.jar:2.3.5.Final]
>>>   at
>>> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:81)
>>> [weld-core-impl-2.3.5.Final.jar:2.3.5.Final]
>>>   at
>>> org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:126)
>>> [weld-core-impl-2.3.5.Final.jar:2.3.5.Final]
>>>   at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:162)
>>> [weld-core-impl-2.3.5.Final.jar:2.3.5.Final]
>>>   at
>>> org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
>>> [weld-core-impl-2.3.5.Final.jar:2.3.5.Final]
>>>   at
>>> org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
>>> [weld-core-impl-2.3.5.Final.jar:2.3.5.Final]
>>>   at
>>> org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
>>> [weld-core-impl-2.3.5.Final.jar:2.3.5.Final]
>>>   at
>>> org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
>>> [weld-core-impl-2.3.5.Final.jar:2.3.5.Final]
>>>   at
>>> org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742)
>>> [weld-core-impl-2.3.5.Final.jar:2.3.5.Final]
>>>   at
>>> org.jboss.weld.bean.builtin.InstanceImpl.getBeanInstance(InstanceImpl.java:189)
>>> [weld-core-impl-2.3.5.Final.jar:2.3.5.Final]
>>>   at
>>> org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:100)
>>> [weld-core-impl-2.3.5.Final.jar:2.3.5.Final]
>>>   at org.ovirt.engine.core.bll.Backend.loadService(Backend.java:301)
>>> [bll.jar:]
>>>   at org.ovirt.engine.core.bll.Backend.initialize(Backend.java:212)
>>> [bll.jar:]
>>>   at org.ovirt.engine.core.bll.Backend.create(Backend.java:159)
>>> [bll.jar:]
>>>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> [rt.jar:1.8.0_131]
>>>   at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>> [rt.jar:1.8.0_131]
>>>   at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> [rt.jar:1.8.0_131]
>>>   at java.lang.reflect.Method.invoke(Method.java:498)
>>> [rt.jar:1.8.0_131]
>>>   at
>>> 

[ovirt-users] vm migration failure and jobs

2017-05-17 Thread Fabrice Bacchella
I'm switching a host to maintenance state and it's failing because of problem 
migrating one of it's VM.

I'm listing the current jobs running in ovirt and getting that list:
$ ./ovcmd job list -t '{id!s} {description!s} {start_time!s}'
00ebb251-2229-4178-82cd-dff421de96ea Moving Host nb0104 to Maintenance 
2017-05-17 12:48:59.598000+02:00
fb83ab93-0455-4cde-a93f-3a43b7346ef9 Moving Host nb0104 to Maintenance 
2017-05-17 12:43:56.902000+02:00
f9b85fd3-5ef4-4b16-8472-3dc4119880d1 Moving Host nb0104 to Maintenance 
2017-05-17 12:38:53.918000+02:00
9c7b8799-56e7-480a-9066-9dde49eebda6 Moving Host nb0104 to Maintenance 
2017-05-17 12:33:50.689000+02:00
f6afaf10-1676-4573-91af-170f80a0a67e Moving Host nb0104 to Maintenance 
2017-05-17 12:28:48.602000+02:00
f32c55b4-ec62-49ca-84e6-70ac7922895c Moving Host nb0104 to Maintenance 
2017-05-17 12:23:46.118000+02:00
b7443f5f-21f3-4ed7-8230-00e772e6b678 Moving Host nb0104 to Maintenance 
2017-05-17 12:18:43.86+02:00
5c57a6e9-05f9-434d-a581-748638b601a8 Moving Host nb0104 to Maintenance 
2017-05-17 12:13:41.558000+02:00
3a499570-d4c1-4d7e-a5bb-d487e19c8dc9 Moving Host nb0104 to Maintenance 
2017-05-17 12:08:39.96+02:00
03d2202f-f884-4fb0-95e7-f78733c93265 Moving Host nb0104 to Maintenance 
2017-05-17 12:03:34.449000+02:00
f246eafd-c1d0-4e9e-b87c-962f9a494b97 Moving Host nb0104 to Maintenance 
2017-05-17 11:58:29.952000+02:00
904c932b-e695-4b8b-b975-8148e5800992 Moving Host nb0104 to Maintenance 
2017-05-17 11:53:27.592000+02:00
6dd2dce7-9b82-47b0-a39c-ff7e90e6c6ef Moving Host nb0104 to Maintenance 
2017-05-17 11:48:24.683000+02:00
69ea38e4-5b22-4c3a-8650-71c1ca059801 Moving Host nb0104 to Maintenance 
2017-05-17 11:43:20.137000+02:00
a321ab67-ae12-44e0-a787-75bd818c6821 Moving Host nb0104 to Maintenance 
2017-05-17 11:38:18.115000+02:00
ffd29e6f-51f5-4da4-a8c1-e027431377e2 Moving Host nb0104 to Maintenance 
2017-05-17 11:33:15.927000+02:00
3c7a07d4-8136-4309-ae47-3b35a77b206a Moving Host nb0104 to Maintenance 
2017-05-17 11:28:11.985000+02:00
a5f50eed-35d3-46e7-af2b-684bae7e918f Moving Host nb0104 to Maintenance 
2017-05-17 11:23:09.829000+02:00
d307dd44-e1c1-4fd1-9471-1602f0aef541 Moving Host nb0104 to Maintenance 
2017-05-17 11:18:06.736000+02:00
ad56ebec-9c12-4b2c-91a3-5043d76257c9 Moving Host nb0104 to Maintenance 
2017-05-17 11:13:02.169000+02:00
1f2debf4-15a3-483e-be66-2afff331a83b Moving Host nb0104 to Maintenance 
2017-05-17 11:07:59.661000+02:00
 
So each failed job launch a new one but don't terminate.

Is that an expected situation ?___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] terminating sessions

2017-05-17 Thread Fabrice Bacchella
I'm back with a long list of sessions, many of them started since many days. 
How can I get informations about them ?

> Le 3 mai 2017 à 18:52, Fabrice Bacchella <fabrice.bacche...@orange.fr> a 
> écrit :
> 
> In the UI, I see 73 open sessions, all open by me.
> 
> In ovirt logs, I see a lot of :
> 2017-05-03 18:49:31,483+02 INFO  
> [org.ovirt.engine.core.bll.aaa.SessionDataContainer] 
> (DefaultQuartzScheduler3) [dcf02fc4-72c3-4237-8855-d4e474766088] Not removing 
> session 
> 'B/GWJOxyLh3pXQPPitfCk29iiJ3XWMerYdNmOdZyc9ceqD+oAW/hhhZDXCltK+N4yRo9TgunhGR7w7YEELOI5A==',
>  session has running commands for user ''.
> 
> And indeed I can't close those sessions in the UI.
> 
> 
> I have two questions:
> 
> Are those sessions accessible using the API ?
> How to know what running command is waiting ?
> 
> 
> ___
> 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] searching users and field mapping

2017-05-12 Thread Fabrice Bacchella
When I export a user I find values like:

  
  
39323336363566612D37622D346532612D396530632D316630396536643634636432
  
  
  admin
  *
  admin
  admin@internal-authz
  
internal-authz
  
  
  
  
  

They are the same that one defined from the type in sdk 
(http://ovirt.github.io/ovirt-engine-sdk/master/types.m.html#ovirtsdk4.types.User).

If I look in 
http://www.ovirt.org/documentation/admin-guide/appe-Using_Search_Bookmarks_and_Tags/,
 I see fields like pool, group that I don't map to fields in the type.

In the search bar in the UI, I also see fields like login, directory or type. 
The mapping is less obvious, even if I can guess that login maps to principal.

But I wonder why such name discrepancy exists and if they are documented 
somewhere.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] slow kerberos authentication

2017-05-12 Thread Fabrice Bacchella
It works much better now. Goes from 6s to less than 500ms. Not blazing fast but 
much more usable, thanks a lot.

> Le 12 mai 2017 à 15:58, Ondra Machacek <omach...@redhat.com> a écrit :
> 
> This is new feature in aaa-ldap tracked here[1].
> By default for AD profiles we use this feature, and it should
> increase performance in most cases.
> 
> But if this is not the case for you, can you just try to change the profile
> from:
> 
>  include = 
> 
> to
> 
>  include = 
> 
> And see if it will be better?
> 
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1393407 
> <https://bugzilla.redhat.com/show_bug.cgi?id=1393407>
> 
> On Fri, May 12, 2017 at 2:54 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> I found that:
> 
> http://dunnry.com/blog/TransitiveLinkValueFilterEvaluation.aspx 
> <http://dunnry.com/blog/TransitiveLinkValueFilterEvaluation.aspx>
> 
> 
>> Le 12 mai 2017 à 14:44, Fabrice Bacchella <fabrice.bacche...@orange.fr 
>> <mailto:fabrice.bacche...@orange.fr>> a écrit :
>> 
>> Ok, I found where it's slow, it's a ldapsearch on our AD:
>> 
>> time ldapsearch -a never -E pr=100/noprompt -H ldap://ad1 <> -b DC=... -s 
>> sub '(&(groupType:1.2.840.113556.1.4.803:=2147483648 
>> <tel:(214)%20748-3648>)(&(objectCategory=group)(member:1.2.840.113556.1.4.1941:=userdn)))'
>>  objectGUID name description
>> 
>> # numResponses: 70
>> # numEntries: 66
>> # numReferences: 3
>> 
>> real 0m10.801s
>> user 0m0.007s
>> sys  0m0.012s
>> 
>> That matches the log line:
>> 2017-05-12 14:22:17,413+02 DEBUG 
>> [org.ovirt.engineextensions.aaa.ldap.Framework] (pool-25-thread-2) [] 
>> Performing SearchRequest 'SearchRequest(baseDN='...', scope=SUB, 
>> deref=NEVER, sizeLimit=0, timeLimit=0, 
>> filter='&(objectCategory=group)(groupType:1.2.840.113556.1.4.803:=2147483648)(member:1.2.840.113556.1.4.1941:=...)',
>>  attrs={objectGUID, name, description}, 
>> controls={SimplePagedResultsControl(pageSize=100, isCritical=false)})' 
>> request on server '...'
>> 2017-05-12 14:22:24,456+02 DEBUG 
>> [org.ovirt.engineextensions.aaa.ldap.Framework] (pool-25-thread-1) [] 
>> SearchResult: SearchResult(resultCode=0 (success), messageID=3, 
>> entriesReturned=66, referencesReturned=0, 
>> responseControls={SimplePagedResultsControl(pageSize=0, isCritical=false)})
>> 
>> 
>> And without 1.2.840.113556.1.4.1941
>> 
>> # numResponses: 54
>> # numEntries: 50
>> # numReferences: 3
>> 
>> real 0m0.051s
>> user 0m0.008s
>> sys  0m0.007s
>> 
>> So it's an AD problem. 1.2.840.113556.1.4.1941 make it slow, but without it, 
>> the result is not the same. But I don't know if it's an AD or ovirt problem. 
>> I'll keep investigating.
>> 
>> Thank's for your help.
>> ___
>> Users mailing list
>> Users@ovirt.org <mailto:Users@ovirt.org>
>> http://lists.ovirt.org/mailman/listinfo/users 
>> <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] slow kerberos authentication

2017-05-12 Thread Fabrice Bacchella
I found that:

http://dunnry.com/blog/TransitiveLinkValueFilterEvaluation.aspx


> Le 12 mai 2017 à 14:44, Fabrice Bacchella <fabrice.bacche...@orange.fr> a 
> écrit :
> 
> Ok, I found where it's slow, it's a ldapsearch on our AD:
> 
> time ldapsearch -a never -E pr=100/noprompt -H ldap://ad1 <ldap://ad1> -b 
> DC=... -s sub 
> '(&(groupType:1.2.840.113556.1.4.803:=2147483648)(&(objectCategory=group)(member:1.2.840.113556.1.4.1941:=userdn)))'
>  objectGUID name description
> 
> # numResponses: 70
> # numEntries: 66
> # numReferences: 3
> 
> real  0m10.801s
> user  0m0.007s
> sys   0m0.012s
> 
> That matches the log line:
> 2017-05-12 14:22:17,413+02 DEBUG 
> [org.ovirt.engineextensions.aaa.ldap.Framework] (pool-25-thread-2) [] 
> Performing SearchRequest 'SearchRequest(baseDN='...', scope=SUB, deref=NEVER, 
> sizeLimit=0, timeLimit=0, 
> filter='&(objectCategory=group)(groupType:1.2.840.113556.1.4.803:=2147483648)(member:1.2.840.113556.1.4.1941:=...)',
>  attrs={objectGUID, name, description}, 
> controls={SimplePagedResultsControl(pageSize=100, isCritical=false)})' 
> request on server '...'
> 2017-05-12 14:22:24,456+02 DEBUG 
> [org.ovirt.engineextensions.aaa.ldap.Framework] (pool-25-thread-1) [] 
> SearchResult: SearchResult(resultCode=0 (success), messageID=3, 
> entriesReturned=66, referencesReturned=0, 
> responseControls={SimplePagedResultsControl(pageSize=0, isCritical=false)})
> 
> 
> And without 1.2.840.113556.1.4.1941
> 
> # numResponses: 54
> # numEntries: 50
> # numReferences: 3
> 
> real  0m0.051s
> user  0m0.008s
> sys   0m0.007s
> 
> So it's an AD problem. 1.2.840.113556.1.4.1941 make it slow, but without it, 
> the result is not the same. But I don't know if it's an AD or ovirt problem. 
> I'll keep investigating.
> 
> Thank's for your help.
> ___
> 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] slow kerberos authentication

2017-05-12 Thread Fabrice Bacchella
Ok, I found where it's slow, it's a ldapsearch on our AD:

time ldapsearch -a never -E pr=100/noprompt -H ldap://ad1 -b DC=... -s sub 
'(&(groupType:1.2.840.113556.1.4.803:=2147483648)(&(objectCategory=group)(member:1.2.840.113556.1.4.1941:=userdn)))'
 objectGUID name description

# numResponses: 70
# numEntries: 66
# numReferences: 3

real0m10.801s
user0m0.007s
sys 0m0.012s

That matches the log line:
2017-05-12 14:22:17,413+02 DEBUG 
[org.ovirt.engineextensions.aaa.ldap.Framework] (pool-25-thread-2) [] 
Performing SearchRequest 'SearchRequest(baseDN='...', scope=SUB, deref=NEVER, 
sizeLimit=0, timeLimit=0, 
filter='&(objectCategory=group)(groupType:1.2.840.113556.1.4.803:=2147483648)(member:1.2.840.113556.1.4.1941:=...)',
 attrs={objectGUID, name, description}, 
controls={SimplePagedResultsControl(pageSize=100, isCritical=false)})' request 
on server '...'
2017-05-12 14:22:24,456+02 DEBUG 
[org.ovirt.engineextensions.aaa.ldap.Framework] (pool-25-thread-1) [] 
SearchResult: SearchResult(resultCode=0 (success), messageID=3, 
entriesReturned=66, referencesReturned=0, 
responseControls={SimplePagedResultsControl(pageSize=0, isCritical=false)})


And without 1.2.840.113556.1.4.1941

# numResponses: 54
# numEntries: 50
# numReferences: 3

real0m0.051s
user0m0.008s
sys 0m0.007s

So it's an AD problem. 1.2.840.113556.1.4.1941 make it slow, but without it, 
the result is not the same. But I don't know if it's an AD or ovirt problem. 
I'll keep investigating.

Thank's for your help.___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] slow kerberos authentication

2017-05-12 Thread Fabrice Bacchella

> Le 12 mai 2017 à 13:35, Ondra Machacek <omach...@redhat.com> a écrit :
> 
> 
> 
> On Fri, May 12, 2017 at 1:18 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> The request is indeed quite slow within ovirt, using the setup given by Juan:
> 
> /ovirt-engine/sso/oauth/token-http-auth 7001ms
> 
> I was not able to authenticate jboss-cli.sh, I don't know why: 
> 'admin@internal-authz': No valid profile found in credentials.
> 
> It should be admin@internal.
>  

Indeed, but an export don't show that:


  
  
39323336363566612D37622D346532612D396530632D316630396536643634636432
  
  
  admin
  *
  admin
  admin@internal-authz
  
internal-authz
  
  
  
  
  



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


Re: [ovirt-users] slow kerberos authentication

2017-05-12 Thread Fabrice Bacchella
The request is indeed quite slow within ovirt, using the setup given by Juan:

/ovirt-engine/sso/oauth/token-http-auth 7001ms

I was not able to authenticate jboss-cli.sh, I don't know why: 
'admin@internal-authz': No valid profile found in credentials.

So I tried to modifie 
usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine-logging.properties.in,
 adding:
org.ovirt.engineextensions.aaa=ALL
org.ovirt.engine.core.bll.aaa=ALL
and then restart ovirt-engine. But that changed nothing. That's not the good 
syntax ?




> Le 12 mai 2017 à 09:25, Ondra Machacek <omach...@redhat.com> a écrit :
> 
> I am not aware of anything, but debug log of all aaa stuff would help,
> to understand what takes the most time.
> 
>  - org.ovirt.engineextensions.aaa.ldap
>  - org.ovirt.engineextensions.aaa.misc
>  - org.ovirt.engine.core.aaa
>  - org.ovirt.engine.core.sso
> 
> To enable it in runtime, please follow:
> 
>  
> https://github.com/oVirt/ovirt-engine-extension-aaa-ldap/blob/master/README#L469
> 
> On Thu, May 11, 2017 at 7:24 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr> wrote:
> I'm using kerberos authentication in ovirt for the URL 
> /sso/oauth/token-http-auth, but kerberos is done in Apache using 
> auth_gssapi_module and it's quite slow, about 6s for a request.
> 
> I'm trying to understand if it's apache or ovirt-engine that are slow. Is 
> there a way to get response time metered for http requests inside ovirt 
> instead of seen from apache ?
> 
> ___
> 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] slow kerberos authentication

2017-05-11 Thread Fabrice Bacchella
I'm using kerberos authentication in ovirt for the URL 
/sso/oauth/token-http-auth, but kerberos is done in Apache using 
auth_gssapi_module and it's quite slow, about 6s for a request.

I'm trying to understand if it's apache or ovirt-engine that are slow. Is there 
a way to get response time metered for http requests inside ovirt instead of 
seen from apache ?

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


Re: [ovirt-users] do we need some documentation mainteiners?

2017-05-10 Thread Fabrice Bacchella
I'm might be saying things in a harsh way, but there is a real big problem with 
public documentation at ovirt, especially the latest python sdk.

I'm coding a python wrapper around the sdk4 and fighting a lot with 
documentation. 

First I tried to google:
ovirt python sdk4
ovirt python sdk 4
ovirt rest api 4

I was finally given http://ovirt.github.io/ovirt-engine-sdk/master, but 
http://ovirt.github.io returns a 404, the sdk is hidden under 
http://ovirt.github.io/ovirt-engine-sdk/, a mini-site that is barely usable, as 
it very hard to navigate between page. For example, when you're at : 
http://ovirt.github.io/ovirt-engine-sdk/master/version.m.html, how do you go to 
the first page ?

If I try to gogle the title of this page, I found 
http://www.ovirt.org/develop/release-management/features/infra/python-sdk/ as 
first result and it's even not in the first page of results .

Or you can have a look at 
https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html-single/python_sdk_guide/,
 that talks only about v3 sdk, which is deprecated.

The python sdk change log:
http://www.ovirt.org/develop/sdk/python-sdk-changelog/

At pypi, no links to the sdk documentation
https://pypi.python.org/pypi/ovirt-engine-sdk-python

I requested the events codes, I was given that:
https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java#L726

Is there a formal list somewhere ?

> Le 10 mai 2017 à 08:21, Oved Ourfali <oourf...@redhat.com> a écrit :
> 
> 
> 
> On Tue, May 9, 2017 at 11:46 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> I'm whining because ovirt is a wonderful product, peoples behind are nice, 
> but ho boy, what about the execution !
> 
> 
> I couldn't agree more with James here.
> It is good to whine, complain, and seek for improvements. We all want a 
> better project!
> However, there are pleasant ways to express your thoughts and concerns. You 
> seem to choose unpleasant ones, which are also unproductive and insulting to 
> others.
> That can result in people not taking your thoughts and concerns in a serious 
> way, as it is just unpleasant for them to read and reply to.
> I remember someone already sent you the community code of conduct [1]. I 
> suggest you read that again before sharing your next post with us.
> 
> Oved
>  
> [1] https://www.ovirt.org/community/about/community-guidelines/ 
> <https://www.ovirt.org/community/about/community-guidelines/>
> 
> And no I have done much more than empty complains as I have open my share a 
> bug report, written a blog entry about using ovirt+kerberos+SSO, written a 
> full fledged CLI and trying to finished the SDK. So I'm not just complaining.
> 
>> Le 9 mai 2017 à 22:28, James Michels <karma.sometimes.hu...@gmail.com 
>> <mailto:karma.sometimes.hu...@gmail.com>> a écrit :
>> 
>> Seriously, what's wrong with you? I've being reading your comments for some 
>> time and the only things I see are whining, unproductive complaining and 
>> disrespectful comments.
>> 
>> Please, stop it. There are tons of ways to say something, and the way you 
>> use is insulting for dozens of people developing this project. Most people 
>> here are seeking help and/or trying to be useful aiding others in what they 
>> can. If you don't like oVirt or you have that much complains maybe you 
>> should start your project yourself and do things like you consider they 
>> should be done.
>> 
>> James
>> 
>> 2017-05-09 15:59 GMT+01:00 Fabrice Bacchella <fabrice.bacche...@orange.fr 
>> <mailto:fabrice.bacche...@orange.fr>>:
>> The documentation is alway a good laugh at ovirt. Look for RHEL instead.
>> 
>>> Le 9 mai 2017 à 16:13, Juan Pablo <pablo.localh...@gmail.com 
>>> <mailto:pablo.localh...@gmail.com>> a écrit :
>>> 
>>> Team, Is just me or the documentation pages are not being updated ? many 
>>> are outdated.. how can we collaborate? 
>>> 
>>> whats up with http://www.ovirt.org/documentation/admin-guide/ 
>>> <http://www.ovirt.org/documentation/admin-guide/> ?
>>> 
>>> regards,
>>> JP
>>> ___
>>> Users mailing list
>>> Users@ovirt.org <mailto:Users@ovirt.org>
>>> http://lists.ovirt.org/mailman/listinfo/users 
>>> <http://lists.ovirt.org/mailman/listinfo/users>
>> 
>> 
>> ___
>> Users mailing list
>> Users@ovirt.org <mailto:Users@ovirt.org>
>> http://lists.ovirt.org/mai

Re: [ovirt-users] do we need some documentation mainteiners?

2017-05-09 Thread Fabrice Bacchella
I'm whining because ovirt is a wonderful product, peoples behind are nice, but 
ho boy, what about the execution !

And no I have done much more than empty complains as I have open my share a bug 
report, written a blog entry about using ovirt+kerberos+SSO, written a full 
fledged CLI and trying to finished the SDK. So I'm not just complaining.

> Le 9 mai 2017 à 22:28, James Michels <karma.sometimes.hu...@gmail.com> a 
> écrit :
> 
> Seriously, what's wrong with you? I've being reading your comments for some 
> time and the only things I see are whining, unproductive complaining and 
> disrespectful comments.
> 
> Please, stop it. There are tons of ways to say something, and the way you use 
> is insulting for dozens of people developing this project. Most people here 
> are seeking help and/or trying to be useful aiding others in what they can. 
> If you don't like oVirt or you have that much complains maybe you should 
> start your project yourself and do things like you consider they should be 
> done.
> 
> James
> 
> 2017-05-09 15:59 GMT+01:00 Fabrice Bacchella <fabrice.bacche...@orange.fr 
> <mailto:fabrice.bacche...@orange.fr>>:
> The documentation is alway a good laugh at ovirt. Look for RHEL instead.
> 
>> Le 9 mai 2017 à 16:13, Juan Pablo <pablo.localh...@gmail.com 
>> <mailto:pablo.localh...@gmail.com>> a écrit :
>> 
>> Team, Is just me or the documentation pages are not being updated ? many are 
>> outdated.. how can we collaborate? 
>> 
>> whats up with http://www.ovirt.org/documentation/admin-guide/ 
>> <http://www.ovirt.org/documentation/admin-guide/> ?
>> 
>> regards,
>> JP
>> ___
>> Users mailing list
>> Users@ovirt.org <mailto:Users@ovirt.org>
>> http://lists.ovirt.org/mailman/listinfo/users 
>> <http://lists.ovirt.org/mailman/listinfo/users>
> 
> 
> ___
> Users mailing list
> Users@ovirt.org <mailto:Users@ovirt.org>
> http://lists.ovirt.org/mailman/listinfo/users 
> <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] do we need some documentation mainteiners?

2017-05-09 Thread Fabrice Bacchella
The documentation is alway a good laugh at ovirt. Look for RHEL instead.

> Le 9 mai 2017 à 16:13, Juan Pablo  a écrit :
> 
> Team, Is just me or the documentation pages are not being updated ? many are 
> outdated.. how can we collaborate? 
> 
> whats up with http://www.ovirt.org/documentation/admin-guide/ 
>  ?
> 
> regards,
> JP
> ___
> 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] Anyone running Shared SAS hosted engine ?

2017-05-09 Thread Fabrice Bacchella

> Le 9 mai 2017 à 12:06, Gary Lloyd  a écrit :
> 
> Hi
> 
> I was just wondering if anyone is running Ovirt using a shared SAS array with 
> the ability to live migrate between hosts ?

Yes, I have, every things run fine.

> If so has anyone been able to get hosted engine working with it ?

I don't use the hosted engine.


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


Re: [ovirt-users] GET /storagedomains broken ?

2017-05-09 Thread Fabrice Bacchella
https://www.dropbox.com/s/0vw8pvm99dpnq0a/ovirtlogs.tar.gz?dl=0



I opened a bug as https://bugzilla.redhat.com/show_bug.cgi?id=1448399



> Le 4 mai 2017 à 17:10, Fabrice Bacchella <fabrice.bacche...@orange.fr> a 
> écrit :
> 
> I'm playing with the python sdk and getting :
> 
> [2017-05-04 17:01:17] 192.168.205.36 "ovirt.XXX" "GET 
> /ovirt-engine/api/storagedomains HTTP/1.1" 292250 404 + 188 "-" 
> "PythonSDK/4.1.3"
> 
> And in engine.log:
> 
> 2017-05-04 17:01:17,727+02 ERROR 
> [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default 
> task-21) [] Operation Failed: Entity not found: Storage server connection: 
> id=6860d96f-557e-4d82-a209-401d72bd6e16
> 
> But in the documentation from 
> https://ovirt.prod.exalead.com/ovirt-engine/apidoc/#requests, I indeed see:
> 
> GET /storagedomains
> 
> The ovirt's version I use:
> 
>  oVirt Engine
>  ovirt.org
>  
>1
>4.1.1.8-1.el7.centos
>4
>1
>0
>  
> 
> 
> 
> Is there something obvious I missed ?
> ___
> 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] GET /storagedomains broken ?

2017-05-04 Thread Fabrice Bacchella
I'm playing with the python sdk and getting :

[2017-05-04 17:01:17] 192.168.205.36 "ovirt.XXX" "GET 
/ovirt-engine/api/storagedomains HTTP/1.1" 292250 404 + 188 "-" 
"PythonSDK/4.1.3"

And in engine.log:

2017-05-04 17:01:17,727+02 ERROR 
[org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default 
task-21) [] Operation Failed: Entity not found: Storage server connection: 
id=6860d96f-557e-4d82-a209-401d72bd6e16

But in the documentation from 
https://ovirt.prod.exalead.com/ovirt-engine/apidoc/#requests, I indeed see:

GET /storagedomains

The ovirt's version I use:

  oVirt Engine
  ovirt.org
  
1
4.1.1.8-1.el7.centos
4
1
0
  



Is there something obvious I missed ?
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] terminating sessions

2017-05-03 Thread Fabrice Bacchella
In the UI, I see 73 open sessions, all open by me.

In ovirt logs, I see a lot of :
2017-05-03 18:49:31,483+02 INFO  
[org.ovirt.engine.core.bll.aaa.SessionDataContainer] (DefaultQuartzScheduler3) 
[dcf02fc4-72c3-4237-8855-d4e474766088] Not removing session 
'B/GWJOxyLh3pXQPPitfCk29iiJ3XWMerYdNmOdZyc9ceqD+oAW/hhhZDXCltK+N4yRo9TgunhGR7w7YEELOI5A==',
 session has running commands for user ''.

And indeed I can't close those sessions in the UI.


I have two questions:

Are those sessions accessible using the API ?
How to know what running command is waiting ?


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


Re: [ovirt-users] problems with events.list

2017-05-03 Thread Fabrice Bacchella
Ok, got it. The good syntax is host.name=ng319 and type=885 or type=839 or 
type=886 or type=887. 

Using the search bar (thanks Ondra), it easier to test.


> Le 3 mai 2017 à 13:06, Fabrice Bacchella <fabrice.bacche...@orange.fr> a 
> écrit :
> 
> I'm looking for some specific events with the following code:
> 
>last_event = int(events_service.list(max=1)[0].id)
>print "last_event %d" % last_event
>
>start an check upgrade
>
> 
>print "search %s" % search
>while True:
>founds = events_service.list(
>from_= last_event + 1,
>search=search,
>)
>if len(founds) > 0:
>break
>time.sleep(wait)
> 
> 
> If search is host.name=..., it works.
> With search host.id=..., it can't find any events.
> 
> I was unable to find a filter for the events :
> host.name=XXX and (type=885 or type=839 or type=886 or type=887)
> host.name=XXX and (code=885 or code=839 or code=886 or code=887)
> host.name=XXX and type=885 or type=839 or type=886 or type=887
> host.name=XXX and code=885 or code=839 or code=886 or code=887
> 
> What should be the right search string ?
> 
> ___
> 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] problems with events.list

2017-05-03 Thread Fabrice Bacchella
I'm looking for some specific events with the following code:

last_event = int(events_service.list(max=1)[0].id)
print "last_event %d" % last_event

start an check upgrade


print "search %s" % search
while True:
founds = events_service.list(
from_= last_event + 1,
search=search,
)
if len(founds) > 0:
break
time.sleep(wait)


If search is host.name=..., it works.
With search host.id=..., it can't find any events.

I was unable to find a filter for the events :
host.name=XXX and (type=885 or type=839 or type=886 or type=887)
host.name=XXX and (code=885 or code=839 or code=886 or code=887)
host.name=XXX and type=885 or type=839 or type=886 or type=887
host.name=XXX and code=885 or code=839 or code=886 or code=887

What should be the right search string ?

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


Re: [ovirt-users] Ovirt 4, the missing python sdk

2017-04-28 Thread Fabrice Bacchella


> Le 28 avr. 2017 à 18:00, Ben De Luca  a écrit :
> 
> before people go writing yet another api client wouldn't it make sense to 
> just define the api client in terms of some thing like swagger ? 
> http://swagger.io/
> 
> 

I'm using the curl wrapper from the python sdk4, but it misses a lot of high 
level wrappers and helpers. That's what I'm doing, writting code like:

@wrapper(writer_class=StorageDomainWriter, type_class=StorageDomain, 
service_class=StorageDomainService)
class StorageDomainWrapper(ObjectWrapper):
pass


@wrapper(service_class=StorageDomainsService, service_root="storagedomains")
class StoragesDomainWrapper(ListObjectWrapper):
pass


That allows to pack some functions that the sdk splitted or made difficult to 
find. It should allows to write simpler code for end user :

lister = StoragesDomainWrapper(api=...)
sd = lister.get(name="sd1")
print sd.status
sd.export()


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


[ovirt-users] Ovirt 4, the missing python sdk

2017-04-28 Thread Fabrice Bacchella
I have started to write a custom sdk/cli in python for Ovirt 4. It provides 
helpers and wrapper for the rather raw level sdk4 provided.

It's still a work in progress, but a big improvement from my previous version, 
made for ovirt 3.

It allows to write simple commands on shell :

$ ./ovcmd host -n hostname maintenance
$ ./ovcmd host -n hostname activate

It also allows to do fine exports:

$ ./ovcmd vm -n vmname export os type
rhel_6x64

$ ./ovcmd capabilities -n 4.1 export cpu_types name
Intel Conroe Family
Intel Penryn Family
Intel Nehalem Family
Intel Westmere Family
Intel SandyBridge Family
Intel Haswell-noTSX Family
Intel Haswell Family
Intel Broadwell-noTSX Family
Intel Broadwell Family
Intel Skylake Family
AMD Opteron G1
AMD Opteron G2
AMD Opteron G3
AMD Opteron G4
AMD Opteron G5
IBM POWER8

Or to get a display console on a mac os:

$open $(./ovcmd vm -n vmname console )


It can be found at https://github.com/fbacchella/ovirtcmd/tree/sdk4
It's still works in progress, I need to finish to remove sdk3 code.

Some example of object written to sdk4 can be found at:

https://github.com/fbacchella/ovirtcmd/blob/sdk4/ovlib/vms/__init__.py___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] after upgrade from 4.0.4 to 4.1.1, no more gettagsbyparent_id

2017-04-25 Thread Fabrice Bacchella
I activated pg query log and got that:

grep gettagsbyparent_id /data/pgsql/9.4/data/pg_log/postgresql-Tue.log 
< 2017-04-25 12:21:29.770 CEST >LOG:  execute : SELECT NULL AS 
PROCEDURE_CAT, n.nspname AS PROCEDURE_SCHEM, p.proname AS PROCEDURE_NAME, NULL, 
NULL, NULL, d.description AS REMARKS, 2 AS PROCEDURE_TYPE,  p.proname || '_' || 
p.oid AS SPECIFIC_NAME  FROM pg_catalog.pg_namespace n, pg_catalog.pg_proc p  
LEFT JOIN pg_catalog.pg_description d ON (p.oid=d.objoid)  LEFT JOIN 
pg_catalog.pg_class c ON (d.classoid=c.oid AND c.relname='pg_proc')  LEFT JOIN 
pg_catalog.pg_namespace pn ON (c.relnamespace=pn.oid AND 
pn.nspname='pg_catalog')  WHERE p.pronamespace=n.oid  AND n.nspname LIKE 
'public' AND p.proname LIKE 'gettagsbyparent_id' ORDER BY PROCEDURE_SCHEM, 
PROCEDURE_NAME, p.oid::text 
< 2017-04-25 12:21:29.787 CEST >LOG:  execute : SELECT 
n.nspname,p.proname,p.prorettype,p.proargtypes, t.typtype,t.typrelid,  
p.proargnames, p.proargmodes, p.proallargtypes, p.oid  FROM pg_catalog.pg_proc 
p, pg_catalog.pg_namespace n, pg_catalog.pg_type t  WHERE p.pronamespace=n.oid 
AND p.prorettype=t.oid  AND n.nspname LIKE 'public' AND p.proname LIKE 
'gettagsbyparent_id' ORDER BY n.nspname, p.proname, p.oid::text 
< 2017-04-25 12:21:29.827 CEST >ERROR:  function gettagsbyparent_id() does not 
exist at character 16
< 2017-04-25 12:21:29.827 CEST >STATEMENT:  select * from  gettagsbyparent_id()


And:

grep getallmacpoolrangesbymacpoolid 
/data/pgsql/9.4/data/pg_log/postgresql-Tue.log 
< 2017-04-25 12:13:03.519 CEST >ERROR:  function 
getallmacpoolrangesbymacpoolid() does not exist at character 16
< 2017-04-25 12:13:03.519 CEST >STATEMENT:  select * from  
getallmacpoolrangesbymacpoolid();
< 2017-04-25 12:21:29.816 CEST >LOG:  execute : SELECT NULL AS 
PROCEDURE_CAT, n.nspname AS PROCEDURE_SCHEM, p.proname AS PROCEDURE_NAME, NULL, 
NULL, NULL, d.description AS REMARKS, 2 AS PROCEDURE_TYPE,  p.proname || '_' || 
p.oid AS SPECIFIC_NAME  FROM pg_catalog.pg_namespace n, pg_catalog.pg_proc p  
LEFT JOIN pg_catalog.pg_description d ON (p.oid=d.objoid)  LEFT JOIN 
pg_catalog.pg_class c ON (d.classoid=c.oid AND c.relname='pg_proc')  LEFT JOIN 
pg_catalog.pg_namespace pn ON (c.relnamespace=pn.oid AND 
pn.nspname='pg_catalog')  WHERE p.pronamespace=n.oid  AND n.nspname LIKE 
'public' AND p.proname LIKE 'getallmacpoolrangesbymacpoolid' ORDER BY 
PROCEDURE_SCHEM, PROCEDURE_NAME, p.oid::text 
< 2017-04-25 12:21:29.821 CEST >LOG:  execute : SELECT 
n.nspname,p.proname,p.prorettype,p.proargtypes, t.typtype,t.typrelid,  
p.proargnames, p.proargmodes, p.proallargtypes, p.oid  FROM pg_catalog.pg_proc 
p, pg_catalog.pg_namespace n, pg_catalog.pg_type t  WHERE p.pronamespace=n.oid 
AND p.prorettype=t.oid  AND n.nspname LIKE 'public' AND p.proname LIKE 
'getallmacpoolrangesbymacpoolid' ORDER BY n.nspname, p.proname, p.oid::text 
< 2017-04-25 12:21:29.865 CEST >ERROR:  function 
getallmacpoolrangesbymacpoolid() does not exist at character 16
< 2017-04-25 12:21:29.865 CEST >STATEMENT:  select * from  
getallmacpoolrangesbymacpoolid()


And for all the errors for today:
< 2017-04-25 03:23:08.098 CEST >ERROR:  update or delete on table "fact_values" 
violates foreign key constraint "fact_value_id_fk" on table "facts"
< 2017-04-25 12:13:03.519 CEST >ERROR:  function 
getallmacpoolrangesbymacpoolid() does not exist at character 16
< 2017-04-25 12:21:29.827 CEST >ERROR:  function gettagsbyparent_id() does not 
exist at character 16
< 2017-04-25 12:21:29.865 CEST >ERROR:  function 
getallmacpoolrangesbymacpoolid() does not exist at character 16

But the first one is old:
grep fact_value_id_fk /data/pgsql/9.4/data/pg_log/postgresql-*
/data/pgsql/9.4/data/pg_log/postgresql-Mon.log:< 2017-04-24 03:38:33.212 CEST 
>ERROR:  update or delete on table "fact_values" violates foreign key 
constraint "fact_value_id_fk" on table "facts"
/data/pgsql/9.4/data/pg_log/postgresql-Sat.log:< 2017-04-22 04:12:59.608 CEST 
>ERROR:  update or delete on table "fact_values" violates foreign key 
constraint "fact_value_id_fk" on table "facts"
/data/pgsql/9.4/data/pg_log/postgresql-Sun.log:< 2017-04-23 03:52:01.341 CEST 
>ERROR:  update or delete on table "fact_values" violates foreign key 
constraint "fact_value_id_fk" on table "facts"
/data/pgsql/9.4/data/pg_log/postgresql-Tue.log:< 2017-04-25 03:23:08.098 CEST 
>ERROR:  update or delete on table "fact_values" violates foreign key 
constraint "fact_value_id_fk" on table "facts"

ovirt was working on monday morgning, I'm positive about that.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] after upgrade from 4.0.4 to 4.1.1, no more gettagsbyparent_id

2017-04-25 Thread Fabrice Bacchella

> Le 25 avr. 2017 à 12:05, Yedidyah Bar David <d...@redhat.com> a écrit :
> 
> On Tue, Apr 25, 2017 at 12:14 PM, Fabrice Bacchella
> <fabrice.bacche...@orange.fr> wrote:
>> 
>>> Le 25 avr. 2017 à 10:27, Yedidyah Bar David <d...@redhat.com> a écrit :
>>> 
>>> 
>> 
>>> So all was good until you changed (downgraded?) your pg client? So
>>> perhaps try to revert that. Although if you didn't change your jdbc
>>> library, I do not think this should have affected you. But in any
>>> case, if the failure was not caused by running 'engine-setup', it's
>>> most likely not due to a bug in engine-setup, but elsewhere.
>> 
>> Possible, but for the moment, I need a way to get out of this trap. My ovirt 
>> engine is broken.
> 
> Your db dump does have gettagsbyparent_id, so that's not the problem.
> I am not an expert in the engine side, no idea otherwise.

But:

su - postgres
 $ psql ovirt_engine
psql (9.4.11)
Type "help" for help.

ovirt_engine=# select * from  getallmacpoolrangesbymacpoolid();
ERROR:  function getallmacpoolrangesbymacpoolid() does not exist
LINE 1: select * from  getallmacpoolrangesbymacpoolid();
   ^
HINT:  No function matches the given name and argument types. You might need to 
add explicit type casts.


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


Re: [ovirt-users] after upgrade from 4.0.4 to 4.1.1, no more gettagsbyparent_id

2017-04-25 Thread Fabrice Bacchella

> Le 25 avr. 2017 à 10:27, Yedidyah Bar David <d...@redhat.com> a écrit :
> 
> On Tue, Apr 25, 2017 at 11:14 AM, Fabrice Bacchella
> <fabrice.bacche...@orange.fr> wrote:
>> 
>>> Le 25 avr. 2017 à 07:59, Yedidyah Bar David <d...@redhat.com> a écrit :
>>> 
>>> On Mon, Apr 24, 2017 at 5:59 PM, Fabrice Bacchella
>>> <fabrice.bacche...@orange.fr> wrote:
>>>> https://www.dropbox.com/s/70h2ajt049i89p6/ovirt-engine.log.tar.gz?dl=0
>>> 
>>> Seems like this wasn't the first error. Before that, the engine lost
>>> connection to the database:
>>> 
>> 
>>> Later the engine was restarted and then the error you reported.
>>> 
>>> Are you sure your database is ok?
>> 
>> Of course I needed to restart the database, to change the requested setting 
>> about vacuum. But it was a scheduled restart, not during the upgrade.
>> 
>>> 
>>> Please provide the output of 'pg_dump -s' for it, and the output of
>>> 'select * from schema_version'.
>>> 
>> 
>> it ? what it's name. I have no knowledge of pg, how can I connect to it to 
>> give the requested informations.
> 
> Sorry, I was under the impression that your organization has some pg
> expertise, based on the thread about remote version.
> 
> On the pg machine, this should work:
> su - postgres -c 'pg_dump -s engine' > engine-schema.dump
> su - postgres -c 'psql engine -c "select * from schema_version;"' >
> schema-version-table

https://www.dropbox.com/s/6o51owq0f6qrdte/schema-version-table?dl=0
https://www.dropbox.com/s/luw35rlcksl3uwa/engine-schema.dump?dl=0



> 
> 
>> 
>>> 
>>> Can you please describe the full flow that you went through?
>> 
>> On last friday, I tried a first upgrade, but it stop because of the 
>> requested version mismatch. So I stopped it and asked for help.
>> 
>> On monday I tried to apply the tuning on my database about autovacuum and so 
>> restart it.
>> 
>> At this time, ovirt was still working fine.
>> 
>> I then upgraded the pg client, to match pg_dump with the server but not the 
>> jdbc library, to keep the one supported (9.2).
> 
> Please explain this last part with more details.
> 
> IIUC your pg client was 9.4.8, and now it's 9.4.11.

> 
> Please share yum logs (or whatever you have if you installed it not using 
> yum).
> Please share all engine-setup logs.
> 

grep -i postgres /var/log/yum.log
Apr 24 13:28:00 Updated: postgresql94-libs-9.4.11-2PGDG.rhel7.x86_64
Apr 24 13:28:01 Updated: postgresql94-9.4.11-2PGDG.rhel7.x86_64
Apr 24 13:28:07 Updated: postgresql-jdbc-42.0.0-1.rhel7.noarch
Apr 24 13:28:09 Updated: postgresql94-server-9.4.11-2PGDG.rhel7.x86_64
Apr 24 13:36:48 Installed: collectd-postgresql-5.7.0-2.el7.x86_64

rpm -qa |grep -i postgres
postgresql94-libs-9.4.11-2PGDG.rhel7.x86_64
postgresql94-server-9.4.11-2PGDG.rhel7.x86_64
postgresql-jdbc-42.0.0-1.rhel7.noarch
collectd-postgresql-5.7.0-2.el7.x86_64
postgresql94-9.4.11-2PGDG.rhel7.x86_64


> I think the engine should work just fine with pg 9.5 (Fedora 25's
> default). Never heard about using 9.4.
> 
>> 
>> And then it failed and didn't want to restart any more.
> 
> So all was good until you changed (downgraded?) your pg client? So

I upgraded the client from 9.4.8 to 9.4.11, since my server was already 9.4.11, 
downloaded directly from postgres' yum repo :

https://yum.postgresql.org/repopackages.php

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


Re: [ovirt-users] after upgrade from 4.0.4 to 4.1.1, no more gettagsbyparent_id

2017-04-25 Thread Fabrice Bacchella

> Le 25 avr. 2017 à 07:59, Yedidyah Bar David <d...@redhat.com> a écrit :
> 
> On Mon, Apr 24, 2017 at 5:59 PM, Fabrice Bacchella
> <fabrice.bacche...@orange.fr> wrote:
>> https://www.dropbox.com/s/70h2ajt049i89p6/ovirt-engine.log.tar.gz?dl=0
> 
> Seems like this wasn't the first error. Before that, the engine lost
> connection to the database:
> 

> Later the engine was restarted and then the error you reported.
> 
> Are you sure your database is ok?

Of course I needed to restart the database, to change the requested setting 
about vacuum. But it was a scheduled restart, not during the upgrade.

> 
> Please provide the output of 'pg_dump -s' for it, and the output of
> 'select * from schema_version'.
> 

it ? what it's name. I have no knowledge of pg, how can I connect to it to give 
the requested informations.

> 
> Can you please describe the full flow that you went through?

On last friday, I tried a first upgrade, but it stop because of the requested 
version mismatch. So I stopped it and asked for help.

On monday I tried to apply the tuning on my database about autovacuum and so 
restart it.

At this time, ovirt was still working fine.

I then upgraded the pg client, to match pg_dump with the server but not the 
jdbc library, to keep the one supported (9.2).

And then it failed and didn't want to restart any more.


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


[ovirt-users] after upgrade from 4.0.4 to 4.1.1, no more gettagsbyparent_id

2017-04-24 Thread Fabrice Bacchella
I tried to upgrade from 4.0 to 4.1, I ran engine-setup

And now ovirt-engine start fails with command like:

Caused by: org.springframework.jdbc.BadSqlGrammarException: 
PreparedStatementCallback; bad SQL grammar [select * from  
gettagsbyparent_id()]; nested exception is org.postgresql.util.PSQLException: 
ERROR: function gettagsbyparent_id() does not exist


In the setup log I indeed found:

 drop function if exists public.gettagsbyparent_id(uuid) cascade;


But nothing else. This function is not recreated. Any hint about what happened ?






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


Re: [ovirt-users] upgrade to 4.1

2017-04-23 Thread Fabrice Bacchella

> Le 23 avr. 2017 à 07:59, Yedidyah Bar David  a écrit :
> 
> 

> The main reason we require this is for pg_dump/pg_restore which are ran
> during setup/rollback (if needed). pg_dump can't know for sure that all
> the changes in the db were done using a client of its own version (that
> is, current machine usually), and if indeed a newer client was used, it
> might have used features that pg_dump of the lower version doesn't know
> how to back up (and especially pg_restore does not know how to restore).
> See also [1]. I seem to have tested there (can't remember anymore, see
> comment 13) 9.2 client with 9.5 server and it didn't work. pg_dump(1)
> manpage says:
> 
>   Because pg_dump is used to transfer data to newer versions of
>   PostgreSQL, the output of pg_dump can be expected to load into
>   PostgreSQL server versions newer than pg_dump's version.  pg_dump can
>   also dump from PostgreSQL servers older than its own version.
>   (Currently, servers back to version 7.0 are supported.) However,
>   pg_dump cannot dump from PostgreSQL servers newer than its own major
>   version; it will refuse to even try, rather than risk making an invalid
>   dump. Also, it is not guaranteed that pg_dump's output can be loaded
>   into a server of an older major version — not even if the dump was
>   taken from a server of that version. Loading a dump file into an older
>   server may require manual editing of the dump file to remove syntax not
>   understood by the older server. Use of the --quote-all-identifiers
>   option is recommended in cross-version cases, as it can prevent
>   problems arising from varying reserved-word lists in different
>   PostgreSQL versions.
> 

I don't get it, but I don't know pg so I might be wrong.

You have a client application (like ovirt) written using features from V1 of pg.

It's running on a server where version V2 is installing. For good reasons, V2 
>= V1 is needed.

The server is running a version V3. Again V3 >= V1 is needed.   Except for 
major version, does V3 => V2 is really needed ?

And for backup the problem is the same. It must probably know every features 
used in the application (so again being V1 or more). Why does it needs to match 
both V2 and V3 ?  It will probably fits V2 is installation is the same. But 
that not mandatory. In a java application, the client library might be a jar 
provided by the application and pg_dump a tool installed with native os 
packaging. But how can complain against V3 ?

But with ovirt we have V1=V2=V3, even for for patch level (9.4.8 against 
9.4.11). What kind of feature that ovirt don't know about might be missing ? I 
don't think ovirt might know about any 9.4 since you talked about version 9.2 
as the official supported version.


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


Re: [ovirt-users] upgrade to 4.1

2017-04-23 Thread Fabrice Bacchella

> Le 23 avr. 2017 à 10:56, Yedidyah Bar David <d...@redhat.com> a écrit :
> 
> On Sun, Apr 23, 2017 at 10:59 AM, Fabrice Bacchella
> <fabrice.bacche...@orange.fr> wrote:
>> 
>>> Le 23 avr. 2017 à 07:59, Yedidyah Bar David <d...@redhat.com> a écrit :
>>>>> 
>> 
>>>>> 
>>>>> And it was not in the release notes, it's not funny to get this warning
>>>>> after starting the upgrade
>>> 
>>> This isn't a new test, see above bug.
>>> 
>>> Are you sure it's the first time you see it? Perhaps you upgraded your pg
>>> server only after the last upgrade of the engine?
>>> 
>> 
>> That's might true about the test, but not the autovacuum_vacuum_scale_factor 
>> and others.
>> 
>> And any way, about the test, having a different version of pg library and pg 
>> server is quite common when you have a centralized pg. You might plan an 
>> upgrade any time and don't expect every client to complain about a minor 
>> release, that's quite unexpected.
> 
> Very well, so I detailed above a suggestion about what you can do.
> 
> Either make backup (and therefore rollback) optional, or make the test
> more delicate. Neither seems trivial to me in terms of risk (although
> they might be quite simple in the amount of code to change).
> 
>> 
>> The bug https://bugzilla.redhat.com/show_bug.cgi?id=1331168 is about major 
>> version, I got complain from ovirt about patch level. That's not the same 
>> thing.
> 
> I didn't check PG's official terminology. The bug was about 9.2
> against 9.5. In general, "9" is the major version, and the bug still
> applied. It might be that they consider "9.2" to be the major version,
> and "9.5" a different major version.

From the very bug description:

> I'm testing migration from 3.6 EL6 with remote DBs (PG 8.x) to 4.0 EL7 while 
> still using remote DBs (which I restored from backup).

> Problem is 4.0 supports PG 9.x but I was still original PG 8.x. engine-setup 
> from 4.0 should know it needs PG 9.x and should check PG version even for 
> remote DBs.

In the extract from the man page, the main problems are also about major 
versions.

You test 9.2 against 9.5.

What I have failling is 9.4.8 against 9.4.11. That is very different from all 
the case described.

> 
>> And the solution that ovirt propose is to have the server lying about 
>> version to all of it's client.
> 
> Where did you see this?

  Please set:
   autovacuum_vacuum_scale_factor = 0.01
   autovacuum_analyze_scale_factor = 0.075
   autovacuum_max_workers = 6
   server_version = 9.4.8

Are in the log from the upgrade command.

> 
> The text you copied is: "Please use a Postgresql server of version '9.4.8'"
> 
>> What can I do if every client I use require such a thing ?
> 
> You mean:
> 1. I want a single server with some version X
> 2. I want different clients with different versions X1, X2, ...
> 3. More than one of these clients requires the server to be the same
> version as the client
> ?
> 
> I'd say - upgrade all such clients to the version of the server, or
> make these clients not require that :-)

Yes make these clients not require that. Ovirt is one of those complaining 
client.


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


Re: [ovirt-users] upgrade to 4.1

2017-04-23 Thread Fabrice Bacchella

> Le 23 avr. 2017 à 07:59, Yedidyah Bar David  a écrit :
>>> 

>>> 
>>> And it was not in the release notes, it's not funny to get this warning
>>> after starting the upgrade
> 
> This isn't a new test, see above bug.
> 
> Are you sure it's the first time you see it? Perhaps you upgraded your pg
> server only after the last upgrade of the engine?
> 

That's might true about the test, but not the autovacuum_vacuum_scale_factor 
and others.

And any way, about the test, having a different version of pg library and pg 
server is quite common when you have a centralized pg. You might plan an 
upgrade any time and don't expect every client to complain about a minor 
release, that's quite unexpected.

The bug https://bugzilla.redhat.com/show_bug.cgi?id=1331168 is about major 
version, I got complain from ovirt about patch level. That's not the same thing.
And the solution that ovirt propose is to have the server lying about version 
to all of it's client. What can I do if every client I use require such a thing 
?
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] bug with ConsoleWriter ?

2017-04-22 Thread Fabrice Bacchella

> Le 22 avr. 2017 à 10:39, Juan Hernández  a écrit :
> 
> 

> I also wonder why do you need to convert objects to XML explicitly. Can
> you elaborate on what is your need?
> 

I want to have a generic export for many types, as I migrating my ovirtcmd tool 
(https://github.com/fbacchella/ovirtcmd) to sdk4.

It's used by the export verb: https://github.com/fbacchella/ovirtcmd#exporting


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


[ovirt-users] bug with ConsoleWriter ?

2017-04-21 Thread Fabrice Bacchella
I'm trying to dump informations about console with the following code:

vm = vms_service.list(search='name=fa41')[0]

# Find the service that manages the graphics consoles of the virtual machine:
vm_service = vms_service.vm_service(vm.id)
consoles_service = vm_service.graphics_consoles_service()
console_type = consoles_service.list()[0]

console_type = connection.follow_link(console_type)
buf = None
writer = None
buf = io.BytesIO()
writer = xml.XmlWriter(buf, indent=True)
ConsoleWriter.write_one(console_type, writer)
writer.flush()
print buf.getvalue()
But i got the following result :

Traceback (most recent call last):
  File "./export_console.py", line 69, in 
ConsoleWriter.write_one(console_type, writer)
  File ".../venv/lib/python2.7/site-packages/ovirtsdk4/writers.py", line 1262, 
in write_one
if obj.enabled is not None:

If I add print console_type.__dict__, it contains:

{'_address': None, '_instance_type': None, '_href': 
'/ovirt-engine/api/vms/61a6de0a-2a21-4e90-bc20-29e3f0cd0ad8/graphicsconsoles/7370696365',
 '_description': None, '_tls_port': None, '_comment': None, '_port': None, 
'_name': None, '_vm': , '_protocol': 
, '_template': None, '_id': '7370696365'}


Did I miss something, or is that a but with the console writer ? 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Missing feature in python SDK4

2017-04-20 Thread Fabrice Bacchella

> Le 20 avr. 2017 à 16:35, Juan Hernández <jhern...@redhat.com> a écrit :
> 
> On 04/20/2017 12:26 PM, Fabrice Bacchella wrote:
>> I didn't find a way to find the writer that correspond to a given type. Is 
>> there a way to do that, or it's up to the end user to manually manage this 
>> mapping ?
>> 
> 
> Yes that is missing. We have it for reading, but not for writing. This
> patch should address that:
> 
>  Add generic writer
>  https://gerrit.ovirt.org/75699
> 
> Please open a bug so that we can decide what version should contain this
> fix.

https://bugzilla.redhat.com/show_bug.cgi?id=1444114


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


[ovirt-users] upgrade to 4.1

2017-04-20 Thread Fabrice Bacchella
I tried to upgrade ovirt to version 4.1 from 4.0 and got:

  Found the following problems in PostgreSQL configuration for the 
Engine database:
   autovacuum_vacuum_scale_factor required to be at most 0.01
   autovacuum_analyze_scale_factor required to be at most 0.075
   autovacuum_max_workers required to be at least 6
   Postgresql client version is '9.4.8', whereas the version on XXX is 
'9.4.11'. Please use a Postgresql server of version '9.4.8'.
  Please set:
   autovacuum_vacuum_scale_factor = 0.01
   autovacuum_analyze_scale_factor = 0.075
   autovacuum_max_workers = 6
   server_version = 9.4.8
  in postgresql.conf on ''. Its location is usually 
/var/lib/pgsql/data , or somewhere under /etc/postgresql* .

I'm a little afraid about that. Does ovirt want pg to lies about it's version ? 
It's a shared instance so what about other tools that access it ? Is there some 
explanation about the meaning of those values ?

And it was not in the release notes, it's not funny to get this warning after 
starting the upgrade___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Missing feature in python SDK4

2017-04-20 Thread Fabrice Bacchella
I didn't find a way to find the writer that correspond to a given type. Is 
there a way to do that, or it's up to the end user to manually manage this 
mapping ?


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


Re: [ovirt-users] SKD4

2017-04-09 Thread Fabrice Bacchella

> Le 9 avr. 2017 à 11:25, Yaniv Kaul  a écrit :
> 

> However, I tend to agree with closing the bug - I'd create a library (module) 
> *on top of the SDK* . The comment in the bug is quite clear about it:
> "The objective of the SDK is to offer the same that the API offers, without 
> the burden of the details of the HTTP and XML handling. Nothing less, and 
> nothing more."

Then don't call it a SDK, they are barely helper functions with bad design 
decisions, connection.vms_service().vm_service(id) is nothing else than 
redundancy and bring nothing else than noise. 




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


Re: [ovirt-users] SKD4

2017-04-09 Thread Fabrice Bacchella

> Le 6 avr. 2017 à 17:21, Ondra Machacek <omach...@redhat.com> a écrit :
> 
> 
> 
> On Thu, Apr 6, 2017 at 5:00 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> Ho my good, in ovirtsdk.services.py <http://ovirtsdk.services.py/>, for every 
> service, there is a different method with a different name that return a 
> associated service, so it's not possible to have a generic like:
> 
> def  resolve(service, ...):
>   id = .
>   return service.service(id)
> 
> because the generic call service is used by something that take a path 
> argument. But why not a service_by_id(self, id) ?
> 
> I am not fully sure I understand what you are missing, but feel free to open
> the bug on Python SDK in bugzilla, we will be happy to improve the SDK.

I tried :
https://bugzilla.redhat.com/show_bug.cgi?id=1439879 
<https://bugzilla.redhat.com/show_bug.cgi?id=1439879>

I hit a wall. it seems that some of you are not willing to improve the SDK.

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


Re: [ovirt-users] SKD4

2017-04-06 Thread Fabrice Bacchella

> Le 6 avr. 2017 à 20:06, Yaniv Kaul <yk...@redhat.com> a écrit :
> 
> 
> 
> On Thu, Apr 6, 2017 at 5:30 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> 
> > Le 6 avr. 2017 à 16:12, Yaniv Kaul <yk...@redhat.com 
> > <mailto:yk...@redhat.com>> a écrit :
> 
> > Seriously though - perhaps you could borrow code from our Ansible module? 
> > See[1].
> >
> 
> If the code already exists, why it's not already in the sdk instead of having 
> to dig throw external code ?
> 
> It's a good question, which I've asked as well in the past. The reason is 
> that it's above the SDK, not part of the SDK.
> But that doesn't matter - we really ought to have a module/library on top of 
> the SDK,  that can be shared.
> For example, between ovirt-system-tests, Ansible, oVirtBackup[1] and several 
> others who write on top of our SDK.
> We just never got to generalise it enough and split it. You are welcome to 
> begin this work - I believe it has value.
> (It's also a good Google Summer of Code project - I'll see if I can update 
> that page on ovirt.org <http://ovirt.org/>).

I have already started it for sdk3, I will need to restart if almost from 
scratch to sdk4: https://github.com/fbacchella/ovirtcmd 
<https://github.com/fbacchella/ovirtcmd> and need to right a lot of very basic 
code.

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


Re: [ovirt-users] SKD4

2017-04-06 Thread Fabrice Bacchella

> Le 6 avr. 2017 à 17:21, Ondra Machacek <omach...@redhat.com> a écrit :
> 
> 
> 
> On Thu, Apr 6, 2017 at 5:00 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> Ho my good, in ovirtsdk.services.py <http://ovirtsdk.services.py/>, for every 
> service, there is a different method with a different name that return a 
> associated service, so it's not possible to have a generic like:
> 
> def  resolve(service, ...):
>   id = .
>   return service.service(id)
> 
> because the generic call service is used by something that take a path 
> argument. But why not a service_by_id(self, id) ?
> 
> I am not fully sure I understand what you are missing, but feel free to open
> the bug on Python SDK in bugzilla, we will be happy to improve the SDK.
>  

Done, with a first idea for what might be needed:

https://bugzilla.redhat.com/show_bug.cgi?id=1439879 
<https://bugzilla.redhat.com/show_bug.cgi?id=1439879>



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


Re: [ovirt-users] SKD4

2017-04-06 Thread Fabrice Bacchella
Ho my good, in ovirtsdk.services.py, for every service, there is a different 
method with a different name that return a associated service, so it's not 
possible to have a generic like:

def  resolve(service, ...):
id = .
return service.service(id)

because the generic call service is used by something that take a path 
argument. But why not a service_by_id(self, id) ?

grep 'def .*_service.self, id.:' site-packages/ovirtsdk4/services.py
def vm_service(self, id):
def group_service(self, id):
def host_service(self, id):
def vm_service(self, id):
def label_service(self, id):
def label_service(self, id):
def profile_service(self, id):
def profile_service(self, id):
def network_service(self, id):
def permission_service(self, id):
def role_service(self, id):
def tag_service(self, id):
def profile_service(self, id):
def storage_domain_service(self, id):
def balance_service(self, id):
def bookmark_service(self, id):
def level_service(self, id):
def cluster_service(self, id):
def profile_service(self, id):
def data_center_service(self, id):
def attachment_service(self, id):
def disk_profile_service(self, id):
def snapshot_service(self, id):
def disk_service(self, id):
def group_service(self, id):
def user_service(self, id):
def domain_service(self, id):
def event_service(self, id):
def resource_service(self, id):
def host_service(self, id):
def group_service(self, id):
def provider_service(self, id):
def host_service(self, id):
def certificate_service(self, id):
def agent_service(self, id):
def file_service(self, id):
def filter_service(self, id):
def brick_service(self, id):
def hook_service(self, id):
def volume_service(self, id):
def group_service(self, id):
def device_service(self, id):
def hook_service(self, id):
def nic_service(self, id):
def node_service(self, id):
def storage_service(self, id):
def host_service(self, id):
def icon_service(self, id):
def image_transfer_service(self, id):
def image_service(self, id):
def console_service(self, id):
def nic_service(self, id):
def watchdog_service(self, id):
def instance_type_service(self, id):
def iscsi_bond_service(self, id):
def job_service(self, id):
def katello_erratum_service(self, id):
def mac_pool_service(self, id):
def attachment_service(self, id):
def network_filter_service(self, id):
def label_service(self, id):
def network_service(self, id):
def provider_service(self, id):
def image_service(self, id):
def provider_service(self, id):
def network_service(self, id):
def subnet_service(self, id):
def key_service(self, id):
def provider_service(self, id):
def type_service(self, id):
def operating_system_service(self, id):
def permit_service(self, id):
def qos_service(self, id):
def limit_service(self, id):
def limit_service(self, id):
def quota_service(self, id):
def role_service(self, id):
def policy_service(self, id):
def unit_service(self, id):
def cdrom_service(self, id):
def disk_service(self, id):
def nic_service(self, id):
def snapshot_service(self, id):
def key_service(self, id):
def statistic_service(self, id):
def step_service(self, id):
def disk_service(self, id):
def connection_service(self, id):
def template_service(self, id):
def attachment_service(self, id):
def vm_service(self, id):
def storage_domain_service(self, id):
def storage_connection_extension_service(self, id):
def storage_connection_service(self, id):
def permission_service(self, id):
def tag_service(self, id):
def cdrom_service(self, id):
def attachment_service(self, id):
def disk_service(self, id):
def console_service(self, id):
def nic_service(self, id):
def watchdog_service(self, id):
def template_service(self, id):
def unmanaged_network_service(self, id):
def user_service(self, id):
def network_service(self, id):
def application_service(self, id):
def cdrom_service(self, id):
def disk_service(self, id):
def console_service(self, id):
def device_service(self, id):
def nic_service(self, id):
def node_service(self, id):
def pool_service(self, id):
def reported_device_service(self, id):
def session_service(self, id):
def watchdog_service(self, id):
def vm_service(self, id):
def profile_service(self, id):
def weight_service(self, id):
def katello_erratum_service(self, id):





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


Re: [ovirt-users] SKD4

2017-04-06 Thread Fabrice Bacchella

> Le 6 avr. 2017 à 16:12, Yaniv Kaul <yk...@redhat.com> a écrit :
> 
> 
> 
> On Thu, Apr 6, 2017 at 4:49 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> 
>> Le 6 avr. 2017 à 15:32, Yaniv Kaul <yk...@redhat.com 
>> <mailto:yk...@redhat.com>> a écrit :
>> 
>> 
>> 
>> On Thu, Apr 6, 2017 at 3:58 PM, Fabrice Bacchella 
>> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
>> Yes I'm starting to understand that thinking about migrating code is 
>> pointless.
>> 
>> The old skd3 code is just good to be thrown away. There is no hope thinking 
>> about "migrating code". And as it's just a thin layer around REST calls, 
>> it's up to us to try to make something usable around that. So I expect a lot 
>> of sweat and tears to adapt my existing code.
>> 
>> Well, yes and no. Yes, it's not smooth, but once you 'get' the idea behind 
>> the v4 API philosophy, it's quite easy to write to (at least in Python).
> 
> An example of code that I'm unhappy to write and that a good sdk should have 
> provided:
> 
> searchfilter = "%s=%s" % (type, value)
> vm = vms_service.list(search= searchfilter)[0]
> 
> instead of :
> vms_service.list(search= {type: value})[0]
> 
> or even better:
> vms_service.get(**{type: value})
> 
> 
> Yes, I see what you mean. 100% more LoC are currently needed vs. your idea ;-)

It's not about the number of LoC, it's about legibility, having code that says 
what's it's doing and doing what it says.___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] SKD4

2017-04-06 Thread Fabrice Bacchella

> Le 6 avr. 2017 à 16:12, Yaniv Kaul  a écrit :

> Seriously though - perhaps you could borrow code from our Ansible module? 
> See[1].
> 

If the code already exists, why it's not already in the sdk instead of having 
to dig throw external code ?
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] SKD4

2017-04-06 Thread Fabrice Bacchella

> Le 6 avr. 2017 à 15:47, Yaniv Kaul  a écrit :
> 
> 

> Perhaps in your case. Here[1] is an example of the ovirt system tests, which 
> were only partially converted (work in progress...) to v4 API.

yes that really related to my use case.

Another problem that I have with lack of documentation, that REST API 
documentation or samples don't provide.

In python, what does vms_service.list(search='name=NotExistingVM') will return 
? It's not stated in the REST documentation, but it's even worst in python.

It could throw an exception, return None, or return an empty list ?

If I'm using a sdk instead of direct HTTP call is not to be bothered my xml 
versus json representation, but instead find an answer to that kind of 
questions easily.
In the sample I just find:

vm = vms_service.list(search='name=myvm')[0]

Not really helpfull.

Is there any documentation about python exception thrown ? Or must I dig throw 
all the examples ?


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


Re: [ovirt-users] SKD4

2017-04-06 Thread Fabrice Bacchella

> Le 6 avr. 2017 à 15:32, Yaniv Kaul <yk...@redhat.com> a écrit :
> 
> 
> 
> On Thu, Apr 6, 2017 at 3:58 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> Yes I'm starting to understand that thinking about migrating code is 
> pointless.
> 
> The old skd3 code is just good to be thrown away. There is no hope thinking 
> about "migrating code". And as it's just a thin layer around REST calls, it's 
> up to us to try to make something usable around that. So I expect a lot of 
> sweat and tears to adapt my existing code.
> 
> Well, yes and no. Yes, it's not smooth, but once you 'get' the idea behind 
> the v4 API philosophy, it's quite easy to write to (at least in Python).

An example of code that I'm unhappy to write and that a good sdk should have 
provided:

searchfilter = "%s=%s" % (type, value)
vm = vms_service.list(search= searchfilter)[0]

instead of :
vms_service.list(search= {type: value})[0]

or even better:
vms_service.get(**{type: value})



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


Re: [ovirt-users] SKD4

2017-04-06 Thread Fabrice Bacchella

> Le 6 avr. 2017 à 15:32, Yaniv Kaul <yk...@redhat.com> a écrit :
> 
> 
> 
> On Thu, Apr 6, 2017 at 3:58 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> Yes I'm starting to understand that thinking about migrating code is 
> pointless.
> 
> The old skd3 code is just good to be thrown away. There is no hope thinking 
> about "migrating code". And as it's just a thin layer around REST calls, it's 
> up to us to try to make something usable around that. So I expect a lot of 
> sweat and tears to adapt my existing code.
> 
> Well, yes and no. Yes, it's not smooth, but once you 'get' the idea behind 
> the v4 API philosophy, it's quite easy to write to (at least in Python).

Easy to write code that a well though sdk should have provided.

> Note that right now you can mix between v3 and v4, so you can migrate slowly, 
> function by function.

That's a possible but almost as complicated as rewrite everything in my case.

> 
> 
> Another option that you can consider, if you are re-writing, is automation 
> via Ansible. 
> See https://github.com/ansible/ansible-modules-extras/tree/devel/cloud/ovirt 
> <https://github.com/ansible/ansible-modules-extras/tree/devel/cloud/ovirt> 

A lot of people don't use ansible or use concurrent tools. So no that's not an 
option.

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


Re: [ovirt-users] SKD4

2017-04-06 Thread Fabrice Bacchella
Yes I'm starting to understand that thinking about migrating code is pointless.

The old skd3 code is just good to be thrown away. There is no hope thinking 
about "migrating code". And as it's just a thin layer around REST calls, it's 
up to us to try to make something usable around that. So I expect a lot of 
sweat and tears to adapt my existing code.


> Le 6 avr. 2017 à 14:23, Yaniv Kaul <yk...@redhat.com> a écrit :
> 
> There is documentation online (and within the project).
> See http://ovirt.github.io/ovirt-engine-api-model/master/ 
> <http://ovirt.github.io/ovirt-engine-api-model/master/>
> 
> There are tens of examples in the RPM (and online).
> See https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examples 
> <https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examples>
> 
> HTH,
> Y.
> 
> On Thu, Apr 6, 2017 at 12:22 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> I trying to migrate my python code from sdk3 to sdk4, is there any migration 
> doc, documentation help about that ? Even google is unable to find anything 
> relevant about that.
> 
> ___
> Users mailing list
> Users@ovirt.org <mailto:Users@ovirt.org>
> http://lists.ovirt.org/mailman/listinfo/users 
> <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


[ovirt-users] SKD4

2017-04-06 Thread Fabrice Bacchella
I trying to migrate my python code from sdk3 to sdk4, is there any migration 
doc, documentation help about that ? Even google is unable to find anything 
relevant about that.

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


Re: [ovirt-users] Failed to attach a disk

2017-01-23 Thread Fabrice Bacchella
I send you a private mail.


> Le 22 janv. 2017 à 13:52, Maor Lipchuk <mlipc...@redhat.com> a écrit :
> 
> Hi Fabrice,
> 
> Can you please attach the VDSM and engine logs
> 
> Thanks,
> Maor
> 
> On Wed, Jan 18, 2017 at 5:05 PM, Fabrice Bacchella 
> <fabrice.bacche...@icloud.com <mailto:fabrice.bacche...@icloud.com>> wrote:
> I upgraded an host to the latest version of vdsm: 
> vdsm-4.18.21-1.el7.centos.x86_64, on a CentOS Linux release 7.3.1611 (Core)
> 
> I then created a disk that I wanted to attach to a running vm, but il fails, 
> with the message in /var/log/libvirt/qemu/.log:
> 
> Could not open 
> '/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/4d33f997-94b0-42c1-8052-5364993b85e9/8e613dd3-eebc-476a-a830-e2a8236ea8a8':
>  Permission denied
> 
> I tried to have a look at the disks images, and got a strange result:
> 
> -rw-rw 1 vdsm qemu 1.0M May 18  2016 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/ed18c515-09c9-4a71-af0a-7f0934193a65/b5e53c81-2279-4f2b-b282-69db430d36d4.lease
> -rw-rw 1 vdsm qemu 1.0M May 18  2016 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/3a00232b-c1f9-4b9b-910e-caf8b0321609/4f6d5c63-6a36-4356-832e-f52427d9512e.lease
> -rw-rw 1 vdsm qemu 1.0M May 23  2016 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/b0f4c517-e492-409f-934f-1561281a242b/a3d60d8a-f89b-41dd-b519-fb652301b1f5.lease
> -rw-rw 1 vdsm qemu 1.0M May 23  2016 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/465df4e9-3c62-4501-889f-cbab65ed0e0d/7a9b9033-f5f8-4eaa-ac94-6cc0c4ff6120.lease
> -rw-rw 1 vdsm kvm  1.0M Jan  6 18:00 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/baf01c4e-ede9-4e4e-a265-172695d81a83/4cdd72a7-b347-4479-accd-ab08d61552f9.lease
> -rw-rw 1 vdsm kvm  1.0M Jan 18 15:38 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/4d33f997-94b0-42c1-8052-5364993b85e9/8e613dd3-eebc-476a-a830-e2a8236ea8a8.lease
> 
> -rw-r--r-- 1 vdsm qemu 314 May 23  2016 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/b0f4c517-e492-409f-934f-1561281a242b/a3d60d8a-f89b-41dd-b519-fb652301b1f5.meta
> -rw-r--r-- 1 vdsm kvm  314 Jan  6 18:00 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/465df4e9-3c62-4501-889f-cbab65ed0e0d/7a9b9033-f5f8-4eaa-ac94-6cc0c4ff6120.meta
> -rw-r--r-- 1 vdsm kvm  307 Jan  6 18:00 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/baf01c4e-ede9-4e4e-a265-172695d81a83/4cdd72a7-b347-4479-accd-ab08d61552f9.meta
> -rw-r--r-- 1 vdsm kvm  437 Jan 18 11:32 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/ed18c515-09c9-4a71-af0a-7f0934193a65/b5e53c81-2279-4f2b-b282-69db430d36d4.meta
> -rw-r--r-- 1 vdsm kvm  437 Jan 18 11:32 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/3a00232b-c1f9-4b9b-910e-caf8b0321609/4f6d5c63-6a36-4356-832e-f52427d9512e.meta
> -rw-r--r-- 1 vdsm kvm  310 Jan 18 15:38 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/4d33f997-94b0-42c1-8052-5364993b85e9/8e613dd3-eebc-476a-a830-e2a8236ea8a8.meta
> 
> -rw-rw 1 vdsm qemu  16G Jan  9 17:25 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/baf01c4e-ede9-4e4e-a265-172695d81a83/4cdd72a7-b347-4479-accd-ab08d61552f9
> -rw-rw 1 vdsm qemu  30K Jan 18 11:32 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/ed18c515-09c9-4a71-af0a-7f0934193a65/b5e53c81-2279-4f2b-b282-69db430d36d4
> -rw-rw 1 vdsm qemu  30K Jan 18 11:32 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/3a00232b-c1f9-4b9b-910e-caf8b0321609/4f6d5c63-6a36-4356-832e-f52427d9512e
> -rw-rw 1 vdsm kvm  300G Jan 18 15:38 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/4d33f997-94b0-42c1-8052-5364993b85e9/8e613dd3-eebc-476a-a830-e2a8236ea8a8
> -rw-rw 1 vdsm qemu  32G Jan 18 15:58 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/b0f4c517-e492-409f-934f-1561281a242b/a3d60d8a-f89b-41dd-b519-fb652301b1f5
> -rw-rw 1 vdsm qemu  32G Jan 18 15:58 
> /rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-

[ovirt-users] Failed to attach a disk

2017-01-18 Thread Fabrice Bacchella
I upgraded an host to the latest version of vdsm: 
vdsm-4.18.21-1.el7.centos.x86_64, on a CentOS Linux release 7.3.1611 (Core)

I then created a disk that I wanted to attach to a running vm, but il fails, 
with the message in /var/log/libvirt/qemu/.log:

Could not open 
'/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/4d33f997-94b0-42c1-8052-5364993b85e9/8e613dd3-eebc-476a-a830-e2a8236ea8a8':
 Permission denied

I tried to have a look at the disks images, and got a strange result:

-rw-rw 1 vdsm qemu 1.0M May 18  2016 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/ed18c515-09c9-4a71-af0a-7f0934193a65/b5e53c81-2279-4f2b-b282-69db430d36d4.lease
-rw-rw 1 vdsm qemu 1.0M May 18  2016 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/3a00232b-c1f9-4b9b-910e-caf8b0321609/4f6d5c63-6a36-4356-832e-f52427d9512e.lease
-rw-rw 1 vdsm qemu 1.0M May 23  2016 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/b0f4c517-e492-409f-934f-1561281a242b/a3d60d8a-f89b-41dd-b519-fb652301b1f5.lease
-rw-rw 1 vdsm qemu 1.0M May 23  2016 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/465df4e9-3c62-4501-889f-cbab65ed0e0d/7a9b9033-f5f8-4eaa-ac94-6cc0c4ff6120.lease
-rw-rw 1 vdsm kvm  1.0M Jan  6 18:00 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/baf01c4e-ede9-4e4e-a265-172695d81a83/4cdd72a7-b347-4479-accd-ab08d61552f9.lease
-rw-rw 1 vdsm kvm  1.0M Jan 18 15:38 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/4d33f997-94b0-42c1-8052-5364993b85e9/8e613dd3-eebc-476a-a830-e2a8236ea8a8.lease

-rw-r--r-- 1 vdsm qemu 314 May 23  2016 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/b0f4c517-e492-409f-934f-1561281a242b/a3d60d8a-f89b-41dd-b519-fb652301b1f5.meta
-rw-r--r-- 1 vdsm kvm  314 Jan  6 18:00 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/465df4e9-3c62-4501-889f-cbab65ed0e0d/7a9b9033-f5f8-4eaa-ac94-6cc0c4ff6120.meta
-rw-r--r-- 1 vdsm kvm  307 Jan  6 18:00 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/baf01c4e-ede9-4e4e-a265-172695d81a83/4cdd72a7-b347-4479-accd-ab08d61552f9.meta
-rw-r--r-- 1 vdsm kvm  437 Jan 18 11:32 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/ed18c515-09c9-4a71-af0a-7f0934193a65/b5e53c81-2279-4f2b-b282-69db430d36d4.meta
-rw-r--r-- 1 vdsm kvm  437 Jan 18 11:32 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/3a00232b-c1f9-4b9b-910e-caf8b0321609/4f6d5c63-6a36-4356-832e-f52427d9512e.meta
-rw-r--r-- 1 vdsm kvm  310 Jan 18 15:38 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/4d33f997-94b0-42c1-8052-5364993b85e9/8e613dd3-eebc-476a-a830-e2a8236ea8a8.meta

-rw-rw 1 vdsm qemu  16G Jan  9 17:25 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/baf01c4e-ede9-4e4e-a265-172695d81a83/4cdd72a7-b347-4479-accd-ab08d61552f9
-rw-rw 1 vdsm qemu  30K Jan 18 11:32 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/ed18c515-09c9-4a71-af0a-7f0934193a65/b5e53c81-2279-4f2b-b282-69db430d36d4
-rw-rw 1 vdsm qemu  30K Jan 18 11:32 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/3a00232b-c1f9-4b9b-910e-caf8b0321609/4f6d5c63-6a36-4356-832e-f52427d9512e
-rw-rw 1 vdsm kvm  300G Jan 18 15:38 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/4d33f997-94b0-42c1-8052-5364993b85e9/8e613dd3-eebc-476a-a830-e2a8236ea8a8
-rw-rw 1 vdsm qemu  32G Jan 18 15:58 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/b0f4c517-e492-409f-934f-1561281a242b/a3d60d8a-f89b-41dd-b519-fb652301b1f5
-rw-rw 1 vdsm qemu  32G Jan 18 15:58 
/rhev/data-center/17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b/7c5291d3-11e2-420f-99ad-47a376013671/images/465df4e9-3c62-4501-889f-cbab65ed0e0d/7a9b9033-f5f8-4eaa-ac94-6cc0c4ff6120


What a strange mix of group owner. Any explanation for that ? Is that a known 
bug ?

The new disk is the 300G one, owned by kvm.


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


Re: [ovirt-users] I wrote an oVirt thing

2016-11-27 Thread Fabrice Bacchella
Looks like close to my own try :

https://github.com/fbacchella/ovirtcmd


> Le 26 nov. 2016 à 22:10, Chris Cowley  a écrit :
> 
> Hi all
> 
> I started hacking together something last night to use as a CLI to
> manage my oVirt clusters.
> 
> https://gogs.chriscowley.me.uk/chriscowley/ovirtmanage
> 
> Currently it can create/delete a VM, list the VMS, and I started a
> function to show the details, but all that does for now is return the ID.
> 
> The plan is for it to evolve with my own needs, but I am open to
> ideas/PRs from the community.
> 
> Disclaimer #1: I am a SysAdmin, not a developer. If you a proper
> developer, what you see may cause you physical pain.
> 
> Disclaimer #2: My Gogs repo is behind my ADSL in rural France, be
> patient and I withold the right to not respect any sort of SLA :-)
> 
> 
> -- 
> Regards
> 
> Chris Cowley
> http://about.me/chriscowley
> 
> ___
> 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] new internal SSO

2016-08-12 Thread Fabrice Bacchella
I'm currently fighting with the new mandatory SSO system introduced in 4.0.

It's also used internally as ovirt-engine is calling himself, as shown in the 
apache log, to identity himself to himself:

[2016-08-12 11:30:24] 10.83.16.34 "ovirt.prod.exalead.com" "POST 
/ovirt-engine/sso/status HTTP/1.1" 256 401 + 163 "-" "Java/1.8.0_92"
[2016-08-12 10:55:49] 10.83.16.34 "ovirt.prod.exalead.com" "POST 
/ovirt-engine/sso/oauth/token HTTP/1.1" 237 401 + 163 "-" "Java/1.8.0_92"

But the sso will be acceded by human too:

[2016-08-12 11:29:27] 192.168.205.59 "ovirt.prod.exalead.com" "GET 
/ovirt-engine/sso/interactive-redirect-to-module HTTP/1.1" 5097 302 + - 
"https://ovirt.prod.exalead.com/ovirt-engine/; "Mozilla/5.0 (Macintosh; Intel 
Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0"


I'm using a custom apache configuration, as I need that to better integrate 
ovirt in our running SSO and PKI setup.

So under SSO I wonder which part needs to be protected using our own SSO, and 
what part can be open to any access, and the internal security of ovirt will 
manage it ?

In https://bugzilla.redhat.com/show_bug.cgi?id=1342192, it seems for me that 
^/ovirt-engine/sso/(interactive-login-negotiate|oauth/token-http-auth) needs to 
be protected. Am i right ?

In my log, I've seen access to:

/ovirt-engine/sso/status
/ovirt-engine/sso/oauth/token-info
/ovirt-engine/webadmin/sso/oauth2-callback
/ovirt-engine/webadmin/sso/login
/ovirt-engine/sso/oauth/token
/ovirt-engine/sso/oauth/authorize
/ovirt-engine/sso/interactive-redirect-to-module
/ovirt-engine/sso/interactive-login-next-auth
/ovirt-engine/sso/interactive-login-negotiate/ovirt-auth___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Unable to login to the WEB UI

2016-08-12 Thread Fabrice Bacchella

> Le 11 août 2016 à 11:37, Fabrice Bacchella <fabrice.bacche...@icloud.com> a 
> écrit :
> 
> 
>> Le 11 août 2016 à 09:31, Martin Perina <mper...@redhat.com 
>> <mailto:mper...@redhat.com>> a écrit :
>> 
>> Hi Fabrice,
>> 
>> so it seems to me that ovirt-engine-rename didn't work as expected, because 
>> you have changed ENGINE_FQDN in 10-setup-protocols.conf. We don't support 
>> user updates on automatically generated files in 
>> /etc/ovirt-engine/engine.conf.d/. Please next time you'd like to change 
>> something, change it in 99-custom-???.conf file.
> 
> I roll back this change, as you said it was not enough and then the rename 
> command..
> 
>> 
>> Now how to get things working: I'm afraid it would be long and painful 
>> process, but let's try:
>> 
>> 1. Change manually ENGINE_FQDN to the new value you have used as new FQDN in 
>> ovirt-engine-rename in those files:
>> 
>> /etc/ovirt-engine/engine.conf.d/10-setup-protocols.conf
>> /etc/ovirt-engine/imageuploader.conf.d/10-engine-setup.conf
>> /etc/ovirt-engine/isouploader.conf.d/10-engine-setup.conf
>> /etc/ovirt-engine/logcollector.conf.d/10-engine-setup.conf
>> 
>> 2. Now, let's check your custom certificates, I know you are using your 
>> custom CA, does the trustore you have set into ENGINE_HTTPS_PKI_TRUST_STORE 
>> contains all certificates which are needed to verify HTTPS certificates you 
>> have set in Apache for new FQDN? If so, then please restart your engine and 
>> try
>> 
>> Thanks
>> 
>> Martin Perina
> 
> I'm not sur the PKI part is the biggest problem. I managed to get it work 
> after a rename and using a custom truststore with all the needed CA.
> 
> My main problem is with this strange 
> User login failure: java.lang.RuntimeException: server_error: 
> org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 
> 60)): expected a valid value (number, String, array, object, 'true', 'false' 
> or 'null')
> 
> that no one seems to understand where it came from. Ravi suggest to do not 
> use custom certificate, but I think it's impossible to test this now, because 
> of the incomplete operation of the rename command. So I will but back my 
> trust store and we should focus on this message.
> 
> By the way, I'm on irc on the channel with the nick FabriceB.

Ok we finally nailed that problem with the help of Ravi Nori. Because of the 
new SSO settings, ovirt-engine made a called to itself, from within the same 
process. But it needed to go through apache to authentify itself by itself and 
was intercepted by my SSO setup. I will need to rewrite it and split URL.



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


Re: [ovirt-users] Unable to login to the WEB UI

2016-08-10 Thread Fabrice Bacchella
I'm not sure it's a good idea if you're running 4.0. This procedure does half 
of the job as it don't touch the custom java trust store and missing parts are 
mandatory for ovirt 4. So I'm now stuck with an unreachable UI after
an upgrade and I don't know if I can roll back. 

> Le 10 août 2016 à 17:30, Marcelo Leandro <marcelol...@gmail.com> a écrit :
> 
> Good morning ,
> 
> "You need to have correctly set up engine FQDN and it has to be resolvable. 
> If you don't have correctly set engine FQDN, you can fix that ​​using 
> ovirt​-engine-rename tool, more info can be found at:
> 
> https://www.ovirt.org/documentation/how-to/networking/changing-engine-hostname/
>  
> <https://www.ovirt.org/documentation/how-to/networking/changing-engine-hostname/>
>  "
> 
> can I make the procedure with host and vms in production?
> 
> Thanks.
> 
> 2016-08-03 14:34 GMT-03:00 Martin Perina <mper...@redhat.com 
> <mailto:mper...@redhat.com>>:
> 
> 
> On Wed, Aug 3, 2016 at 5:25 PM, Fabrice Bacchella 
> <fabrice.bacche...@icloud.com <mailto:fabrice.bacche...@icloud.com>> wrote:
> Next step :
> 
> The UI says, even with a restarted navigator:
> 
> org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 
> 60)): expected a valid value (number, String, array, object, 'true', 'false' 
> or 'null') at [Source: java.io.StringReader@74749f78; line: 3, column: 2]
> 
> ​I haven't seen this error before, could you please share server.log and 
> engine.log?
> ​ 
> 
> 
> I shift-reload, got a welcome screen, click on "Administration portal". I 
> then got a warning. The vhost for ovirt is "ovirt.mydomain", but I got a 
> redirect to:
> https://ovirt.mydomain/ovirt-engine/webadmin/sso/login?_url=https%3A%2F%2Fovirt.mydomain%2Fovirt-engine%2Fwebadmin%2F%3Flocale%3Den_US=en_US
>  
> <https://ovirt.mydomain/ovirt-engine/webadmin/sso/login?_url=https%3A%2F%2Fovirt.mydomain%2Fovirt-engine%2Fwebadmin%2F%3Flocale%3Den_US=en_US>
> that then redirect to:
> https://realhost.mydomain:443/ovirt-engine/sso/oauth/authorize?client_id=ovirt-engine-core_type=code_uri=https%3A%2F%2Fovirt.mydomain%3A443%2Fovirt-engine%2Fwebadmin%2Fsso%2Foauth2-callback=ovirt-app-admin+ovirt-app-portal+ovirt-ext%3Dauth%3Asequence-priority%3D%7E=5ku3vXkfb10
>  
> <https://realhost.mydomain/ovirt-engine/sso/oauth/authorize?client_id=ovirt-engine-core_type=code_uri=https%3A%2F%2Fovirt.mydomain%3A443%2Fovirt-engine%2Fwebadmin%2Fsso%2Foauth2-callback=ovirt-app-admin+ovirt-app-portal+ovirt-ext%3Dauth%3Asequence-priority%3D%7E=5ku3vXkfb10>
> 
> And it fail with again with still:
> org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 
> 60)): expected a valid value (number, String, array, object, 'true', 'false' 
> or 'null') at [Source: java.io.StringReader@328a4512; line: 3, column: 2]​ 
> 
> Many requests were send to ovirt.mydomain, but just one to 
> realhost.mydomain:443, I don't know why.
> 
> ​You need to have correctly set up engine FQDN and it has to be resolvable. 
> If you don't have correctly set engine FQDN, you can fix that ​​using 
> ovirt​-engine-rename tool, more info can be found at:
> 
> https://www.ovirt.org/documentation/how-to/networking/changing-engine-hostname/
>  
> <https://www.ovirt.org/documentation/how-to/networking/changing-engine-hostname/>
> 
> Also be aware that you need to use that engine FQDN to access oVirt 4.0
> 
> 
> I didn't ask for any SSO, I already use my own (CAS), it was working well and 
> the update never ask for activating something new.
> 
> ​This is one of the oVirt 4.0 features​, we have implemented OAUTH SSO for 
> all engine parts: webadmin, userportal and restapi. If you are using CAS 
> (althought it's officially supported by oVirt), that probably means you have 
> configured cas authentication on Apache, passing authenticated username using 
> aaa-misc as authn extension and aaa-ldap as authz extension (to get group 
> memberships for authenticated user). If that's true then please take a look 
> at 
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1342192 
> <https://bugzilla.redhat.com/show_bug.cgi?id=1342192>
> 
> there are some changes on Apache configuration (the bug is for kerberos, but 
> I suspect similar config is needed also for cas module in apache).
> 
> 
> 
> > Le 3 août 2016 à 15:09, Martin Perina <mper...@redhat.com 
> > <mailto:mper...@redhat.com>> a écrit :
> >
> > Hi,
> > please follow steps as described in BZ:
> >
> > 1. Create /etc/ovirt-engine/engine.conf.d/99-custom-truststore.conf (you 
> > may choose different filename but it has to end with '.conf' suffix)

Re: [ovirt-users] upgrade to ovirt 4 failed

2016-08-08 Thread Fabrice Bacchella

> Le 8 août 2016 à 08:34, Sandro Bonazzola <sbona...@redhat.com> a écrit :
> 
> 
> 
> On Wed, Aug 3, 2016 at 12:19 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> I'm running on Centos 7, just upgraded to ovirt 4.01 using the procedure 
> given in the release notes.
> 
> But now I'm getting that in /var/log/ovirt-engine/engine.log:
> 
> 2016-08-03 12:04:39,751 ERROR [org.ovirt.engine.core.bll.Backend] 
> (ServerService Thread Pool -- 54) [] Error during initialization: 
> org.jboss.weld.exceptions.WeldException: WELD-49: Unable to invoke 
> private void org.ovirt.engine.core.vds
> broker.ResourceManager.init() on 
> org.ovirt.engine.core.vdsbroker.ResourceManager@28b87a8e
> at 
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:100)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> at 
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:81)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> at 
> org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:126)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:162) 
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> at 
> org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) 
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> at 
> org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> at 
> org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> at 
> org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) 
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> at 
> org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742) 
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> ...
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> [rt.jar:1.8.0_92]
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> [rt.jar:1.8.0_92]
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  [rt.jar:1.8.0_92]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
> at 
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:98)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> ... 82 more
> Caused by: java.lang.NullPointerException
> at 
> org.postgresql.jdbc.TypeInfoCache.getSQLType(TypeInfoCache.java:182)
> 
> 
> Can you please check the version of postgresql-jdbc you're using? Looks like 
> an issue while talking with the driver.


Yes, Martin Perina told me about that and it solve my problem. I was using a 
postgresql-jdbc 9.4, only 9.2 is allowed.



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


Re: [ovirt-users] Unable to login to the WEB UI

2016-08-03 Thread Fabrice Bacchella
Next step :

The UI says, even with a restarted navigator:

org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): 
expected a valid value (number, String, array, object, 'true', 'false' or 
'null') at [Source: java.io.StringReader@74749f78; line: 3, column: 2] 


I shift-reload, got a welcome screen, click on "Administration portal". I then 
got a warning. The vhost for ovirt is "ovirt.mydomain", but I got a redirect to:
https://ovirt.mydomain/ovirt-engine/webadmin/sso/login?_url=https%3A%2F%2Fovirt.mydomain%2Fovirt-engine%2Fwebadmin%2F%3Flocale%3Den_US=en_US
that then redirect to:
https://realhost.mydomain:443/ovirt-engine/sso/oauth/authorize?client_id=ovirt-engine-core_type=code_uri=https%3A%2F%2Fovirt.mydomain%3A443%2Fovirt-engine%2Fwebadmin%2Fsso%2Foauth2-callback=ovirt-app-admin+ovirt-app-portal+ovirt-ext%3Dauth%3Asequence-priority%3D%7E=5ku3vXkfb10

And it fail with again with still:
org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): 
expected a valid value (number, String, array, object, 'true', 'false' or 
'null') at [Source: java.io.StringReader@328a4512; line: 3, column: 2] 

Many requests were send to ovirt.mydomain, but just one to 
realhost.mydomain:443, I don't know why.

I didn't ask for any SSO, I already use my own (CAS), it was working well and 
the update never ask for activating something new.  
  


> Le 3 août 2016 à 15:09, Martin Perina  a écrit :
> 
> Hi,
> please follow steps as described in BZ:
> 
> 1. Create /etc/ovirt-engine/engine.conf.d/99-custom-truststore.conf (you may 
> choose different filename but it has to end with '.conf' suffix) with 
> following content:
> 
>   ENGINE_HTTPS_PKI_TRUST_STORE=""
>   ENGINE_HTTPS_PKI_TRUST_STORE_PASSWORD=""
> 
> 2. Restart the engine
> 
> If the above doesn't work please attach server.log/engine.log
> 
> Thanks
> 
> Martin Perina

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


Re: [ovirt-users] Unable to login to the WEB UI

2016-08-03 Thread Fabrice Bacchella
Indeed, the certificate for the web interface is not coming from ovirt's 
internal PKI, but from our own internal one.

I have a custom trust store not located in /etc/pki/java/cacerts, I did try to 
add ENGINE_PROPERTIES="${ENGINE_PROPERTIES} 
javax.net.ssl.trustStore=.../allmyca.jks javax.net.ssl.trustStorePassword=''" 
in a file in /etc/ovirt-engine/engine.conf.d but it didn't help.

Can I add them in /etc/pki/ovirt-engine/.truststore ?
> 
> Le 3 août 2016 à 13:22, Martin Perina <mper...@redhat.com> a écrit :
> 
> Hi,
> 
> are you using HTTPS certificate signed by external CA? If so please follow 
> steps described in Doc Text of
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1336838
> 
> Thanks
> 
> Martin Perina
> 
> 
> On Wed, Aug 3, 2016 at 1:18 PM, Fabrice Bacchella 
> <fabrice.bacche...@icloud.com> wrote:
> After the upgrad, I'm unable to log in, I'm getting the following error:
> 
>  sun.security.validator.ValidatorException: PKIX path building failed: 
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
> valid certification path
>  to requested target
> 
> 
> Where should I look to correct that ?
> ___
> 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] Unable to login to the WEB UI

2016-08-03 Thread Fabrice Bacchella
After the upgrad, I'm unable to log in, I'm getting the following error:

 sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path
 to requested target


Where should I look to correct that ?
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Unusable log in engine.log

2016-08-03 Thread Fabrice Bacchella
In the engine.log, there are many line like that :
grep '2016-08-03 13:00:46,371 INFO  
.org.ovirt.engine.core.vdsbroker.HostDevListByCapsVDSCommand. 
.org.ovirt.thread.pool-8-thread-16. .28054a0c. ' 
/var/log/ovirt-engine/engine.log | wc   
  18574  179635

1 line
8574 words
179635 characters.

And at the INFO level. It's almost impossible to check logs with line like 
that. They should be :
1/at trace level
2/send to a dedicated file
3/don't be logged at all.


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


Re: [ovirt-users] Upgrade to 4.0.1 failed with NPE on org.postgresql.jdbc.TypeInfoCache.getSQLType

2016-08-03 Thread Fabrice Bacchella
Just a little investigation show :

# lsof -p  | grep postgresql-jdbc.jar
java2138 ovirt  mem   REG8,2486139 18729421 
/usr/share/java/postgresql-jdbc.jar

rpm -qf /usr/share/java/postgresql-jdbc.jar
postgresql-jdbc-9.4.1208-1.rhel7.noarch

rpm -qi postgresql-jdbc-9.4.1208-1.rhel7.noarch
...
URL : https://jdbc.postgresql.org/

And indeed I needed to install pgdg-94-centos.repo, my note says the package 
was needed by ovirt, I don't remember why. And indeed :
yum erase postgresql94-server
...
Removing:
 postgresql94-server
  x86_64 9.4.8-1PGDG.rhel7  
  @pgdg94   
  17 M
Removing for dependencies:
 ovirt-engine   
  noarch 4.0.1.1-1.el7.centos   
  @ovirt-4.0
 2.6 M
 ovirt-engine-backend   
  noarch 4.0.1.1-1.el7.centos   
  @ovirt-4.0
  13 M

So I tried:

yum downgrade postgresql-jdbc
...
---> Package postgresql-jdbc.noarch 0:9.2.1002-5.el7 will be a downgrade
...

And now it (almost) works. I have other not linked problems that needs more 
investigations.


> Le 3 août 2016 à 12:39, Martin Perina <mper...@redhat.com> a écrit :
> 
> Hi,
> 
> what is the version of postgresql-jdbc package are you using? I saw this 
> error only with latest postgresql-jdbc drivers 9.4-1209, but those are not 
> packaged in RPMs AFAIK.
> 
> Thanks
> 
> Martin Perina
> 
> 
> On Wed, Aug 3, 2016 at 12:31 PM, Fabrice Bacchella 
> <fabrice.bacche...@icloud.com <mailto:fabrice.bacche...@icloud.com>> wrote:
> I'm running on Centos 7, just upgraded to ovirt 4.01 using the procedure 
> given in the release notes.
> 
> But now I'm getting that in /var/log/ovirt-engine/engine.log:
> 
> 2016-08-03 12:04:39,751 ERROR [org.ovirt.engine.core.bll.Backend] 
> (ServerService Thread Pool -- 54) [] Error during initialization: 
> org.jboss.weld.exceptions.WeldException: WELD-49: Unable to invoke 
> private void org.ovirt.engine.core.vds
> broker.ResourceManager.init() on 
> org.ovirt.engine.core.vdsbroker.ResourceManager@28b87a8e
>at 
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:100)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at 
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:81)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at 
> org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:126)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:162) 
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) 
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at 
> org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at 
> org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at 
> org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) 
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>at 
> org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742) 
> [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
> ...
> Caused by: java.lang.reflect.InvocationTargetException
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> [rt.jar:1.8.0_92]
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> [rt.jar:1.8.0_92]
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  [rt.jar:1.8.0_92]
>at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
>at 
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:98)
>  [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
>... 82 more
> Caused by: java.lang.NullPointerException
>at org.postgresql.jdbc.TypeInf

[ovirt-users] Upgrade to 4.0.1 failed with NPE on org.postgresql.jdbc.TypeInfoCache.getSQLType

2016-08-03 Thread Fabrice Bacchella
I'm running on Centos 7, just upgraded to ovirt 4.01 using the procedure given 
in the release notes.

But now I'm getting that in /var/log/ovirt-engine/engine.log:

2016-08-03 12:04:39,751 ERROR [org.ovirt.engine.core.bll.Backend] 
(ServerService Thread Pool -- 54) [] Error during initialization: 
org.jboss.weld.exceptions.WeldException: WELD-49: Unable to invoke private 
void org.ovirt.engine.core.vds
broker.ResourceManager.init() on 
org.ovirt.engine.core.vdsbroker.ResourceManager@28b87a8e
   at 
org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:100)
 [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
   at 
org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:81)
 [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
   at 
org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:126)
 [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
   at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:162) 
[weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
   at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) 
[weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
   at 
org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
 [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
   at 
org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
 [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
   at 
org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) 
[weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
   at 
org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742) 
[weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
...
Caused by: java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
[rt.jar:1.8.0_92]
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
[rt.jar:1.8.0_92]
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 [rt.jar:1.8.0_92]
   at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
   at 
org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:98)
 [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
   ... 82 more
Caused by: java.lang.NullPointerException
   at org.postgresql.jdbc.TypeInfoCache.getSQLType(TypeInfoCache.java:182)
   at org.postgresql.jdbc.TypeInfoCache.getSQLType(TypeInfoCache.java:178)
   at 
org.postgresql.jdbc.PgDatabaseMetaData.getProcedureColumns(PgDatabaseMetaData.java:1259)
   at 
org.postgresql.jdbc.PgDatabaseMetaData.getProcedureColumns(PgDatabaseMetaData.java:1040)
   at 
org.springframework.jdbc.core.metadata.GenericCallMetaDataProvider.processProcedureColumns(GenericCallMetaDataProvider.java:353)
 [spring-jdbc.jar:4.2.4.RELEASE]
   at 
org.springframework.jdbc.core.metadata.GenericCallMetaDataProvider.initializeWithProcedureColumnMetaData(GenericCallMetaDataProvider.java:112)
 [spring-jdbc.jar:4.2.4.RELEASE]
   at 
org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory$1.processMetaData(CallMetaDataProviderFactory.java:133)
 [spring-jdbc.jar:4.2.4.RELEASE]
   at 
org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:299)
 [spring-jdbc.jar:4.2.4.RELEASE]
   at 
org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory.createMetaDataProvider(CallMetaDataProviderFactory.java:73)
 [spring-jdbc.jar:4.2.4.RELEASE]
   at 
org.springframework.jdbc.core.metadata.CallMetaDataContext.initializeMetaData(CallMetaDataContext.java:286)
 [spring-jdbc.jar:4.2.4.RELEASE]
   at 
org.springframework.jdbc.core.simple.AbstractJdbcCall.compileInternal(AbstractJdbcCall.java:303)
 [spring-jdbc.jar:4.2.4.RELEASE]
   at 
org.ovirt.engine.core.dal.dbbroker.PostgresDbEngineDialect$PostgresSimpleJdbcCall.compileInternal(PostgresDbEngineDialect.java:108)
 [dal.jar:]
   at 
org.springframework.jdbc.core.simple.AbstractJdbcCall.compile(AbstractJdbcCall.java:288)
 [spring-jdbc.jar:4.2.4.RELEASE]
   at 
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.getCall(SimpleJdbcCallsHandler.java:169)
 [dal.jar:]
   at 
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:146)
 [dal.jar:]
   at 
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeReadList(SimpleJdbcCallsHandler.java:109)
 [dal.jar:]
   at 
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeRead(SimpleJdbcCallsHandler.java:101)
 [dal.jar:]
   at 
org.ovirt.engine.core.dao.VdsDynamicDaoImpl.get(VdsDynamicDaoImpl.java:129) 
[dal.jar:]
   at 

[ovirt-users] upgrade to ovirt 4 failed

2016-08-03 Thread Fabrice Bacchella
I'm running on Centos 7, just upgraded to ovirt 4.01 using the procedure given 
in the release notes.

But now I'm getting that in /var/log/ovirt-engine/engine.log:

2016-08-03 12:04:39,751 ERROR [org.ovirt.engine.core.bll.Backend] 
(ServerService Thread Pool -- 54) [] Error during initialization: 
org.jboss.weld.exceptions.WeldException: WELD-49: Unable to invoke private 
void org.ovirt.engine.core.vds
broker.ResourceManager.init() on 
org.ovirt.engine.core.vdsbroker.ResourceManager@28b87a8e
at 
org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:100)
 [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
at 
org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.postConstruct(DefaultLifecycleCallbackInvoker.java:81)
 [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
at 
org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(BasicInjectionTarget.java:126)
 [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:162) 
[weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) 
[weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
at 
org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
 [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
at 
org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
 [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
at 
org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) 
[weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
at 
org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:742) 
[weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
...
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
[rt.jar:1.8.0_92]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
[rt.jar:1.8.0_92]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 [rt.jar:1.8.0_92]
at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_92]
at 
org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:98)
 [weld-core-impl-2.3.2.Final.jar:2.3.2.Final]
... 82 more
Caused by: java.lang.NullPointerException
at org.postgresql.jdbc.TypeInfoCache.getSQLType(TypeInfoCache.java:182)
at org.postgresql.jdbc.TypeInfoCache.getSQLType(TypeInfoCache.java:178)
at 
org.postgresql.jdbc.PgDatabaseMetaData.getProcedureColumns(PgDatabaseMetaData.java:1259)
at 
org.postgresql.jdbc.PgDatabaseMetaData.getProcedureColumns(PgDatabaseMetaData.java:1040)
at 
org.springframework.jdbc.core.metadata.GenericCallMetaDataProvider.processProcedureColumns(GenericCallMetaDataProvider.java:353)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.springframework.jdbc.core.metadata.GenericCallMetaDataProvider.initializeWithProcedureColumnMetaData(GenericCallMetaDataProvider.java:112)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory$1.processMetaData(CallMetaDataProviderFactory.java:133)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:299)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.springframework.jdbc.core.metadata.CallMetaDataProviderFactory.createMetaDataProvider(CallMetaDataProviderFactory.java:73)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.springframework.jdbc.core.metadata.CallMetaDataContext.initializeMetaData(CallMetaDataContext.java:286)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.springframework.jdbc.core.simple.AbstractJdbcCall.compileInternal(AbstractJdbcCall.java:303)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.ovirt.engine.core.dal.dbbroker.PostgresDbEngineDialect$PostgresSimpleJdbcCall.compileInternal(PostgresDbEngineDialect.java:108)
 [dal.jar:]
at 
org.springframework.jdbc.core.simple.AbstractJdbcCall.compile(AbstractJdbcCall.java:288)
 [spring-jdbc.jar:4.2.4.RELEASE]
at 
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.getCall(SimpleJdbcCallsHandler.java:169)
 [dal.jar:]
at 
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:146)
 [dal.jar:]
at 
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeReadList(SimpleJdbcCallsHandler.java:109)
 [dal.jar:]
at 
org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeRead(SimpleJdbcCallsHandler.java:101)
 [dal.jar:]
at 
org.ovirt.engine.core.dao.VdsDynamicDaoImpl.get(VdsDynamicDaoImpl.java:129) 
[dal.jar:]
at 

[ovirt-users] ldap and multiple profiles

2016-07-04 Thread Fabrice Bacchella
I want to setup two LDAP base profile.

One is backed using an active directory (for real users)
One is backed using an openldap (for service account).

I have to problem with this setup.

One it's that in the log I see many "Creating LDAP pool 'authz'" and "Creating 
LDAP pool 'authn'". If I have two LDAP backend, I'm afraid they will be a 
conflict of ldap pool if they used the same name.

I tried to add in my openldap.properties:

search.simple-namespace.pool = authz-prod
search.simple-user-fetch.pool = authz-prod
search.simple-resolve-groups-member.pool = authz-prod
search.simple-resolve-groups-memberOf-item.pool = authz-prod
search.simple-resolve-groups-memberOf.pool = authz-prod
search.simple-query-principals.pool = authz-prod
search.simple-query-groups.pool = authz-prod

Is that enough ? And Why is it replicated many time ?

I have another problem, there is a stupid bug in my openldap configuration, but 
it will be difficult to resolve that.

In it, there is two naming context
dc=sub,dc=example,dc=com
and 
dc=example,dc=com

Ovirt only see the first one, and of course, with a little help from Murphy, I 
need the seconde one. Is there anything I can do about that ?

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


Re: [ovirt-users] Network redundancy with Manual balancing per VLAN

2016-06-27 Thread Fabrice Bacchella
Isn't teaming[1] the futur, instead of bonding ?

[1] http://rhelblog.redhat.com/2014/06/23/team-driver/


> Le 27 juin 2016 à 14:31, Fernando Frediani  a 
> écrit :
> 
> Thanks for the reply.
> 
> Perhaps is the case of contacting the maintainer of Linux Bond module and see 
> if there is room for this feature to be implement anytime. OVS is great in 
> the coming future, but Bond module is still something very handy that 
> simplify the things a lot.
> 
> Thanks
> Fernando
> 
> Em 27/06/2016 03:00, Edward Haas escreveu:
>> 
>> 
>> On Sun, Jun 26, 2016 at 4:37 PM, Yevgeny Zaspitsky < 
>> yzasp...@redhat.com 
>> > wrote:
>> Dan, Edy,
>> 
>> Could you guys answer this?
>> 
>> IIUC, the requirements are:
>> stream the traffic of few VLANs(network roles) through a single bond
>> be able to bind a VLAN to a bond slave with an option of fallback
>> have redundancy
>> assign different QoS to every VLAN (my addition)
>> I guess this is a new RFC that we do not support currently, but would we be 
>> able to provide in any future?
>> 
>> -- Forwarded message --
>> From: Fernando Frediani < 
>> fernando.fredi...@upx.com.br 
>> >
>> Date: Sat, Jun 25, 2016 at 11:17 PM
>> Subject: [ovirt-users] Network redundancy with Manual balancing per VLAN
>> To: users@ovirt.org 
>> 
>> 
>> Hello,
>> 
>> In VMware it is possible to bond two network interfaces and for each 
>> Portgroup (equivalent to a VLAN) is possible to tell which of the physical 
>> interfaces underneath it you wish the traffic to flow primarily and which 
>> stays as secondary(bond mode=1 equivalent). So for certain VLANs 
>> (Management, Live Migration, etc) is possible to force traffic flow via one 
>> physical NIC of the bond and for other VLANs (Virtual Machine's traffic) 
>> outs via the other NIC with failover to each other should a cable or switch 
>> fails.
>> 
>> This is specially good for better utilize the fewer NICs available and still 
>> have redundancy.
>> 
>> In oVirt it is also possible to have bonds, but would it still be possible 
>> to do that same and favor the traffic per VLAN basis ? I guess it is 
>> something related to Linux Bond module but perhaps someone has done this 
>> already.
>> 
>> 
>>  
>> Thanks
>> 
>> Fernando
>> 
>> ___
>> Users mailing list
>> Users@ovirt.org 
>> http://lists.ovirt.org/mailman/listinfo/users 
>> 
>> 
>> 
>> Hello Fernando,
>> 
>> As you mentioned, oVirt is using the Linux Bond and the solution you are 
>> looking for is not supported.
>> The oVirt way to handle this is by applying QoS on the networks, providing 
>> the guaranteed rates for each and utilizing the bond for throughput beyond 
>> the one link limit.
>> 
>> With the introduction of OVS as an alternative networking infrastructure for 
>> the hosts, you could create a hook that implements some special 
>> functionality, but ovs is not in yet.
>> 
>> Thanks,
>> Edy.
>> 
>> 
> 
> ___
> 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] migration failed with permission denied

2016-06-17 Thread Fabrice Bacchella

> Le 17 juin 2016 à 12:33, Vinzenz Feenstra <vfeen...@redhat.com> a écrit :
> 
> 
>> On Jun 17, 2016, at 12:12 PM, Fabrice Bacchella 
>> <fabrice.bacche...@icloud.com <mailto:fabrice.bacche...@icloud.com>> wrote:
>> 
>> 
>>> Le 17 juin 2016 à 12:05, Vinzenz Feenstra <vfeen...@redhat.com 
>>> <mailto:vfeen...@redhat.com>> a écrit :
>>> 
>>> Hi Fabrice,
>>> 
>>>> On Jun 17, 2016, at 11:41 AM, Fabrice Bacchella 
>>>> <fabrice.bacche...@icloud.com <mailto:fabrice.bacche...@icloud.com>> wrote:
>>>> 
>>>> I'm running an up to date ovirt setup.
>>>> 
>>>> I tried to put an host in maintenance mode, with one VM running on it.
>>>> 
>>>> It failed with this message in vdsm.log:
>>>> 
>> 
>>>> libvirtError: internal error: process exited while connecting to monitor: 
>>>> 2016-06-17T09:30:04.429323Z qemu-kvm: -chardev 
>>>> socket,id=charchannel0,path=/var/lib/libvirt/qemu/channels/b82209c9-42ff-457c-bb98-b6a2034833fc.com.redhat.rhevm.vdsm,server,nowait:
>>>>  Failed to bind socket to 
>>>> /var/lib/libvirt/qemu/channels/b82209c9-42ff-457c-bb98-b6a2034833fc.com.redhat.rhevm.vdsm:
>>>>  Permission denied
>>> 
>>> This is pretty odd, could you please send me the out put of this:
>>> 
>>> # rpm -qa | grep vdsm
>>> 
>>> From the target and destination hosts. Thanks.
>> 

> 
> Thanks.
> 
> And on the destination server what are the access rights on 
> /var/lib/libvirt/qemu/channels? 
On both:
drwxrwxr-x 2 vdsm qemu 137 Jun 14 15:35 /var/lib/libvirt/qemu/channels
drwxrwxr-x 2 vdsm qemu 6 May 24 16:03 /var/lib/libvirt/qemu/channels

> And if you have SELinux enabled can you temporary set it to permissive on the 
> destination and try to migrate?

SELinux is disabled on both.


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


Re: [ovirt-users] migration failed with permission denied

2016-06-17 Thread Fabrice Bacchella

> Le 17 juin 2016 à 12:05, Vinzenz Feenstra <vfeen...@redhat.com> a écrit :
> 
> Hi Fabrice,
> 
>> On Jun 17, 2016, at 11:41 AM, Fabrice Bacchella 
>> <fabrice.bacche...@icloud.com <mailto:fabrice.bacche...@icloud.com>> wrote:
>> 
>> I'm running an up to date ovirt setup.
>> 
>> I tried to put an host in maintenance mode, with one VM running on it.
>> 
>> It failed with this message in vdsm.log:
>> 

>> libvirtError: internal error: process exited while connecting to monitor: 
>> 2016-06-17T09:30:04.429323Z qemu-kvm: -chardev 
>> socket,id=charchannel0,path=/var/lib/libvirt/qemu/channels/b82209c9-42ff-457c-bb98-b6a2034833fc.com.redhat.rhevm.vdsm,server,nowait:
>>  Failed to bind socket to 
>> /var/lib/libvirt/qemu/channels/b82209c9-42ff-457c-bb98-b6a2034833fc.com.redhat.rhevm.vdsm:
>>  Permission denied
> 
> This is pretty odd, could you please send me the out put of this:
> 
> # rpm -qa | grep vdsm
> 
> From the target and destination hosts. Thanks.

On the host I was trying to put on maintenance:
vdsm-xmlrpc-4.17.28-0.el7.centos.noarch
vdsm-4.17.28-0.el7.centos.noarch
vdsm-infra-4.17.28-0.el7.centos.noarch
vdsm-yajsonrpc-4.17.28-0.el7.centos.noarch
vdsm-python-4.17.28-0.el7.centos.noarch
vdsm-jsonrpc-4.17.28-0.el7.centos.noarch
vdsm-hook-vmfex-dev-4.17.28-0.el7.centos.noarch
vdsm-cli-4.17.28-0.el7.centos.noarch

And it was trying to send to an host with:
vdsm-yajsonrpc-4.17.28-1.el7.noarch
vdsm-cli-4.17.28-1.el7.noarch
vdsm-python-4.17.28-1.el7.noarch
vdsm-hook-vmfex-dev-4.17.28-1.el7.noarch
vdsm-xmlrpc-4.17.28-1.el7.noarch
vdsm-4.17.28-1.el7.noarch
vdsm-infra-4.17.28-1.el7.noarch
vdsm-jsonrpc-4.17.28-1.el7.noarch

And in the log about that:
jsonrpc.Executor/1::DEBUG::2016-06-17 
11:39:57,233::__init__::503::jsonrpc.JsonRpcServer::(_serveRequest) Calling 
'VM.migrate' in bridge with {u'params': {u
'tunneled': u'false', u'dstqemu': u'XX.XX.XX.28', u'autoConverge': u'false', 
u'src': u'nb0101.XXX', u'dst': u'nb0105.XXX:54321', u
'vmId': u'b82209c9-42ff-457c-bb98-b6a2034833fc', u'abortOnError': u'true', 
u'compressed': u'false', u'method': u'online'}, u'vmID': 
u'b82209c9-42ff-457c-bb9
8-b6a2034833fc'}
jsonrpc.Executor/1::DEBUG::2016-06-17 11:39:57,234::API::547::vds::(migrate) 
{u'tunneled': u'false', u'dstqemu': u'XX.XX.XX.28', u'autoConverge': u'false', 
u'src': u'nb0101.XXX', u'dst': u'nb0105.XXX:54321', u'vmId': 
u'b82209c9-42ff-457c-bb98-b6a2034833fc', u'abortOnError': u'true', u'
compressed': u'false', u'method': u'online'}

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


[ovirt-users] update eats maintenance reason

2016-06-17 Thread Fabrice Bacchella
I put an host in maintenance with 'update reason' :


maintenance
update


Then click "Upgrade in the GUI, the maintenance reason is gone :

maintenance


Using the API gave the same result.


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


[ovirt-users] migration failed with permission denied

2016-06-17 Thread Fabrice Bacchella
I'm running an up to date ovirt setup.

I tried to put an host in maintenance mode, with one VM running on it.

It failed with this message in vdsm.log:

Thread-351083::ERROR::2016-06-17 
11:30:04,732::migration::209::virt.vm::(_recover) 
vmId=`b82209c9-42ff-457c-bb98-b6a2034833fc`::internal error: process exited 
while connecting to monitor: 2016-06-17T09:30:04.429323Z qemu-kvm: -chardev 
socket,id=charchannel0,path=/var/lib/libvirt/qemu/channels/b82209c9-42ff-457c-bb98-b6a2034833fc.com.redhat.rhevm.vdsm,server,nowait:
 Failed to bind socket to 
/var/lib/libvirt/qemu/channels/b82209c9-42ff-457c-bb98-b6a2034833fc.com.redhat.rhevm.vdsm:
 Permission denied
...
Traceback (most recent call last):
  File "/usr/share/vdsm/virt/migration.py", line 298, in run
self._startUnderlyingMigration(time.time())
  File "/usr/share/vdsm/virt/migration.py", line 364, in 
_startUnderlyingMigration
self._perform_migration(duri, muri)
  File "/usr/share/vdsm/virt/migration.py", line 403, in _perform_migration
self._vm._dom.migrateToURI3(duri, params, flags)
  File "/usr/share/vdsm/virt/virdomain.py", line 68, in f
ret = attr(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 124, 
in wrapper
ret = f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 1313, in wrapper
return func(inst, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1836, in 
migrateToURI3
if ret == -1: raise libvirtError ('virDomainMigrateToURI3() failed', 
dom=self)
libvirtError: internal error: process exited while connecting to monitor: 
2016-06-17T09:30:04.429323Z qemu-kvm: -chardev 
socket,id=charchannel0,path=/var/lib/libvirt/qemu/channels/b82209c9-42ff-457c-bb98-b6a2034833fc.com.redhat.rhevm.vdsm,server,nowait:
 Failed to bind socket to 
/var/lib/libvirt/qemu/channels/b82209c9-42ff-457c-bb98-b6a2034833fc.com.redhat.rhevm.vdsm:
 Permission denied

If i check the file, I see :

srwxrwxr-x 1 qemu qemu 0 May 31 16:21 
/var/lib/libvirt/qemu/channels/b82209c9-42ff-457c-bb98-b6a2034833fc.com.redhat.rhevm.vdsm

And on all my hosts, the permissions are the same:
srwxrwxr-x 1 qemu qemu /var/lib/libvirt/qemu/channels/*

And vdsm is running vdsm:
4 S vdsm  3816 1  0  60 -20 - 947345 poll_s May25 ?   02:21:58 
/usr/bin/python /usr/share/vdsm/vdsm

If I check vdsm groups:
~# id vdsm
uid=36(vdsm) gid=36(kvm) groups=36(kvm),179(sanlock),107(qemu)




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


[ovirt-users] strange API parameters default in python SDK

2016-06-06 Thread Fabrice Bacchella
When I'm looking the RHEV's documentation about the API class in the python 
SDK, I see :

persistent_auth
Specifies whether persistent authentication is enabled for this connection. 
Valid values are True and False. This parameter is optional and defaults to 
False.

filter
Specifies whether or not user permission based filter is on or off. Valid 
values are True and False. If the filter parameter is set to False - which is 
the default - then the authentication credentials provided must be those of an 
administrative user. If the filter parameter is set to True then any user can 
be used and the Manager will filter the actions available to the user based on 
their permissions.

I'm surprised, because in my mind, the default value are the least usefull 
version of each options. Why don't set them to good, useful values and let the 
user changed them to the opposite if there is some problems ?
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Getting SPICE connection parameters with Python-SDK

2016-06-06 Thread Fabrice Bacchella

Le 5 juin 2016 à 13:22, Michal Skrivanek  a écrit :


On 05 Jun 2016, at 12:37, nico...@devels.es wrote:

Hi,

On user portal, when users click on the "Connect" link of a VM that is 
configured to be run with "Native client" and SPICE protocol, a .vv file is 
generated with the connection parameters so the SPICE client knows where to 
connect: host, port, password, ...

Currently, is there a way to generate those parameters with the Python SDK? 
Especially the session password so it's possible to connect to the VM directly 
with a SPICE client.

Yes, you can either get either only the password/ticket or the whole vv file, 
which was introduced by https://bugzilla.redhat.com/show_bug.cgi?id=1128763

But this call is missing from the python SDK 3.6.5.2.

In the example, I see :
curl -k -u admin@internal:1 ... -H "Accept: application/x-virt-viewer"

But in ovirtsdk/infrastructure/connectionspool.py, line 106, I see:

header_lines.append("Accept: application/xml")

The Accept parameter is hard coded, the python SDK doesn't not allow to get the 
vv file, because that's the only settings that make a difference betwen getting 
the object and getting the vv file, as it's indicated in the rsdl :


Get active graphics console of a VM.

GET


Content-Type
application/xml|json|x-virt-viewer





current
true|false






GraphicsConsole






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


Re: [ovirt-users] Getting SPICE connection parameters with Python-SDK

2016-06-05 Thread Fabrice Bacchella

> Le 5 juin 2016 à 12:37, nico...@devels.es a écrit :
> 
> Hi,
> 
> On user portal, when users click on the "Connect" link of a VM that is 
> configured to be run with "Native client" and SPICE protocol, a .vv file is 
> generated with the connection parameters so the SPICE client knows where to 
> connect: host, port, password, ...
> 
> Currently, is there a way to generate those parameters with the Python SDK? 
> Especially the session password so it's possible to connect to the VM 
> directly with a SPICE client.

You can have a look at my example :

https://github.com/fbacchella/ovirtcmd/blob/master/ovlib/vms/__init__.py#L45

It does not generate a full vv file, but an usable URL any way.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] listing domains fails

2016-05-31 Thread Fabrice Bacchella
I'm trying to list domains using the api, and I'm getting a strange message :

> GET /api/storagedomains;case_sensitive=True HTTP/1.1
...
> Version: 3
> Content-Type: application/xml
> Accept: application/xml
> Filter: False
> Prefer: persistent-auth
> Content-Length: 0

< HTTP/1.1 404 Not Found
< 
< 
< Operation Failed
< Entity not found: Storage server connection: 
id=6860d96f-557e-4d82-a209-401d72bd6e16
< 

And in engine.log, I got:
Before:
2016-05-30 13:07:31,017 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand] 
(default task-25) [4c2e1822] START, DisconnectStorageServerVDSCommand(HostName 
= ng320, StorageServerConnectionManagementVDSParameters:{runAsync='true', 
hostId='4426ed42-0805-43b1-92d9-3e5a680eaf38', 
storagePoolId='----', storageType='LOCALFS', 
connectionList='[StorageServerConnections:{id='6860d96f-557e-4d82-a209-401d72bd6e16',
 connection='/data/ovirt/data', iqn='null', vfsType='null', 
mountOptions='null', nfsVersion='null', nfsRetrans='null', nfsTimeo='null', 
iface='null', netIfaceName='null'}]'}), log id: 63f890
...
2016-05-30 13:07:32,312 INFO  
[org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand] 
(default task-25) [4c2e1822] FINISH, DisconnectStorageServerVDSCommand, return: 
{6860d96f-557e-4d82-a209-401d72bd6e16=0}, log id: 63f890

When I run the command:
2016-05-31 15:34:11,259 ERROR 
[org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default 
task-13) [] Operation Failed: Entity not found: Storage server connection: 
id=6860d96f-557e-4d82-a209-401d72bd6e16

What's wrong ?___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] How to automate the ovirt host deployment?

2016-05-31 Thread Fabrice Bacchella

> Le 28 mai 2016 à 11:50, Arman Khalatyan  a écrit :
> 
> Thank you for the hint. I will try next week. 
> Foreman looks quite complex:)
> 
> I would prefer simple Python script with 4 lines: add, install, setup 
> networks and activate.
> 
You could have a look at my sample script:

https://github.com/fbacchella/ovirtcmd/blob/master/samples/noshared.py 


It use a custom library that wrap the official python sdk

It just expect that the engine have remote root ssh access on a new host, using 
public key.

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


Re: [ovirt-users] failing update ovirt-engine on centos 7

2016-05-30 Thread Fabrice Bacchella

> Le 30 mai 2016 à 15:01, Michal Skrivanek <michal.skriva...@redhat.com> a 
> écrit :
> 
> 
>> On 30 May 2016, at 14:57, Fabrice Bacchella <fabrice.bacche...@orange.fr> 
>> wrote:
>> 
>>> 
>>> Running with selinux disabled is not recommended nor supported.
>>> It should be easy to skip over that problem, but in general this is not 
>>> something you should hit in normal environment
>> 
>> That's very theorical recommandation. selinux is very very often disabled, 
>> because nobody really understand it.
> 
> It is not theoretical, it’s mandatory. there is an assumption it is enabled, 
> after bare OS installation it is enabled, so when you disable it it is an 
> explicit decision done by the admin for some reason. What did you find not 
> working? Did you really encounter anything not being solved by setting 
> Permissive mode instead disabling completely?
> 

What's the purpose of permissive ? if everything is allowed, what selinux is 
good for ? Instead of having something that run doing nothing, I shutdown it, 
and selinux is part of that generic policy.

What is a bad practice is switching selinux on and off. So my installation 
setup is done with selinux down and stay so for the whole server life of the 
server.

I never met a product that requisite selinux.

And more, I just have a look at your administration guide 
(http://www.ovirt.org/documentation/admin-guide/administration-guide/) and 
quickstart guide 
(http://www.ovirt.org/documentation/quickstart/quickstart-guide/). selinux is 
never declared as mandatory. There is just a few tips about the problem that 
one can have with selinux. 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] failing update ovirt-engine on centos 7

2016-05-30 Thread Fabrice Bacchella
> 
> Running with selinux disabled is not recommended nor supported.
> It should be easy to skip over that problem, but in general this is not 
> something you should hit in normal environment

That's very theorical recommandation. selinux is very very often disabled, 
because nobody really understand it.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] failing update ovirt-engine on centos 7

2016-05-25 Thread Fabrice Bacchella

> Le 25 mai 2016 à 17:25, Kapetanakis Giannis <bil...@edu.physics.uoc.gr> a 
> écrit :
> 
> On 25/05/16 17:59, Fabrice Bacchella wrote:
>> I have an dedicated machin to run ovirt-engine (not hosted). It's an up to 
>> date centos 7.2.1511
>> 
>> I installed ovirt 3.6.6 a few weeks ago (May 10 17:56:44 tells me yum.log)
>> 
>> Now, I'm trying a full yum update and getting :
>> # yum update
>> 
>> 
>> Error: Package: ovirt-engine-tools-3.6.5.3-1.el7.centos.noarch (@ovirt-3.6)
>>Requires: ovirt-engine-tools-backup = 3.6.5.3-1.el7.centos
>>Removing: ovirt-engine-tools-backup-3.6.5.3-1.el7.centos.noarch 
>> (@ovirt-3.6)
>>ovirt-engine-tools-backup = 3.6.5.3-1.el7.centos
>>Updated By: ovirt-engine-tools-backup-3.6.6.2-1.el7.centos.noarch 
>> (ovirt-3.6)
>>ovirt-engine-tools-backup = 3.6.6.2-1.el7.centos
>> 
>> 
> 
> Follow 3.6.6 release notes to update:
> https://www.ovirt.org/release/3.6.6/ <https://www.ovirt.org/release/3.6.6/>
> 
> 
> yum install  
> <http://resources.ovirt.org/pub/yum-repo/ovirt-release36.rpm>http://resources.ovirt.org/pub/yum-repo/ovirt-release36.rpm
>  <http://resources.ovirt.org/pub/yum-repo/ovirt-release36.rpm>
> yum update ovirt\*setup\*
> and then run
> engine-setup to update the rest of the packages.

I have seen this doc.

It updates a few components and what about the others ? The readme talk about 
running engine-setup, but not that it will updates other packages. I thought 
that ovirt-engine is for engine setup, not upgrading.

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


[ovirt-users] failing update ovirt-engine on centos 7

2016-05-25 Thread Fabrice Bacchella
I have an dedicated machin to run ovirt-engine (not hosted). It's an up to date 
centos 7.2.1511

I installed ovirt 3.6.6 a few weeks ago (May 10 17:56:44 tells me yum.log)

Now, I'm trying a full yum update and getting :
# yum update


Error: Package: ovirt-engine-tools-3.6.5.3-1.el7.centos.noarch (@ovirt-3.6)
   Requires: ovirt-engine-tools-backup = 3.6.5.3-1.el7.centos
   Removing: ovirt-engine-tools-backup-3.6.5.3-1.el7.centos.noarch 
(@ovirt-3.6)
   ovirt-engine-tools-backup = 3.6.5.3-1.el7.centos
   Updated By: ovirt-engine-tools-backup-3.6.6.2-1.el7.centos.noarch 
(ovirt-3.6)
   ovirt-engine-tools-backup = 3.6.6.2-1.el7.centos


rpm -qi ovirt-engine-tools says :
Version : 3.6.5.3
Release : 1.el7.centos
...
Build Date  : Mon Apr 11 23:45:30 2016
Build Host  : el7-vm02.phx.ovirt.org


and :
rpm -qi ovirt-engine-tools-backup says:
Name: ovirt-engine-tools-backup
Version : 3.6.5.3
Release : 1.el7.centos
...
Build Date  : Mon Apr 11 23:45:30 2016
Build Host  : el7-vm02.phx.ovirt.org

yum update ovirt-engine-tools-backup ovirt-engine-tools fails in the same way.

but:

yum list ovirt-engine-tools-backup ovirt-engine-tools
Loaded plugins: etckeeper, fastestmirror, versionlock
Loading mirror speeds from cached hostfile
Installed Packages
ovirt-engine-tools.noarch   
  3.6.5.3-1.el7.centos  
@ovirt-3.6
ovirt-engine-tools-backup.noarch
  3.6.5.3-1.el7.centos  
@ovirt-3.6
Available Packages
ovirt-engine-tools-backup.noarch
  3.6.6.2-1.el7.centos  
ovirt-3.6 

So no ovirt-engine-tools to update.

and indeed :
yum update ovirt-engine-tools
Loaded plugins: etckeeper, fastestmirror, versionlock
Loading mirror speeds from cached hostfile
No packages marked for update

I have disable ovirt-3.6-epel, because I already use epel, is it the problem ?

What should I do ? I don't think removing ovirt-engine-tools  is a option.



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


Re: [ovirt-users] editing VM settting

2016-05-25 Thread Fabrice Bacchella
I thinks it's a minor thing, but still puzzling.

A new VM don't have the kernel, initrd and cmdline elements. Once added for a 
custom boot, if I remove them using the API, there are still here, but empty. 
If I use, the GUI, they vanished.

Using CLI:








Using GUI:





Not critical, but strange. Both works


> Le 24 mai 2016 à 13:36, Shmuel Melamud <smela...@redhat.com> a écrit :
> 
> Hi!
> 
> What do you mean under "removing values"?  You want ,  etc. 
> not to appear in engine response? There is no such thing. There is always 
> some value, empty or non-empty.
> 
> Shmuel
> 
> On Tue, Apr 12, 2016 at 6:40 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> I'm trying to change the way a VM is booted, I want an initial setup with 
> kernel, initrd and cmdline given and later removed.
> 
> Using the GUI it works fine.
> 
> But I have no success using the python API. And running with debug enable, I 
> get this strange result :
> 
> > PUT /api/vms/8ced0f81-03fd-415b-a8ef-60141de7eeca HTTP/1.1
> ...
> > 
> > 
> > 
> > 
> ...
> < 
> < 
> < 
> < .../vmlinuz
> < .../initrd.img
> < 
> < 
> 
> I got this with:
> os_params =  params.OperatingSystem()
> os_params.set_boot(old_os_params.get_boot())
> os_params.set_type(old_os_params.get_type())
> os_params.set_kernel(None)
> os_params.set_initrd(None)
> os_params.set_cmdline(None)
> self.broker.set_os(os_params)
> self.broker.update()
> trying to set kernel and others to empty string is not really better:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> ...
> < 
> < 
> < 
> < 
> < 
> < 
> < 
> 
> What kind of "magic values" the engine uses to removes values ?
> 
> 
> ___
> Users mailing list
> Users@ovirt.org <mailto:Users@ovirt.org>
> http://lists.ovirt.org/mailman/listinfo/users 
> <http://lists.ovirt.org/mailman/listinfo/users>
> 
> 

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


Re: [ovirt-users] editing VM settting

2016-05-24 Thread Fabrice Bacchella
I thinks it's a minor thing, but still puzzling.

A new VM don't have the kernel, initrd and cmdline elements. Once added for a 
custom boot, if I remove them using the API, there are still here, but empty. 
If I use, the GUI, they vanished.

Using CLI:








Using GUI:





Not critical, but strange. Both works


> Le 24 mai 2016 à 13:36, Shmuel Melamud <smela...@redhat.com 
> <mailto:smela...@redhat.com>> a écrit :
> 
> Hi!
> 
> What do you mean under "removing values"?  You want ,  etc. 
> not to appear in engine response? There is no such thing. There is always 
> some value, empty or non-empty.
> 
> Shmuel
> 
> On Tue, Apr 12, 2016 at 6:40 PM, Fabrice Bacchella 
> <fabrice.bacche...@orange.fr <mailto:fabrice.bacche...@orange.fr>> wrote:
> I'm trying to change the way a VM is booted, I want an initial setup with 
> kernel, initrd and cmdline given and later removed.
> 
> Using the GUI it works fine.
> 
> But I have no success using the python API. And running with debug enable, I 
> get this strange result :
> 
> > PUT /api/vms/8ced0f81-03fd-415b-a8ef-60141de7eeca HTTP/1.1
> ...
> > 
> > 
> > 
> > 
> ...
> < 
> < 
> < 
> < .../vmlinuz
> < .../initrd.img
> < 
> < 
> 
> I got this with:
> os_params =  params.OperatingSystem()
> os_params.set_boot(old_os_params.get_boot())
> os_params.set_type(old_os_params.get_type())
> os_params.set_kernel(None)
> os_params.set_initrd(None)
> os_params.set_cmdline(None)
> self.broker.set_os(os_params)
> self.broker.update()
> trying to set kernel and others to empty string is not really better:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> ...
> < 
> < 
> < 
> < 
> < 
> < 
> < 
> 
> What kind of "magic values" the engine uses to removes values ?
> 
> 
> ___
> Users mailing list
> Users@ovirt.org <mailto:Users@ovirt.org>
> http://lists.ovirt.org/mailman/listinfo/users 
> <http://lists.ovirt.org/mailman/listinfo/users>
> 
> 

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


[ovirt-users] unreachable iso domain

2016-05-19 Thread Fabrice Bacchella
I try to attach an iso domain but it keep saying that it doesn't exist. But if 
I look in /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf, the 
directory given in OVESETUP_CONFIG/isoDomainStorageDir exists and the logs says 
:
 
2016-05-19 19:23:23,900 ERROR 
[org.ovirt.engine.core.vdsbroker.irsbroker.AttachStorageDomainVDSCommand] 
(org.ovirt.thread.pool-8-thread-19) [78115edf] Command 
'AttachStorageDomainVDSCommand( 
AttachStorageDomainVDSCommandParameters:{runAsync='true', 
storagePoolId='17434f4e-8d1a-4a88-ae39-d2ddd46b3b9b', 
ignoreFailoverLimit='false', 
storageDomainId='2a9fe2d7-ea38-4ced-a274-32734b7b571b'})' execution failed: 
IRSGenericException: IRSErrorException: Failed to AttachStorageDomainVDS, error 
= Storage domain does not exist: (u'2a9fe2d7-ea38-4ced-a274-32734b7b571b',), 
code = 358

Does code = 358 means something important ?

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


[ovirt-users] disk order in vm and disk order in export

2016-05-16 Thread Fabrice Bacchella
I have a VM with the following disks (in the ordrer return by a get query):
 

...
vm_sys
17179869184 <- 16GiB
virtio_scsi
true
image



vm_data
virtio_scsi
false


1099511627776 <- 1 TiB.
0


lun


So the first one is a 16 GiB virtual disk, the second one a 1 iTB direct access 
LUN that will contains data.

But once booterd, I see:
lsblk   
NAMEMAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda   8:00 1T  0 disk 
...
sdb   8:16   016G  0 disk 
...

and :
ls -l /dev/disk/by-*/*
...
lrwxrwxrwx. 1 root root  9 May 16 09:03 
/dev/disk/by-path/pci-:00:04.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx. 1 root root  9 May 16 09:03 
/dev/disk/by-path/pci-:00:04.0-scsi-0:0:0:1 -> ../../sdb

So the first disk sda is the second non bootable disk.
What set the disk order associated to a VM ? Is there a way to enforce that the 
first disk is really the first disk ?___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] creation of lun disks

2016-05-13 Thread Fabrice Bacchella

> Le 13 mai 2016 à 20:04, Juan Hernández <jhern...@redhat.com> a écrit :
> 
> On 05/13/2016 04:21 PM, Fabrice Bacchella wrote:
>> I'm trying to generated a lun disk, using the python SDK.
>> 
>> My code can be found
>> at https://github.com/fbacchella/ovirtcmd/blob/master/ovlib/disks/__init__.py
>> 
>> If a try to see the content of a existing disk and test with :
>> print disk.get_type()
>> print disk.get_storage_type()
>> 
>> I'm getting :
>> None
>> lun
>> 
>> Now I try to create another LUN disk with
>> kwargs['storage_type'] = 'lun'
>> kwargs['type_'] = 'system'
>> 
>> I'm getting:
>> 
>>> POST /api/disks HTTP/1.1
>>> 
>>>system
>>>virtio-scsi
>>>
>>>
>>>
>>>lun
>>> 
>> ...
>> < 
>> < Incomplete parameters
>> < Storage [type] required for invoke0
>> < 
>> 
>> changing to 
>>kwargs['type_'] = None 
>> change nothing, I'm still getting the same error message.
>> 
>>> POST /api/disks HTTP/1.1
>>> 
>>>virtio-scsi
>>>
>>>
>>>
>>>lun
>>> 
>> ...
>> < 
>> < Incomplete parameters
>> < Storage [type] required for invoke0
>> < 
>> 
>> 
>> What did I do wrong ? There is nothing about that in the logs
>> 
> 
> When creating a LUN disk you need to specify the type (fcp or iscsi)
> inside the "lun_storage" element, so you need to send an XML document
> like this:
> 
>  
>virtio
>
>  fcp
>  
>
>  
> 
> To do that with the Python SDK you need the following code:
> 
>  params.Disk(
>interface='virtio',
>lun_storage=params.Storage(
>  type_='fcp',
>  logical_unit=[
>params.LogicalUnit(
>  id='0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-2',
>),
>  ],
>),
>  )
> 

Ok thanks, but now I'm checking the rsdl (I should have done that earlier) and 
see :


disk.lun_storage.type


disk.lun_storage.logical_unit


logical_unit.id


logical_unit.address


logical_unit.port


logical_unit.target




Given the output for a existing SAN disk, I see :


SHP_MSA_2040_SAS_00c0ff26285a209135570100
HP
MSA 2040 SAS
33
1099511627776
0
dd98b206-08e4-48c0-9795-d10bc7581a95


There is no address, port or target, that are needed only for iscsi. I tried 
without and everything was fine. So I think they are not required.


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


[ovirt-users] creation of lun disks

2016-05-13 Thread Fabrice Bacchella
I'm trying to generated a lun disk, using the python SDK.

My code can be found at 
https://github.com/fbacchella/ovirtcmd/blob/master/ovlib/disks/__init__.py

If a try to see the content of a existing disk and test with :
print disk.get_type()
print disk.get_storage_type()

I'm getting :
None
lun

Now I try to create another LUN disk with
kwargs['storage_type'] = 'lun'
kwargs['type_'] = 'system'

I'm getting:

> POST /api/disks HTTP/1.1
> 
> system
> virtio-scsi
> 
> 
> 
> lun
> 
...
< 
< Incomplete parameters
< Storage [type] required for invoke0
< 

changing to 
kwargs['type_'] = None 
change nothing, I'm still getting the same error message.

> POST /api/disks HTTP/1.1
> 
> virtio-scsi
> 
> 
> 
> lun
> 
...
< 
< Incomplete parameters
< Storage [type] required for invoke0
< 


 What did I do wrong ? There is nothing about that in the logs




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


Re: [ovirt-users] Log4j hostname

2016-05-11 Thread Fabrice Bacchella
You're showing a logstash parsing, extracted from a message formatted using 
syslog. All the magic should be in the pattern line 
(log4j.appender.myappender.layout.ConversionPattern=[%c] %m%).
And logstash failed to parse the line anyway (see the _grokparsefailure).

Did you try to send native log4j event to logstash, using custom appenders like 
my own : https://github.com/fbacchella/ZMQAppender


> Le 11 mai 2016 à 08:20, Dominique Taffin  a écrit :
> 
> Hello!
> 
> Thank you for your reply. Unfortunately, it does not include the hostname 
> with header=true.
> The following is received by the logserver:
> 
> {
>   "_index": "ovirt-2016.05.11",
>   "_type": "syslog",
>   "_id": "AVSedM6EH9SU2r3j0ihk",
>   "_score": null,
>   "_source": {
> "message": 
> "<14>[org.ovirt.engine.core.vdsbroker.HostDevListByCapsVDSCommand] START, 
> HostDevListByCapsVDSCommand(HostName = onodeXXX.some.domain, 
> VdsIdAndVdsVDSCommandParametersBase:{runAsync='true', 
> hostId='-XXX---XXX', 
> vds='Host[onodeXXX.some.domain,-XXX---XXX]'}), log 
> id: 689d5b30\n",
> "@version": "1",
> "@timestamp": "2016-05-11T08:15:35.729+02:00",
> "type": "syslog",
> "host": "10.XXX.XXX.XXX",
> "tags": [
>   "_grokparsefailure"
> ],
> "syslog_severity_code": 5,
> "syslog_facility_code": 1,
> "syslog_facility": "user-level",
> "syslog_severity": "notice"
>   },
>   "sort": [
> 1462947335729,
> 1462947335729
>   ]
> }
> 
> is it possible to have the IP in the "host" filed have resolved from log4j so 
> that the hostname will be displayed there? Or have it convinced to use the 
> appender.Application field?
> 
> thank you and best,
>  Dominique
> 
> Von: Ravi Nori 
> Gesendet: Dienstag, 10. Mai 2016 19:04
> An: Dominique Taffin
> Cc: users@oVirt.org
> Betreff: Re: [ovirt-users] Log4j hostname
>  
> Hi Dominique,
> 
> Add
> 
> log4j.appender.myappender.header = true
> 
> and see if you get the hostname
> 
> Ravi
> 
> 
> On Mon, May 9, 2016 at 9:37 AM, Dominique Taffin  
> wrote:
> Hello!
> 
> We are using the log4j extension  to send ovirt logs to a logstash server. 
> As we do have several engine hosts and only one logging backend, we do need 
> to filter logs by hostname. So far I am unable to provide a hostname in
> Log4jLogger.properties. All Log4j configurations we have in other 
> applications/servers to honor the log4j.Application property. I tried setting 
> it up by:
> 
> 
> 
> ovirt.engine.extension.name = Log4j
> ovirt.engine.extension.provides = 
> org.ovirt.engine.api.extensions.logger.Logger
> ovirt.engine.extension.bindings.method = jbossmodule
> ovirt.engine.extension.binding.jbossmodule.module = 
> org.ovirt.engine-extensions.logger.log4j
> ovirt.engine.extension.binding.jbossmodule.class = 
> org.ovirt.engineextensions.logger.log4j.Log4jLogger
> log4j.rootLogger=DEBUG, myappender
> 
> log4j.appender.myappender = org.apache.log4j.net.SyslogAppender
> log4j.appender.myappender.SyslogHost = logstash-server.something
> log4j.appender.myappender.Port = 5544
> log4j.appender.myappender.ReconnectionDelay = 6
> log4j.appender.myappender.Application = ovirthostname
> log4j.appender.myappender.LocationInfo = true
> log4j.appender.myappender.Threshold = DEBUG
> log4j.appender.myappender.layout = org.apache.log4j.PatternLayout
> log4j.appender.myappender.layout.ConversionPattern=[%c] %m%n
> 
> 
> 
> Logs do arrive, but no hostname. Can anyone point me out on how to include 
> the hostname in the logs?
> 
> thank you and best,
>  Dominique
> 
> ___
> 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] configuring bonding on host

2016-05-10 Thread Fabrice Bacchella

> Le 10 mai 2016 à 09:55, Alona Kaplan  a écrit :
> 
> 
> 
> You should modify the already existing network_attachment.
> Here, since you don't pass the existing attachment 'id', we're trying to 
> create a new attachment.
> Since you didn't remove the old one, we get two attachments for the same 
> network. The old one is still attached to 'eth0', that's why you get the 
> error.
> 
> You have to specify the attachment 'id' on the attachment you're updating and 
> it should work.

That's quite logical. Thank you.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] configuring bonding on host

2016-05-09 Thread Fabrice Bacchella
> 
> I think I will soon have more questions about what is a modified or removed 
> object when creating bond, but I will need to play a little more with it.
> 

Ok, I started to play with the right setupnetworks, and I'm getting strange 
results.

When I try to transform an eth0 attachement to a bond attachement, I get 

Cannot setup Networks. Network Interface 'eth0' cannot become slave, there's 
network 'ovirtmgmt' attached to it.

I tried to have a look at the command that the UI send and don't get it. It 
says :

networks='[HostNetwork:{defaultRoute='true', bonding='true', 
networkName='ovirtmgmt', nicName='bond0', vlan='null', mtu='9000', 
vmNetwork='true', stp='false', properties='[]', bootProtocol='DHCP', 
address='null', netmask='null', gateway='null'}]', 
removedNetworks='[]', 
bonds='[Bond:{id='ffcfe313-7607-4347-b797-aa9c3260e221', name='bond0', 
vdsId='null', networkName='ovirtmgmt', bootProtocol='DHCP', address='null', 
subnet='null', gateway='null', mtu='9000', bridged='true', type='2', 
networkImplementationDetails='null', qos='null', macAddress='null', 
bondOptions='mode=4 miimon=100', labels='null', slaves='[eth0, eth1]'}]', 
removedBonds='[Bond:{id='ffcfe313-7607-4347-b797-aa9c3260e221', name='bond0', 
vdsId='null', networkName='ovirtmgmt', bootProtocol='DHCP', address='null', 
subnet='null', gateway='null', mtu='9000', bridged='true', type='2', 
networkImplementationDetails='null', qos='null', macAddress='null', 
bondOptions='mode=4 miimon=100', labels='null', slaves='[eth0, eth1]'}]'}),

 What I'm doing is quite close, there is a modified network and modified bond. 
But what about the removedBonds ? They was no bonding before that

My code is :

bond_name = kwargs['bond_name']
mtu = kwargs.pop('mtu', None)
nics = []
for if_name in kwargs['interfaces']:
nic = params.HostNIC(name=if_name)
if mtu is not None:
nic.set_mtu(mtu)
nics.append(nic)

bonding = params.Bonding(
slaves=params.Slaves(host_nic=nics),
options=params.Options(
option=map(lambda (x, y): params.Option(name=x, value=y), 
kwargs.pop('bond_options', {}).iteritems() )
)
)

bonded_if = params.HostNIC(name=bond_name, bonding=bonding)

if mtu is not None:
bonded_if.set_mtu(mtu)

ip = kwargs.pop('ip', None)
gateway = kwargs.pop('gateway', None)
if ip is not None:
ip = unicode(ip)
ip_addr = ipaddress.ip_address(ip.split('/')[0])
ip_net = ipaddress.ip_network(ip, strict=False)
ip_conf = params.IP(address=str(ip_addr),
 netmask=str(ip_net).split('/')[0])
if gateway is not None:
ip_conf.set_gateway(gateway)
ip_assignment = params.IpAddressAssignment(assignment_method="static", 
ip=ip_conf)
elif kwargs.pop('dhcp', False):
ip_assignment = params.IpAddressAssignment(assignment_method="dhcp", 
ip=params.IP())

bonded_network = 
params.NetworkAttachment(network=params.Network(name=kwargs['network']),
  
host_nic=params.HostNIC(name=bond_name),
  
ip_address_assignments=params.IpAddressAssignments([ip_assignment]))

return self.broker.setupnetworks(params.Action(modified_bonds = 
params.HostNics(host_nic = [bonded_if]),
   modified_network_attachments = 
params.NetworkAttachments(network_attachment=[bonded_network]),
   )
 )

And it generates :

> POST /api/hosts/db240f83-9266-4892-a6d2-8ac406cadfb1/setupnetworks HTTP/1.1
> 
> 
> 
> 
> ovirtmgmt
> 
> 
> bond0
> 
> 
> 
> 
> dhcp
> 
> 
> 
> 
> 
> 
> bond0
> 
> 
> 
> 
> 
> 
> 
> 
> eth0
> 
> 
> eth1
> 
> 
> 
> 
> 
> 


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


Re: [ovirt-users] configuring bonding on host

2016-05-09 Thread Fabrice Bacchella

> Le 7 mai 2016 à 22:49, Fabrice Bacchella <fabrice.bacche...@orange.fr> a 
> écrit :
> 
> 
>> Le 7 mai 2016 à 18:18, Juan Hernández <jhern...@redhat.com> a écrit :
>> 
>> On 05/06/2016 05:20 PM, Fabrice Bacchella wrote:
>>> I'm following the example given
>>> in http://www.ovirt.org/develop/api/pythonapi/ for bonding interfaces.
>>> 
> 
>>> What am I missing ?
>>> 
>> 
>> The example that you mention describes the old and deprecated
>> /hosts/{host:id}/nics/setupnetworks action, but you are sending the
>> request to /hosts/{host:id}/setupnetworks, which just ignores the
>> "host_nics" elements that you are sending. There is an example of how to
>> use the newer action here:
>> 
>> 
>> https://jhernand.fedorapeople.org/ovirt-api-explorer/#/services/host/methods/setup-networks
> 
> Ok.I got it.
> 
> The samples says:  host.nics.setupnetworks(...)
> And my code says:  host.setupnetworks(...)
> 
> But why does it silently ignore it ? Shouldn't it throw me an error ?

Very funny, now that my call to /hosts/{host:id}/setupnetworks is better (using 
modified_...), I'm getting an error message. So a totally wrong call throws 
nothing and an almost wrong message return some thing. That is not really 
consistent.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] configuring bonding on host

2016-05-07 Thread Fabrice Bacchella

> Le 7 mai 2016 à 18:18, Juan Hernández <jhern...@redhat.com> a écrit :
> 
> On 05/06/2016 05:20 PM, Fabrice Bacchella wrote:
>> I'm following the example given
>> in http://www.ovirt.org/develop/api/pythonapi/ for bonding interfaces.
>> 

>> What am I missing ?
>> 
> 
> The example that you mention describes the old and deprecated
> /hosts/{host:id}/nics/setupnetworks action, but you are sending the
> request to /hosts/{host:id}/setupnetworks, which just ignores the
> "host_nics" elements that you are sending. There is an example of how to
> use the newer action here:
> 
> 
> https://jhernand.fedorapeople.org/ovirt-api-explorer/#/services/host/methods/setup-networks

Ok.I got it.

The samples says:  host.nics.setupnetworks(...)
And my code says:  host.setupnetworks(...)

But why does it silently ignore it ? Shouldn't it throw me an error ?

I think I will soon have more questions about what is a modified or removed 
object when creating bond, but I will need to play a little more with it.

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


[ovirt-users] a new CLI for oVirt

2016-05-06 Thread Fabrice Bacchella
To try to learn the python SDK, and help the automation of my setup, I wrote a 
CLI to oVirt.

It tries to hide some of the complexity, so some simple python script like :

dc = context.datacenter(name="dc1")
if dc is not None:
dc.delete(force=True)
context.datacenter().create(name="dc1", local=False, storage_format="v3", 
mac_pool_name="MoreMac")

cluster = context.cluster(name="cl1")
if cluster is not None:
cluster.delete(force=True)
context.cluster().create(name="cl1", cpu_type="Intel Haswell-noTSX Family", 
dc_name="en02",
 memory_policy={'guaranteed': True, 'overcommit': 100, 
'transparent_hugepages': False},
 ballooning_enabled=True)

can be used. It avoid the use of params.Something.

It can also be used to do action in shell like :

./ovcmd -c ovirt.ini host -n host1 bond -i eth0 -i eth1 -n ovirtmgmt -o mode 4 
-o miimon 100 -o xmit_hash_policy 2+3 -D -m 9000

or

./ovcmd -c ovirt.ini host -n host1 export nics

Complex commands can take template as an argument :

./ovcmd -d -c ovirt.ini vm create -T vm1.yaml -V cores 2 -V memory 4G -n vm1

It's of course on github :
https://github.com/fbacchella/ovirtcmd 

It's still a work in progress, only the very basic commands are implemented, I 
will add other as requested, it should be easy to do so.___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] configuring bonding on host

2016-05-06 Thread Fabrice Bacchella
I'm following the example given in http://www.ovirt.org/develop/api/pythonapi/ 
for bonding interfaces.

I'm checking that the network is a plain configuration, exporting 
/api/hosts//nics return :






eth1






none

down

1500
false







eth0







dhcp
100

up

9000
true
false



I send my configuration and get :

> POST /api/hosts/db240f83-9266-4892-a6d2-8ac406cadfb1/setupnetworks HTTP/1.1
...
> my configuration

< HTTP/1.1 200 OK

< 
< 
< 
< 
< bond0
< 
< ovirtmgmt
< 
< 
< 
< 
< 
< 
< 
< 
< 
< 
< eth0
< 
< 
< none
< 9000
< 
< 
< eth1
< 
< 
< none
< 9000
< 
< 
< 
< static
< 9000
< true
< 
< 
< true
< false
< 
< 
< complete
< 
< 


So every thing is fine, I applied my configuration.

But in the log, I get :
2016-05-06 17:13:22,481 INFO  
[org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand] (default 
task-20) [30e54e04] Lock Acquired to object 
'EngineLock:{exclusiveLocks='[db240f83-9266-4892-a6d2-8ac406cadfb1=]', sharedLocks='null'}'
2016-05-06 17:13:22,555 INFO  
[org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand] (default 
task-20) [30e54e04] Running command: HostSetupNetworksCommand internal: false. 
Entities affected :  ID: db240f83-9266-4892-a6d2-8ac406cadfb1 Type: VDSAction 
group CONFIGURE_HOST_NETWORK with role type ADMIN
2016-05-06 17:13:22,555 INFO  
[org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand] (default 
task-20) [30e54e04] No changes were detected in setup networks for host 
'nb0101' (ID: 'db240f83-9266-4892-a6d2-8ac406cadfb1')
2016-05-06 17:13:22,563 INFO  
[org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand] (default 
task-20) [30e54e04] Lock freed to object 
'EngineLock:{exclusiveLocks='[db240f83-9266-4892-a6d2-8ac406cadfb1=]', sharedLocks='null'}'

And indeed my configuration is not changed.

What am I missing ?




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


Re: [ovirt-users] ovirt and JMX

2016-04-29 Thread Fabrice Bacchella

> Le 29 avr. 2016 à 18:11, Juan Hernández  a écrit :
> 

> So, it is the string "public", which means "any-address". The meaning of
> "any-address" depends on what IP version is used by default by the Java
> Virtual Machine, and in 3.6 the default is IPv6. Unless you want to
> change that file you will need to specify one of the IPv6 addresses of
> your machine, for example the loopback address:

Ok, thanks, but I disable ipv6 on my servers, so it fails silenty, that was my 
problem.

The other problem is that it don't use standard transport, like rmi or jmx. I 
think it uses http, so jconsole or other standards jmx tools can't be used.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] ovirt and JMX

2016-04-29 Thread Fabrice Bacchella
I'm trying to communicate with ovirt-engine using jmx.

I read https://www.ovirt.org/develop/developer-guide/engine/jmx-support/

In the line 
ENGINE_JMX_INTERFACE=public 

what is public ? Is that the string 'public', if I set that, ovirt-engine don't 
listen any more on port 8706. If i set it to the public IP of the server or to 
the interface name it fails with :

16:40:46,622 ERROR [org.jboss.as.server] JBAS015956: Caught exception during 
boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: 
JBAS014676: Failed to parse configuration
at 
org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:112)
 [wildfly-controller-8.2.1.Final.jar:8.2.1.Final]
at org.jboss.as.server.ServerService.boot(ServerService.java:331) 
[wildfly-server-8.2.1.Final.jar:8.2.1.Final]
at 
org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:259)
 [wildfly-controller-8.2.1.Final.jar:8.2.1.Final]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_101]
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[477,70]
Message: JBAS014796: Unknown interface bond0 interface must be declared in 
element interfaces
at 
org.jboss.as.server.parsing.CommonXml.parseSocketBinding(CommonXml.java:691) 
[wildfly-server-8.2.1.Final.jar:8.2.1.Final]
at 
org.jboss.as.server.parsing.StandaloneXml.parseSocketBindingGroup_1_1(StandaloneXml.java:1093)
 [wildfly-server-8.2.1.Final.jar:8.2.1.Final]
at 
org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_4(StandaloneXml.java:470)
 [wildfly-server-8.2.1.Final.jar:8.2.1.Final]
at 
org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:145) 
[wildfly-server-8.2.1.Final.jar:8.2.1.Final]
at 
org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:107) 
[wildfly-server-8.2.1.Final.jar:8.2.1.Final]
at 
org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) 
[staxmapper-1.1.0.Final.jar:1.1.0.Final]
at 
org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) 
[staxmapper-1.1.0.Final.jar:1.1.0.Final]
at 
org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:104)
 [wildfly-controller-8.2.1.Final.jar:8.2.1.Final]
... 3 more


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


Re: [ovirt-users] 3.6 upgrade issue

2016-04-26 Thread Fabrice Bacchella

> Le 26 avr. 2016 à 20:28, gregor  a écrit :
> Did you create a bug entry?
> I'm tired of creating bugs for oVirt. Every time I touch oVirt I hit 1-5
> bugs, it's so time consuming :-(
> 
> cheers
> gregor

I was afraid I was doing something wrong with it. I'm happy to know I'm not the 
only one to found a bug in every stone I move in oVirt.

I'm not sure happy is the word, as oVirt is the only tool that fits my needs.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] advanced users authentication, using kerberos, CAS SSO and Active Directory

2016-04-25 Thread Fabrice Bacchella
I have a production were hard coded password are avoided. We prefer to use 
kerberos. We also provided a SSO for Web UI using CAS 
. We use ActiveDirectory for user 
backend.

So I wanted a oVirt installation that will use kerberos for API authentication. 
For the web ui, kerberos is not always the best solution, so I wanted to 
integrated it in our CAS.

The Apache part was easy to setup.

I will show only subpart of the whole Apache setup and only authentication 
related part

# The CAS modules
LoadModule authz_user_module  /usr/lib64/httpd/modules/mod_authz_user.so
# Needed because auth_cas_module forget to link openssl
LoadModule ssl_module/usr/lib64/httpd/modules/mod_ssl.so
LoadModule auth_cas_module   /usr/lib64/httpd/modules/mod_auth_cas.so

# For the kerberos authentication on the API
LoadModule auth_gssapi_module/usr/lib64/httpd/modules/mod_auth_gssapi.so
LoadModule session_module/usr/lib64/httpd/modules/mod_session.so
LoadModule session_cookie_module /usr/lib64/httpd/modules/mod_session_cookie.so

CASLoginURL https://sso/cas/login
CASValidateSAML On
CASValidateURL https://sso/cas/samlValidate


RequestHeader unset X-Remote-User early

RewriteEngine on
RewriteCond %{LA-U:REMOTE_USER} ^(.*@DOMAIN)$
RewriteRule ^(.*)$ - [L,P,E=REMOTE_USER:%1]

RequestHeader set X-Remote-User %{REMOTE_USER}s

AuthType GSSAPI
AuthName "GSSAPI Single Sign On Login"
GssapiCredStore keytab:.../httpd.keytab
Require valid-user

GssapiUseSessions On
Session On
SessionCookieName ovirt_gssapi_session path=/private;httponly;secure;


AuthType CAS
Require valid-user
CASAuthNHeader X-Remote-User


The authn file /etc/ovirt-engine/extensions.d/apachesso-authn.properties is :

ovirt.engine.extension.name = apachesso-authn
ovirt.engine.extension.bindings.method = jbossmodule
ovirt.engine.extension.binding.jbossmodule.module = 
org.ovirt.engine-extensions.aaa.misc
ovirt.engine.extension.binding.jbossmodule.class = 
org.ovirt.engineextensions.aaa.misc.http.AuthnExtension
ovirt.engine.extension.provides = org.ovirt.engine.api.extensions.aaa.Authn
ovirt.engine.aaa.authn.profile.name = apachesso
ovirt.engine.aaa.authn.authz.plugin = DOMAIN-authz
config.artifact.name = HEADER
config.artifact.arg = X-Remote-User
And the authz file /etc/ovirt-engine/extensions.d/DOMAIN-authz.properties is:

ovirt.engine.extension.name = DOMAIN-authz
ovirt.engine.extension.bindings.method = jbossmodule
ovirt.engine.extension.binding.jbossmodule.module = 
org.ovirt.engine-extensions.aaa.ldap
ovirt.engine.extension.binding.jbossmodule.class = 
org.ovirt.engineextensions.aaa.ldap.AuthzExtension
ovirt.engine.extension.provides = org.ovirt.engine.api.extensions.aaa.Authz
config.profile.file.1 = ../aaa/DOMAIN.properties
I had some difficulties with AD backend. A straightforward solution would have 
been :

include = 

vars.domain = DOMAIN
vars.user = BINDDN
vars.password = BINDPWD
vars.forest = domain.com

pool.default.auth.simple.bindDN = ${global:vars.user}
pool.default.auth.simple.password = ${global:vars.password}
pool.default.serverset.type = srvrecord
pool.default.serverset.srvrecord.domain = ${global:vars.domain}

pool.default.ssl.startTLS = true
pool.default.ssl.truststore.file = .../domain.jks
pool.default.ssl.truststore.password = 
# Only TLSv1.2 is secure nowadays
pool.default.ssl.startTLSProtocol = TLSv1.2

# long time out should be avoided
pool.default.connection-options.connectTimeoutMillis = 500
But if fails. We have a special setup with about 100 domain controlers and only 
two of them can be reached from the ovirt engine. So my first try was so 
defined them directly in the configuration file:

pool.default.serverset.type = failover
pool.default.serverset.failover.1.server = dcX.domain.com
pool.default.serverset.failover.2.server = dcY.domain.com
But that fails. Server-engine was still using a lot of unreachable domain 
controler. After some digging I found that other part of the ldap extension use 
a different serverset, I don’t know why it don’t reuse the default pool. It’s 
called pool.default.dc-resolve (it should be called pool.dc-resolve, as it’s 
not the default but a custom one), so I added in my configuration:

pool.default.dc-resolve.default.serverset.type = failover
pool.default.dc-resolve.serverset.failover.1.server = dcX.domain.com
pool.default.dc-resolve.serverset.failover.2.server = dcY.domain.com
But there is a better solution. Ondra Machacek point it to me. In Active 
Directory, there is something called a “site”, with a subset of all the domain 
controler in it. It can be found under CN=Sites,CN=Configuration,DC=DOMAIN,...

To list them:

ldapsearch -H ldap://somedc -b CN=Sites,CN=Configuration,DC=DOMAIN -s one -o 
ldif-wrap=no cn
The information to write down is the cn returned

You get a list of all domain, just pick the 

Re: [ovirt-users] python sdk and /api/hosts/{host:id}/install

2016-04-21 Thread Fabrice Bacchella

> Le 21 avr. 2016 à 18:06, Juan Hernández <jhern...@redhat.com> a écrit :
> 
> On 04/21/2016 04:58 PM, Fabrice Bacchella wrote:
>> I'm trying to the use the API to reinstall an hosts.
>> 
>> But if a post the following content :
>> POST /api/hosts/X/install
>> 
>>> 
>>>
>>>false
>>>
>>>
>>>22
>>>SHA256:
>>>publickey
>>>
>>> 
>> 
>> I get the error :
>> [Cannot edit Host. Power Management is enabled for Host but no Agent type 
>> selected.]
>> 
>> But the agent was set when I created the host, the GUI don't ask for power 
>> management informations when reinstalling the hosts and when I look the the 
>> rsdl ( at https://ovirt/api?rsdl), the agent type was not required.
>> 
>> So what's wrong with the install command and that is not in the rsdl ?
>> 
> 
> There is nothing wrong with you command, but there is a error in the
> server side that makes this fail. Please open bug. The only workaround
> at the moment is to disable power management, do the install, and then
> re-enable power management.

I made more check, and indeed, my setup is actually broken. But that's another 
case of this:

https://bugzilla.redhat.com/show_bug.cgi?id=1329323




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


[ovirt-users] python sdk and /api/hosts/{host:id}/install

2016-04-21 Thread Fabrice Bacchella
I'm trying to the use the API to reinstall an hosts.

But if a post the following content :
POST /api/hosts/X/install

> 
> 
> false
> 
> 
> 22
> SHA256:
> publickey
> 
> 

I get the error :
[Cannot edit Host. Power Management is enabled for Host but no Agent type 
selected.]

But the agent was set when I created the host, the GUI don't ask for power 
management informations when reinstalling the hosts and when I look the the 
rsdl ( at https://ovirt/api?rsdl), the agent type was not required.

So what's wrong with the install command and that is not in the rsdl ?

I'm using ovirt-engine 3.6.5.3

The rsdl for install that I got :



install vdsm and other packages required to get the host ready to be 
used in the engine


POST


Correlation-Id
any string


Content-Type
application/xml|json





async
true|false




Action
  ...


install vdsm and other packages required to get the host 
ready to be used in the engine providing the ssh password


action.ssh.port


action.ssh.fingerprint


action.ssh.authentication_method


action.ssh.user.user_name


action.ssh.user.password


action.image


action.host.override_iptables


action.async


action.grace_period.expiry





Action




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


Re: [ovirt-users] ldap servers configuration can be misleading with AD

2016-04-20 Thread Fabrice Bacchella

> Le 20 avr. 2016 à 10:16, Ondra Machacek <omach...@redhat.com> a écrit :
> 
> On 04/19/2016 07:46 PM, Fabrice Bacchella wrote:
>> 
>>> Le 19 avr. 2016 à 17:35, Ondra Machacek <omach...@redhat.com> a écrit :
>>> 
>>> On 04/19/2016 04:37 PM, Fabrice Bacchella wrote:
>>>> I tried to plug ovirt using my company AD.
>>>> 
>>>> But I have a problem, the DNS srv records are not well managed and I can't 
>>>> use them so I changed pool.default.serverset.type from srvrecord to 
>>>> failover.
>>> 
>>> With AD you should use srvrecord, unless you have somehow miscofigured AD.
>>> Can you please elaborate more what does it mean 'DNS srv records are not 
>>> well managed'?
>> 
>> The command
>> dig +short  _ldap._tcp.dsone.3ds.com any | wc -l
>> return 122 lines. Out of that, I can only use less than 10, all other 
>> generates timeout. I don't know if it's firewall or forgotten DC that 
>> generate that. There is no way I can use srvrecord.
>> This domain is totally out of my reach, I have to take it as is.
> 
> ok, that's not good, but if some of the domains which are working are in same 
> site, you can use 'domain-conversion'(works only with srvrecord):
> pool.default.serverset.srvrecord.domain-conversion.type = regex
> pool.default.serverset.srvrecord.domain-conversion.regex.pattern = 
> ^(?.*)$
> pool.default.serverset.srvrecord.domain-conversion.regex.replacement = 
> WORKING-SITE._sites.${domain}

What is that supposed to do ? All my DC are in the form xx-xxx-dcs99.${domain} 
and I have to pick a in this list. dig _sites.${domain} return nothing for me

what a regex will do ?


> Is that your case? Can you please share log of extensions-tool, so we can 
> better understand
> your problem and provide better help.

I have no knowledge about AD, I'm a 100% linux sysadmin and just use AD as an 
LDAP server, so all those forest/GC are unknown things for me.

I will send that in a private mail.

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


Re: [ovirt-users] ldap servers configuration can be misleading with AD

2016-04-19 Thread Fabrice Bacchella

> Le 19 avr. 2016 à 17:35, Ondra Machacek <omach...@redhat.com> a écrit :
> 
> On 04/19/2016 04:37 PM, Fabrice Bacchella wrote:
>> I tried to plug ovirt using my company AD.
>> 
>> But I have a problem, the DNS srv records are not well managed and I can't 
>> use them so I changed pool.default.serverset.type from srvrecord to failover.
> 
> With AD you should use srvrecord, unless you have somehow miscofigured AD.
> Can you please elaborate more what does it mean 'DNS srv records are not well 
> managed'?

The command
dig +short  _ldap._tcp.dsone.3ds.com any | wc -l
return 122 lines. Out of that, I can only use less than 10, all other generates 
timeout. I don't know if it's firewall or forgotten DC that generate that. 
There is no way I can use srvrecord.
This domain is totally out of my reach, I have to take it as is.

> 
> Can you please send engine log or if you are on 3.6, then use this command to 
> test and provide log:
> $ ovirt-engine-extensions-tool --log-level=FINEST --log-file=ad-search.log 
> aaa search --entity-name=userX --extension-name=ad-authz

I kill it after 1h of execution, and a 1.6MB log file, when I have
pool.default.serverset.type = srvrecord
pool.default.serverset.srvrecord.domain = ${global:vars.domain}

With pool.default.serverset.type = failover and 
pool.default.connection-options.connectTimeoutMillis = 500, I got:
time ovirt-engine-extensions-tool  bla
real1m29.264s
user0m6.837s
sys 0m0.291s
and a 278KB log file.


And with my setup (pool.default.serverset.type and 
pool.default.dc-resolve.default.serverset.type set to failover, 
pool.default.connection-options.connectTimeoutMillis = 500), I got
real0m5.084s
user0m6.343s
sys 0m0.164s
and a 199KB log file.


With pool.default.dc-resolve.enable = false, the results is the same than with 
failover for every one.

> 
> Btw: Do you use mutli domain AD setup? Or only single domain?

I think it's a single domain, but I'm not a Microsoft expert at all.


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


[ovirt-users] ldap servers configuration can be misleading with AD

2016-04-19 Thread Fabrice Bacchella
I tried to plug ovirt using my company AD.

But I have a problem, the DNS srv records are not well managed and I can't use 
them so I changed pool.default.serverset.type from srvrecord to failover.

But it was not enough, it was still using those invalid records. It was used by 
pool.default.dc-resolve.default.serverset.type too. I found that after digging 
in the source. I wonder why it should be specified twice. Why 
pool.default.dc-resolve.default.serverset and pool.default.serverset are 
different ?

I also need to specify search.ad-resolve-upn.search-request.baseDN because it 
didn't found it any more. I wonder if it's related.

My aaa property file:

include = 

vars.domain = MYDOME
vars.user = A_DN
vars.password = the_password
vars.forest = my_forest

pool.default.auth.simple.bindDN = ${global:vars.user}
pool.default.auth.simple.password = ${global:vars.password}
pool.default.serverset.type = failover
pool.default.serverset.failover.1.server = server1
pool.default.serverset.failover.2.server = server2
pool.default.ssl.startTLS = true
pool.default.ssl.truststore.file = trust.jks
pool.default.ssl.truststore.password = 
pool.default.ssl.startTLSProtocol = TLSv1.2

pool.default.connection-options.connectTimeoutMillis = 500
pool.default.dc-resolve.enable = true
pool.default.dc-resolve.default.serverset.type = failover
pool.default.dc-resolve.serverset.failover.1.server = server1
pool.default.dc-resolve.serverset.failover.2.server = server2

search.ad-resolve-upn.search-request.baseDN = BASE_DN


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


Re: [ovirt-users] adding glusterfs to ovirt

2016-04-18 Thread Fabrice Bacchella
> Le 18 avr. 2016 à 10:37, Sahina Bose <sab...@redhat.com> a écrit :
> 
> 
> 
> On 04/13/2016 09:00 PM, Fabrice Bacchella wrote:
>> I installed a oVirt stack without glusterfs. Now I want to add it. So I 
>> configured a cluster to be a gluster-enabled one. Now i want to add a 
>> gluster volume to it.
>> 
>> That went fine until I click Ok at the "New Volume" dialog, the answer was :
>> 
>> Error while executing action Create Gluster Volume: Unexpected exception
> 

> Check if you have vdsm-gluster installed on the nodes in the cluster
> 

The cluster was setup by ovirt, and running. So ovirt might have forgotten to 
install or start it ?


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


[ovirt-users] attaching a storage domain to a datacenter

2016-04-14 Thread Fabrice Bacchella
I'm trying to attach a SAN domain to data center.

It's an old domain that is re-attached. Import works fine.

But doing the attachement failed, either throug the UI or REST API call.

The log of the api calls are :

> POST /api/datacenters/92fbe5d6-2920-401d-b69b-ad4568e4f407/storagedomains 
> HTTP/1.1
> Host: example.com:1443
> Authorization: XXX
> User-Agent: PycURL/7.43.0 libcurl/7.46.0 OpenSSL/1.0.2e zlib/1.2.8
> Cookie: 
> Version: 3
> Content-Type: application/xml
> Accept: application/xml
> Filter: False
> Prefer: persistent-auth
> Content-Length: 60
> 
* upload completely sent off: 60 out of 60 bytes
* ?
< HTTP/1.1 400 Bad Request
< Date: Thu, 14 Apr 2016 16:31:48 GMT
< Server: Apache
< Content-Type: application/xml
< Content-Length: 135
< JSESSIONID: R4TTWw65M5TIhbVJo8VBuOOV
< Connection: close
< 
* ?
< 
< 
< Operation Failed
< []
< 

There is nothing in the engine.log :
2016-04-14 18:00:57,831 ERROR 
[org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default 
task-23) [] Correlation ID: 59497e82, Job ID: 
84e0e22c-bb28-434b-a952-73f0e2c4cfaa, Call Stack: null, Custom Event ID: -1, 
Message: Failed to attach Storage Domain vmsys01 to Data Center en01. (User: 
FA4@apachesso)

Where can I find informations about that ?


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


[ovirt-users] adding glusterfs to ovirt

2016-04-13 Thread Fabrice Bacchella
I installed a oVirt stack without glusterfs. Now I want to add it. So I 
configured a cluster to be a gluster-enabled one. Now i want to add a gluster 
volume to it.

That went fine until I click Ok at the "New Volume" dialog, the answer was :

Error while executing action Create Gluster Volume: Unexpected exception

I the log, I saw :

2016-04-13 16:45:53,573 INFO  
[org.ovirt.engine.core.vdsbroker.gluster.GlusterTasksListVDSCommand] 
(DefaultQuartzScheduler_Worker-84) [5303bffb] FINISH, 
GlusterTasksListVDSCommand, log id: 2e5a7991
2016-04-13 16:45:53,573 ERROR 
[org.ovirt.engine.core.bll.gluster.GlusterTasksSyncJob] 
(DefaultQuartzScheduler_Worker-84) [5303bffb] Error updating tasks from CLI: 
org.ovirt.engine.core.common.errors.EngineException: EngineException: 
org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: 
VDSGenericException: VDSErrorException: Failed to GlusterTasksListVDS, error = 
The method does not exist / is not available., code = -32601 (Failed with error 
unexpected and code 16)
at 
org.ovirt.engine.core.bll.VdsHandler.handleVdsResult(VdsHandler.java:112) 
[bll.jar:]
at 
org.ovirt.engine.core.bll.VDSBrokerFrontendImpl.RunVdsCommand(VDSBrokerFrontendImpl.java:33)
 [bll.jar:]
at 
org.ovirt.engine.core.bll.gluster.tasks.GlusterTasksService.runVdsCommand(GlusterTasksService.java:64)
 [bll.jar:]
at 
org.ovirt.engine.core.bll.gluster.tasks.GlusterTasksService.getTaskListForCluster(GlusterTasksService.java:32)
 [bll.jar:]
at 
org.ovirt.engine.core.bll.gluster.GlusterTasksSyncJob.updateGlusterAsyncTasks(GlusterTasksSyncJob.java:87)
 [bll.jar:]
at sun.reflect.GeneratedMethodAccessor250.invoke(Unknown Source) 
[:1.7.0_99]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 [rt.jar:1.7.0_99]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_99]
at 
org.ovirt.engine.core.utils.timer.JobWrapper.invokeMethod(JobWrapper.java:81) 
[scheduler.jar:]
at 
org.ovirt.engine.core.utils.timer.JobWrapper.execute(JobWrapper.java:52) 
[scheduler.jar:]
at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz.jar:]
at 
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) 
[quartz.jar:]


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


<    1   2   3   >