Re: [ovirt-devel] Seeing a memory issue in 4.0.1.1-1.el7.centos

2016-07-26 Thread Eldad Marciano
Hi Lynn

Thats know issue but nothing to worry about.

It looks like you have nice amount of RAM

Engine and dwh calculating the total ram size of the host and set 1/4 of it as 
heap space

You can easily change the max heap size to 2 gb under
/etc/ovirt-engine/engine.conf/10-setup-java

And restart engine and dwh

Hope it works for you..

Regards,
-Eldad

> On 26 ביולי 2016, at 22:56, Lynn Dixon  wrote:
> 
> Hello all.  I hope I am sending this to the proper mailing list. If not, 
> please let me know.
> 
> I just installed the latest oVirt engine onto a RHEL7.2 machine last night.  
> I haven't built any VM's yet, but noticed that 27gig of memory was being 
> consumed in the Dashboard.
> 
> I did a quick check on top and noticed this: http://i.imgur.com/j9LB4q9.jpg
> 
> The two java processes seem to be using a heavy amount of ram and 
> reservations.  How shall I troubleshoot this to find out whats going on?
> 
> 
> 
> Lynn Dixon | Red Hat Certified Architect #100-006-188
> Sr. Cloud Consultant | Cloud Management Practice
> Google Voice: 423-618-1414
> Cell/Text: 423-774-3188
> Click here to view my Certification Portfolio
> 
> 
> ___
> Devel mailing list
> Devel@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

[ovirt-devel] Seeing a memory issue in 4.0.1.1-1.el7.centos

2016-07-26 Thread Lynn Dixon
Hello all.  I hope I am sending this to the proper mailing list. If not,
please let me know.

I just installed the latest oVirt engine onto a RHEL7.2 machine last
night.  I haven't built any VM's yet, but noticed that 27gig of memory was
being consumed in the Dashboard.

I did a quick check on top and noticed this: http://i.imgur.com/j9LB4q9.jpg

The two java processes seem to be using a heavy amount of ram and
reservations.  How shall I troubleshoot this to find out whats going on?



*Lynn Dixon* | Red Hat Certified Architect #100-006-188
*Sr. Cloud Consultant* | Cloud Management Practice
Google Voice: 423-618-1414
Cell/Text: 423-774-3188
Click here to view my Certification Portfolio 
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] Debug vdsm 4.0.0 report error: libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

2016-07-26 Thread Francesco Romani
- Original Message -
> From: "Milan Zamazal" 
> To: "lifuqiong" 
> Cc: devel@ovirt.org
> Sent: Tuesday, July 26, 2016 3:46:42 PM
> Subject: Re: [ovirt-devel] Debug vdsm 4.0.0 report error: libvirt: XML-RPC
> error : Failed to connect socket to
>   '/var/run/libvirt/libvirt-sock': Permission denied
> 
> "lifuqiong"  writes:
> 
> >  I know it’s a multithreaded application , and debug vdsm is a very
> >   difficult job, but without debug, I don’t know which code I
> >   should
> >   replace or logging, Is there any remote debug solution like ovirt
> >   engine?  I found that
> >
> > I can do remote debug in simple python application , but I didn’t success
> > yet remote debugging vdsm.
> 
> As Michal mentioned, making a breakpoint in Vdsm may break things due to
> the stopped execution of the given thread.  Inserting logging messages
> to proper places of the code, where you need to get some information
> about the runtime state, is typically much simpler and good enough
> solution.

Additionally, another option is to use our manhole integration:

https://pypi.python.org/pypi/manhole

this is available on ovirt-4.0.z

check manhole_enable in [devel] section.
As the name hints, this should not be enabled in production settings.

Bests,

-- 
Francesco Romani
RedHat Engineering Virtualization R & D
Phone: 8261328
IRC: fromani
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] Debug vdsm 4.0.0 report error: libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

2016-07-26 Thread Milan Zamazal
"lifuqiong"  writes:

>  I know it’s a multithreaded application , and debug vdsm is a very
>   difficult job, but without debug, I don’t know which code I should
>   replace or logging, Is there any remote debug solution like ovirt
>   engine?  I found that
>
> I can do remote debug in simple python application , but I didn’t success yet 
> remote debugging vdsm. 

As Michal mentioned, making a breakpoint in Vdsm may break things due to
the stopped execution of the given thread.  Inserting logging messages
to proper places of the code, where you need to get some information
about the runtime state, is typically much simpler and good enough
solution.

If you still want to try more interactive approach and need to access
`vdsm' user, you can change the login shell of `vdsm' account to /bin/sh
and then use `su - vdsm' from root account.  But I don't recommend doing
that on any production system.

>  Now one of our case I want to consider using ovirt as our solution ,
>   we may do little change over ovirt. but as described above, without
>   debug , we can hardly understand vdsm clearly and cannot do 
> correctly
>   code change.
>
> Is there some good advice ?

If you want to study Vdsm runtime execution, read the logs, there's
plenty of information there.  When you are interested in a particular
place in the source code, where you intend to perform the changes, and
some information is missing, simply add your own debugging calls there,
restart Vdsm and watch the log.  I do it all the time and it works. :-)
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] Type Safety on the Frontend (refactoring of all async queries)

2016-07-26 Thread Vojtech Szocs
Great work, Martin!

Always happy to see improvements in UI code :)

Vojtech


- Original Message -
> From: "Martin Betak" 
> To: "devel" 
> Cc: "Vojtech Szocs" , "Tomas Jelinek" 
> , "Alexander Wels" 
> Sent: Monday, July 25, 2016 8:54:39 PM
> Subject: Type Safety on the Frontend (refactoring of all async queries)
> 
> Hi All,
> 
> today a *major* frontend refactoring was merged [1].
> Its purpose was to remove some of the most significant artifacts of legacy C#
> code.
> 
> Huge thanks to Vojtech and Alex for heavenly patience during code review!
> 
> For a complete description please see the commit message, but here are
> some highlights for programmers that need to touch FE code:
> 
> 1) AsyncQuery, AsyncCallback and Converter are now generic and typesafe
>(formerly INewAsyncCallback and IAsyncConverter).
> 
> 2) It is no longer possible (or desirable) to PASS MODEL to queries.
>From within Model sublasses `new AsyncQuery<>(...)` will have the correct
>value set
>(see patch for impl details) and if you want to run a query on a different
>model
>(so the infrastructure would set the progress spinner on that model
>instead),
>usually for the purpose of a ListModel showing a popup window - where we
>want to
>display the spinner on the dialog window instead, you can use the
>`myWindowModel.asyncQuery(...)` helper factory to create query with model
>set
>to myWindowModel.
> 
>// note: this also has the nice side-effect of eliminating the harmful
>pattern of using
>// the model value from within callbacks by casting it to surrounding
>model type (while that
>// value is already available by feature of java inner classes)
> 
> 3) AsyncDataProvider's API methods now deal with strongly typed queries. This
> is facilitated
>through usage of strongly typed Converters (please see some defined
>converters -> usually
>you just need a CastingConverter<> or a ListConverter<>).
>Please use this architectural layer of strongly typed AsyncDataProvider to
>your advantage.
>(as plain  Fronted.runQuery does not provide any guarantees and leaves you
>at risk of
>mis-casting the return value).
> 
> If you have any more questions please feel free to ask me or look at the
> patch for details
> (warning: it's quite big!).
> 
> This kind of major change necessarily touched all areas of the code (those
> issuing queries...)
> and there is of course some probability that something may break. But I
> believe this risk is
> well outweight by the benefits. Nevertheless if you find any issue please let
> me know and
> we can fix it together.
> 
> Thanks again to anyone who contributed to this noble effort.
> 
> Best regards :-)
> 
> Martin
> 
> [1] https://gerrit.ovirt.org/#/c/60822/
> 
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel


Re: [ovirt-devel] [ACTION REQUIRED] VDSM: vdsClientTests.CannonizeHostPortTest failing on master

2016-07-26 Thread Sandro Bonazzola
On Tue, Jul 26, 2016 at 3:36 PM, Dan Kenigsberg  wrote:

> On Tue, Jul 26, 2016 at 03:28:46PM +0200, Sandro Bonazzola wrote:
> > *
> http://jenkins.ovirt.org/job/vdsm_master_check-patch-el7-x86_64/4639/console
> > <
> http://jenkins.ovirt.org/job/vdsm_master_check-patch-el7-x86_64/4639/console
> >*
>
> Can you please rebase on top of
>
> https://gerrit.ovirt.org/#/c/61381/
>
> which is in current master?
>

Rebased, let's see if it fixes.



>
> >
> >
> >
> > *00:06:34.315* *00:06:34.315*
> >
> ==*00:06:34.315*
> > FAIL: testNoArguments
> > (vdsClientTests.CannonizeHostPortTest)*00:06:34.315*
> >
> --*00:06:34.316*
> > Traceback (most recent call last):*00:06:34.316*   File
> >
> "/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
> > line 494, in testNoArguments*00:06:34.316*
> > self._assertIsIpAddressWithPort(vdscli.cannonizeHostPort())*00:06:34.316*
> >   File
> "/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
> > line 548, in _assertIsIpAddressWithPort*00:06:34.316*
> > self._assertValidAddress(addr)*00:06:34.317*   File
> >
> "/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
> > line 555, in _assertValidAddress*00:06:34.317* addr)*00:06:34.317*
> > AssertionError: ('invalid IPv4 address: %s',
> > 'ovirt-srv19.phx.ovirt.org')*00:06:34.317* *00:06:34.317*
> >
> ==*00:06:34.317*
> > FAIL: testNoneArgument
> > (vdsClientTests.CannonizeHostPortTest)*00:06:34.318*
> >
> --*00:06:34.318*
> > Traceback (most recent call last):*00:06:34.318*   File
> >
> "/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
> > line 497, in testNoneArgument*00:06:34.318*
> >
> self._assertIsIpAddressWithPort(vdscli.cannonizeHostPort(None))*00:06:34.318*
> >   File
> "/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
> > line 548, in _assertIsIpAddressWithPort*00:06:34.319*
> > self._assertValidAddress(addr)*00:06:34.319*   File
> >
> "/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
> > line 555, in _assertValidAddress*00:06:34.319* addr)*00:06:34.319*
> > AssertionError: ('invalid IPv4 address: %s',
> > 'ovirt-srv19.phx.ovirt.org')*00:06:34.319* *00:06:34.319*
> >
> ==*00:06:34.319*
> > FAIL: testNoneArgumentAndPort
> > (vdsClientTests.CannonizeHostPortTest)*00:06:34.320*
> >
> --*00:06:34.320*
> > Traceback (most recent call last):*00:06:34.320*   File
> >
> "/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
> > line 502, in testNoneArgumentAndPort*00:06:34.320*
> > self._assertIsIpAddressWithPort(res)*00:06:34.320*   File
> >
> "/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
> > line 548, in _assertIsIpAddressWithPort*00:06:34.321*
> > self._assertValidAddress(addr)*00:06:34.321*   File
> >
> "/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
> > line 555, in _assertValidAddress*00:06:34.321* addr)*00:06:34.321*
> > AssertionError: ('invalid IPv4 address: %s',
> > 'ovirt-srv19.phx.ovirt.org')*00:06:34.321* *00:06:34.321* Name
> >
> >Stmts   Miss  Cover   Missing*00:06:34.322*
> > -
> >
> >
> > --
> > Sandro Bonazzola
> > Better technology. Faster innovation. Powered by community collaboration.
> > See how it works at redhat.com
>
> > ___
> > Devel mailing list
> > Devel@ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/devel
>
>


-- 
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] VDSM retired from Fedora distribution

2016-07-26 Thread Dan Kenigsberg
On Tue, Jul 26, 2016 at 11:50:03AM +0200, Sandro Bonazzola wrote:
> Hi,
> just an heads up about VDSM been retired from Fedora distribution due to
> broken dependency.
> If you want to get it back there you'll have to start again with the
> package review process.

Ouch.

Fedora gives us packaging guidelines, and warns us from future changes.
The broken dependency was the removal of python2-blivet1 from Fedora.

We still wait for

Bug 1346038 - Review Request: python-blivet1 - python2/blivet-1.x
compatibility package

to reinroduce it. When this is done, we can try to resurrect vdsm there,
if we so decide.
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel


[ovirt-devel] [ACTION REQUIRED] VDSM: vdsClientTests.CannonizeHostPortTest failing on master

2016-07-26 Thread Sandro Bonazzola
*http://jenkins.ovirt.org/job/vdsm_master_check-patch-el7-x86_64/4639/console
*



*00:06:34.315* *00:06:34.315*
==*00:06:34.315*
FAIL: testNoArguments
(vdsClientTests.CannonizeHostPortTest)*00:06:34.315*
--*00:06:34.316*
Traceback (most recent call last):*00:06:34.316*   File
"/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
line 494, in testNoArguments*00:06:34.316*
self._assertIsIpAddressWithPort(vdscli.cannonizeHostPort())*00:06:34.316*
  File 
"/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
line 548, in _assertIsIpAddressWithPort*00:06:34.316*
self._assertValidAddress(addr)*00:06:34.317*   File
"/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
line 555, in _assertValidAddress*00:06:34.317* addr)*00:06:34.317*
AssertionError: ('invalid IPv4 address: %s',
'ovirt-srv19.phx.ovirt.org')*00:06:34.317* *00:06:34.317*
==*00:06:34.317*
FAIL: testNoneArgument
(vdsClientTests.CannonizeHostPortTest)*00:06:34.318*
--*00:06:34.318*
Traceback (most recent call last):*00:06:34.318*   File
"/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
line 497, in testNoneArgument*00:06:34.318*
self._assertIsIpAddressWithPort(vdscli.cannonizeHostPort(None))*00:06:34.318*
  File 
"/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
line 548, in _assertIsIpAddressWithPort*00:06:34.319*
self._assertValidAddress(addr)*00:06:34.319*   File
"/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
line 555, in _assertValidAddress*00:06:34.319* addr)*00:06:34.319*
AssertionError: ('invalid IPv4 address: %s',
'ovirt-srv19.phx.ovirt.org')*00:06:34.319* *00:06:34.319*
==*00:06:34.319*
FAIL: testNoneArgumentAndPort
(vdsClientTests.CannonizeHostPortTest)*00:06:34.320*
--*00:06:34.320*
Traceback (most recent call last):*00:06:34.320*   File
"/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
line 502, in testNoneArgumentAndPort*00:06:34.320*
self._assertIsIpAddressWithPort(res)*00:06:34.320*   File
"/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
line 548, in _assertIsIpAddressWithPort*00:06:34.321*
self._assertValidAddress(addr)*00:06:34.321*   File
"/home/jenkins/workspace/vdsm_master_check-patch-el7-x86_64/vdsm/tests/vdsClientTests.py",
line 555, in _assertValidAddress*00:06:34.321* addr)*00:06:34.321*
AssertionError: ('invalid IPv4 address: %s',
'ovirt-srv19.phx.ovirt.org')*00:06:34.321* *00:06:34.321* Name

   Stmts   Miss  Cover   Missing*00:06:34.322*
-


-- 
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

[ovirt-devel] Some question about vdsm rpc

2016-07-26 Thread lifuqiong
1.   We know that xmlrpc and jsonrpc are enabled default in vdsm, vdsm
supply these two service in one port or two? What's the port number and how
we can change it?

 

2.   How can we know a vdsm host can supply an xmlrpc service or a
jsonrpc service?

 

3.   I found that while ovirt engine installing a vdsm host, engine will
check whether we are connecting to vdsm which supports xmlrpc only, engine
send a 'Host.ping' jsonrpc request,  why the code will enter into
bindingxmlrpc.py?

Did both jsonrpc and xmlrpc will call bindingxmlrpc.py?

 

4.   Then, I just get an json return with code = 0 or code = 99. What
does these error code mean ? I can't find detail in rpcjson
Specification(http://www.jsonrpc.org/specification)

 

5.   When installing vdsm, I got an "Host server117 installation failed.
Host is not reachable" error. Debugging code as follows:

Bindingxmlrpc.py

line637  def ping(self):

line638   # print 'os.getuid()',os.getuid() = 0

line639   # print 'os.getegit()',os.getegid() =0

line640api = API.Global()

line641return api.ping()

 

the api.ping() just open an file and update the file updating time, why
these will throw an error code 0 or 99? And I see the ping() function
created file /var/run/vdsm/client.log already exists in os, 

the only difference is the file is owned by root:root , not the vdsm:kvm?
Why?

 

Thank you.

 

___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

[ovirt-devel] VDSM retired from Fedora distribution

2016-07-26 Thread Sandro Bonazzola
Hi,
just an heads up about VDSM been retired from Fedora distribution due to
broken dependency.
If you want to get it back there you'll have to start again with the
package review process.

Thanks,
-- 
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

[ovirt-devel] [ACTION REQUIRED] oVirt 4.0.2 rc2 build starting in 1 hour

2016-07-26 Thread Sandro Bonazzola
Fyi oVirt products maintainers,
An oVirt build for an official release is going to start in one hour
If you're a maintainer for any of the projects included in oVirt
distribution and you have changes in your package ready to be released
please:
- bump version and release to be GA ready
- tag your release within git (implies a GitHub Release to be automatically
created)
- build your packages within jenkins / koji / copr / whatever
- verify all bugs on MODIFIED have target release and target milestone set.
- add your builds to releng-tools/releases/ovirt-4.0.2_rc2.conf withini
releng-tools project


-- 
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

[ovirt-devel] Debug vdsm 4.0.0 report error: libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

2016-07-26 Thread lifuqiong
 

 

I do make a mistake because I just print os.getuid() show the user root; but 
os.geteuid() show the current user is still vdsm;

 

Anyway , I still don’t know how to debug vdsm, I cann’t log in to centos with 
user VDSM, because I don’t know the passwd of user vdsm and if I changed the 
password, the service vdsmd will cann’t start.

 

the vdsm account is intentionally disabled for interactive login






 

You told me “should follow the devel setup wiki” , what’s the true link of vdsm 
devel setup wiki ?  I can’t get useful information in   
ovirt.org or google.

 

  
http://www.ovirt.org/develop/developer-guide/vdsm/developers/ has tips how to 
build from source and what packages are needed

Anything specific you’re troubleshooting?

 

 I do build the source from this instruction , but I want to set 
breakpoint to view each step and variable value to understand the vdsm’s code 
using python IDE such as Pycharm , 

 

You know that we can implement this debug requirement in ovirt engine easily, 
but I can’t implement local debug in vdsm easily, because vdsm didn’t allow 
root to run or debug.

 

Is there any debug instruction ?

 

I don’t think it’s possible to debug it from PyCharm, or any IDE for that 
matter, easily. 

It’s a multithreaded application, you can’t really set a breakpoint without 
affecting other functionality since some of the threads need to keep running

Best advice is to add a debugging/logging code in places you need, printing 
variables you’re interested in.

 

 I know it’s a multithreaded application , and debug vdsm is a very 
difficult job, but without debug, I don’t know which code I should replace or 
logging,   Is there any remote debug solution like ovirt engine?  I found that 

I can do remote debug in simple python application , but I didn’t success yet 
remote debugging vdsm. 

 

 Now one of our case I want to consider using ovirt as our solution , 
we may do little change over ovirt. but as described above, without debug , we 
can hardly understand vdsm clearly and cannot do correctly code change.

Is there some good advice ?

 

 Thank you

 Mark

Thanks,

michal





 

Thank you

Mark

 

Thanks,

michal






 

 

Thank you

 

发件人: Michal Skrivanek [  
mailto:mskri...@redhat.com] 
发送时间: 2016年7月26日 5:00
收件人: lifuqiong
抄送: users; devel
主题: Re: [ovirt-devel] Debug vdsm 4.0.0 report error: libvirt: XML-RPC error : 
Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

 

 


On 25 Jul 2016, at 21:50, Sandro Bonazzola <  
sbona...@redhat.com> wrote:

Adding some people from virt team.

Il 23/Lug/2016 11:44, "lifuqiong" <  
lifuqi...@cncloudsec.com> ha scritto:
>
> I debugged vdsm with PyCharm, And I logged on my Centos 7.2 with root,  and 
> get an error as follows:
>
>  
>
> Problem:
>
>  
>
> Traceback (most recent call last):
>
>   File "/usr/share/vdsm/vdsm", line 149, in run
>
> serve_clients(log)
>
>   File "/usr/share/vdsm/vdsm", line 104, in serve_clients
>
> cif = clientIF.getInstance(irs, log, scheduler)
>
>   File "/usr/share/vdsm/clientIF.py", line 204, in getInstance
>
> cls._instance = clientIF(irs, log, scheduler)
>
>   File "/usr/share/vdsm/clientIF.py", line 106, in __init__
>
> secret.clear()
>
>   File "/usr/lib/python2.7/site-packages/vdsm/virt/secret.py", line 92, in 
> clear
>
> con = libvirtconnection.get()
>
>   File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 
> 163, in get
>
> password)
>
>   File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 99, 
> in open_connection
>
> return utils.retry(libvirtOpen, timeout=10, sleep=0.2)
>
>   File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 546, in retry
>
> return func()
>
>   File "/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in openAuth
>
> if ret is None:raise libvirtError('virConnectOpenAuth() failed')
>
> libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': 
> Permission denied
>
>  
>
> Investitate:
>
> According to the traceback above, the code in libvirt.py as below, and  
> os.geteuid() get ‘0’ which shows the current user is root;

 

vdsm is not supposed to be run under root user. For debugging you should follow 
the devel setup wiki and not change a regular host. 

Depends what you modified, it's impossible to say from what you 
describedbut a general advice is you simply don't do that:)





>
>  
>
> def openAuth(uri, auth, flags=0):
>
>  #print os.geteuid()
>
> ret = libvirtmod.virConnectOpenAuth(uri, auth, flags)
>
> if ret is None:raise libvirtError('virConnectOpenAuth() failed')
>
> return virConnect(_obj=ret)
>
>  
>
> [root@server117 libvirt]# ll /var/run/libvirt/libvirt-sock
>

Re: [ovirt-devel] DRBD Integration with oVirt

2016-07-26 Thread Federico Simoncelli
Hi Hayley.

In the past I developed a POC for DRBD in oVirt.

  https://gerrit.ovirt.org/#/c/13585/

It's quite old and things have changed so for sure it's not up to
date. It also took some assumptions that may different from what you
want to achieve.

In fact it assumed to be hyper-converged which, at that time, it meant
that only data-centers of two nodes were supported (maybe DRBD changed
in this respect now, I remember there were some plans around this
circa 2014).
The idea was to achieve HA in small deployment of few VMs (e.g. ROBO).

On the other hand in case you want to separate compute and storage
then you could deploy DRBD on two hosts (outside of the oVirt
clusters) and expose the block device using iscsi (active/passive or
active/active with multipath).
I haven't checked what Cinder does, maybe it's something similar to
what I described here above.

Anyway that would work today out-of-the-box with no modifications to
oVirt, but of course has some complexities in deployment, testing and
maintenance (and hopefully a negligible performance penalty).

I don't know what are the general directions nowadays but in the past
(regardless of the architecture) I would have suggested to use VDSM as
agent to setup the DRBD storage.
(Anyway provisioning would come after you picked the architecture).

Thanks,

On Fri, Jun 3, 2016 at 8:13 PM, Hayley Swimelar  wrote:
> Hello all,
>
> A DRBD integration into oVirt is currently being planned.
>
> DRBD provides replicated, highly available block storage. For those
> unfamiliar with DRBD more information can be found here:
> https://www.drbd.org/en/comp/drbd-linux-driver
>
> DRBD 9 is the latest version of DRBD and interacts with DRBD Manage which is
> a daemon exposed via a D-Bus api. More information can be found here:
> https://www.drbd.org/en/comp/drbdmanage
>
> DRBD Manage handles the creation, assignment, etc. of DRBD volumes and is
> the interface through which Cinder manages DRBD.
>
> We are looking for advice on how best to have oVirt communicate with DRBD
> Manage and we have come to two options:
>
> 1) Use Cinder. Although we are integrated into Cinder, there are concerns
> about the need to set up a complete Cinder instance to provide access to
> DRBD.
>
> 2) The alternative to Cinder would be to have the oVirt Engine communicate
> directly to DRBD Manage via D-Bus.
>
> Any advice on the best way to achieve this would be much appreciated.
>
> --
> Hayley Swimelar
> LINBIT | Keeping the Digital World Running
> DRBD — Corosync — Pacemaker
> +1-503-573-1262 x212
> ___
> Devel mailing list
> Devel@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel

-- 
Federico
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] Debug vdsm 4.0.0 report error: libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

2016-07-26 Thread Michal Skrivanek

> On 26 Jul 2016, at 08:50, lifuqiong  wrote:
> 
>  
> On 26 Jul 2016, at 08:02, lifuqiong  > wrote:
>  
>  
> I do make a mistake because I just print os.getuid() show the user root; but 
> os.geteuid() show the current user is still vdsm;
>  
> Anyway , I still don’t know how to debug vdsm, I cann’t log in to centos with 
> user VDSM, because I don’t know the passwd of user vdsm and if I changed the 
> password, the service vdsmd will cann’t start.
>  
> the vdsm account is intentionally disabled for interactive login
> 
> 
>  
> You told me “should follow the devel setup wiki” , what’s the true link of 
> vdsm devel setup wiki ?  I can’t get useful information in ovirt.org 
>  or google.
>  
> http://www.ovirt.org/develop/developer-guide/vdsm/developers/ 
>  has tips how 
> to build from source and what packages are needed
> Anything specific you’re troubleshooting?
>  
>  I do build the source from this instruction , but I want to set 
> breakpoint to view each step and variable value to understand the vdsm’s code 
> using python IDE such as Pycharm , 
>  
> You know that we can implement this debug requirement in ovirt engine easily, 
> but I can’t implement local debug in vdsm easily, because vdsm didn’t allow 
> root to run or debug.
>  
> Is there any debug instruction ?

I don’t think it’s possible to debug it from PyCharm, or any IDE for that 
matter, easily. 
It’s a multithreaded application, you can’t really set a breakpoint without 
affecting other functionality since some of the threads need to keep running
Best advice is to add a debugging/logging code in places you need, printing 
variables you’re interested in.

Thanks,
michal

>  
> Thank you
> Mark
>  
> Thanks,
> michal
> 
> 
>  
>  
> Thank you
>  
> 发件人: Michal Skrivanek [mailto:mskri...@redhat.com 
> ] 
> 发送时间: 2016年7月26日 5:00
> 收件人: lifuqiong
> 抄送: users; devel
> 主题: Re: [ovirt-devel] Debug vdsm 4.0.0 report error: libvirt: XML-RPC error : 
> Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
>  
>  
> 
> On 25 Jul 2016, at 21:50, Sandro Bonazzola  > wrote:
> 
> Adding some people from virt team.
> Il 23/Lug/2016 11:44, "lifuqiong"  > ha scritto:
> >
> > I debugged vdsm with PyCharm, And I logged on my Centos 7.2 with root,  and 
> > get an error as follows:
> >
> >  
> >
> > Problem:
> >
> >  
> >
> > Traceback (most recent call last):
> >
> >   File "/usr/share/vdsm/vdsm", line 149, in run
> >
> > serve_clients(log)
> >
> >   File "/usr/share/vdsm/vdsm", line 104, in serve_clients
> >
> > cif = clientIF.getInstance(irs, log, scheduler)
> >
> >   File "/usr/share/vdsm/clientIF.py", line 204, in getInstance
> >
> > cls._instance = clientIF(irs, log, scheduler)
> >
> >   File "/usr/share/vdsm/clientIF.py", line 106, in __init__
> >
> > secret.clear()
> >
> >   File "/usr/lib/python2.7/site-packages/vdsm/virt/secret.py", line 92, in 
> > clear
> >
> > con = libvirtconnection.get()
> >
> >   File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 
> > 163, in get
> >
> > password)
> >
> >   File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 
> > 99, in open_connection
> >
> > return utils.retry(libvirtOpen, timeout=10, sleep=0.2)
> >
> >   File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 546, in retry
> >
> > return func()
> >
> >   File "/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in 
> > openAuth
> >
> > if ret is None:raise libvirtError('virConnectOpenAuth() failed')
> >
> > libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': 
> > Permission denied
> >
> >  
> >
> > Investitate:
> >
> > According to the traceback above, the code in libvirt.py as below, and  
> > os.geteuid() get ‘0’ which shows the current user is root;
>  
> vdsm is not supposed to be run under root user. For debugging you should 
> follow the devel setup wiki and not change a regular host. 
> Depends what you modified, it's impossible to say from what you 
> describedbut a general advice is you simply don't do that:)
> 
> 
> >
> >  
> >
> > def openAuth(uri, auth, flags=0):
> >
> >  #print os.geteuid()
> >
> > ret = libvirtmod.virConnectOpenAuth(uri, auth, flags)
> >
> > if ret is None:raise libvirtError('virConnectOpenAuth() failed')
> >
> > return virConnect(_obj=ret)
> >
> >  
> >
> > [root@server117 libvirt]# ll /var/run/libvirt/libvirt-sock
> >
> > srwxrwx---. 1 root qemu 0 Jul 19 23:43 /var/run/libvirt/libvirt-sock
> >
> >  
> >
> > According that, root should not get an Permission denied error ? But why?
> >
> >  
> >
> > And I setenforce=0 , and still show Perssion denied 

[ovirt-devel] 答复: Debug vdsm 4.0.0 report error: libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

2016-07-26 Thread lifuqiong
 

On 26 Jul 2016, at 08:02, lifuqiong  wrote:

 

 

I do make a mistake because I just print os.getuid() show the user root; but 
os.geteuid() show the current user is still vdsm;

 

Anyway , I still don’t know how to debug vdsm, I cann’t log in to centos with 
user VDSM, because I don’t know the passwd of user vdsm and if I changed the 
password, the service vdsmd will cann’t start.

 

the vdsm account is intentionally disabled for interactive login





 

You told me “should follow the devel setup wiki” , what’s the true link of vdsm 
devel setup wiki ?  I can’t get useful information in   
ovirt.org or google.

 

http://www.ovirt.org/develop/developer-guide/vdsm/developers/ has tips how to 
build from source and what packages are needed

Anything specific you’re troubleshooting?

 

 I do build the source from this instruction , but I want to set 
breakpoint to view each step and variable value to understand the vdsm’s code 
using python IDE such as Pycharm , 

 

You know that we can implement this debug requirement in ovirt engine easily, 
but I can’t implement local debug in vdsm easily, because vdsm didn’t allow 
root to run or debug.

 

Is there any debug instruction ?

 

Thank you

Mark

 

Thanks,

michal





 

 

Thank you

 

发件人: Michal Skrivanek [mailto:mskri...@redhat.com] 
发送时间: 2016年7月26日 5:00
收件人: lifuqiong
抄送: users; devel
主题: Re: [ovirt-devel] Debug vdsm 4.0.0 report error: libvirt: XML-RPC error : 
Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

 

 


On 25 Jul 2016, at 21:50, Sandro Bonazzola <  
sbona...@redhat.com> wrote:

Adding some people from virt team.

Il 23/Lug/2016 11:44, "lifuqiong" <  
lifuqi...@cncloudsec.com> ha scritto:
>
> I debugged vdsm with PyCharm, And I logged on my Centos 7.2 with root,  and 
> get an error as follows:
>
>  
>
> Problem:
>
>  
>
> Traceback (most recent call last):
>
>   File "/usr/share/vdsm/vdsm", line 149, in run
>
> serve_clients(log)
>
>   File "/usr/share/vdsm/vdsm", line 104, in serve_clients
>
> cif = clientIF.getInstance(irs, log, scheduler)
>
>   File "/usr/share/vdsm/clientIF.py", line 204, in getInstance
>
> cls._instance = clientIF(irs, log, scheduler)
>
>   File "/usr/share/vdsm/clientIF.py", line 106, in __init__
>
> secret.clear()
>
>   File "/usr/lib/python2.7/site-packages/vdsm/virt/secret.py", line 92, in 
> clear
>
> con = libvirtconnection.get()
>
>   File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 
> 163, in get
>
> password)
>
>   File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 99, 
> in open_connection
>
> return utils.retry(libvirtOpen, timeout=10, sleep=0.2)
>
>   File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 546, in retry
>
> return func()
>
>   File "/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in openAuth
>
> if ret is None:raise libvirtError('virConnectOpenAuth() failed')
>
> libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': 
> Permission denied
>
>  
>
> Investitate:
>
> According to the traceback above, the code in libvirt.py as below, and  
> os.geteuid() get ‘0’ which shows the current user is root;

 

vdsm is not supposed to be run under root user. For debugging you should follow 
the devel setup wiki and not change a regular host. 

Depends what you modified, it's impossible to say from what you 
describedbut a general advice is you simply don't do that:)




>
>  
>
> def openAuth(uri, auth, flags=0):
>
>  #print os.geteuid()
>
> ret = libvirtmod.virConnectOpenAuth(uri, auth, flags)
>
> if ret is None:raise libvirtError('virConnectOpenAuth() failed')
>
> return virConnect(_obj=ret)
>
>  
>
> [root@server117 libvirt]# ll /var/run/libvirt/libvirt-sock
>
> srwxrwx---. 1 root qemu 0 Jul 19 23:43 /var/run/libvirt/libvirt-sock
>
>  
>
> According that, root should not get an Permission denied error ? But why?
>
>  
>
> And I setenforce=0 , and still show Perssion denied error.
>
>  
>
> What’s the reason? And how to solve it?
>
>  
>
> Thank you.
>
>
> ___
> Devel mailing list
>   Devel@ovirt.org
>   
> http://lists.ovirt.org/mailman/listinfo/devel

 

___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Re: [ovirt-devel] Debug vdsm 4.0.0 report error: libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied

2016-07-26 Thread Michal Skrivanek

> On 26 Jul 2016, at 08:02, lifuqiong  wrote:
> 
>  
> I do make a mistake because I just print os.getuid() show the user root; but 
> os.geteuid() show the current user is still vdsm;
>  
> Anyway , I still don’t know how to debug vdsm, I cann’t log in to centos with 
> user VDSM, because I don’t know the passwd of user vdsm and if I changed the 
> password, the service vdsmd will cann’t start.

the vdsm account is intentionally disabled for interactive login

>  
> You told me “should follow the devel setup wiki” , what’s the true link of 
> vdsm devel setup wiki ?  I can’t get useful information in ovirt.org 
>  or google.

http://www.ovirt.org/develop/developer-guide/vdsm/developers/ 
 has tips how to 
build from source and what packages are needed
Anything specific you’re troubleshooting?

Thanks,
michal

>  
>  
> Thank you
>  
> 发件人: Michal Skrivanek [mailto:mskri...@redhat.com] 
> 发送时间: 2016年7月26日 5:00
> 收件人: lifuqiong
> 抄送: users; devel
> 主题: Re: [ovirt-devel] Debug vdsm 4.0.0 report error: libvirt: XML-RPC error : 
> Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
>  
>  
> 
> On 25 Jul 2016, at 21:50, Sandro Bonazzola  > wrote:
> 
> Adding some people from virt team.
> 
> Il 23/Lug/2016 11:44, "lifuqiong"  > ha scritto:
> >
> > I debugged vdsm with PyCharm, And I logged on my Centos 7.2 with root,  and 
> > get an error as follows:
> >
> >  
> >
> > Problem:
> >
> >  
> >
> > Traceback (most recent call last):
> >
> >   File "/usr/share/vdsm/vdsm", line 149, in run
> >
> > serve_clients(log)
> >
> >   File "/usr/share/vdsm/vdsm", line 104, in serve_clients
> >
> > cif = clientIF.getInstance(irs, log, scheduler)
> >
> >   File "/usr/share/vdsm/clientIF.py", line 204, in getInstance
> >
> > cls._instance = clientIF(irs, log, scheduler)
> >
> >   File "/usr/share/vdsm/clientIF.py", line 106, in __init__
> >
> > secret.clear()
> >
> >   File "/usr/lib/python2.7/site-packages/vdsm/virt/secret.py", line 92, in 
> > clear
> >
> > con = libvirtconnection.get()
> >
> >   File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 
> > 163, in get
> >
> > password)
> >
> >   File "/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 
> > 99, in open_connection
> >
> > return utils.retry(libvirtOpen, timeout=10, sleep=0.2)
> >
> >   File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 546, in retry
> >
> > return func()
> >
> >   File "/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in 
> > openAuth
> >
> > if ret is None:raise libvirtError('virConnectOpenAuth() failed')
> >
> > libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': 
> > Permission denied
> >
> >  
> >
> > Investitate:
> >
> > According to the traceback above, the code in libvirt.py as below, and  
> > os.geteuid() get ‘0’ which shows the current user is root;
> 
>  
> vdsm is not supposed to be run under root user. For debugging you should 
> follow the devel setup wiki and not change a regular host. 
> Depends what you modified, it's impossible to say from what you 
> describedbut a general advice is you simply don't do that:)
> 
> >
> >  
> >
> > def openAuth(uri, auth, flags=0):
> >
> >  #print os.geteuid()
> >
> > ret = libvirtmod.virConnectOpenAuth(uri, auth, flags)
> >
> > if ret is None:raise libvirtError('virConnectOpenAuth() failed')
> >
> > return virConnect(_obj=ret)
> >
> >  
> >
> > [root@server117 libvirt]# ll /var/run/libvirt/libvirt-sock
> >
> > srwxrwx---. 1 root qemu 0 Jul 19 23:43 /var/run/libvirt/libvirt-sock
> >
> >  
> >
> > According that, root should not get an Permission denied error ? But why?
> >
> >  
> >
> > And I setenforce=0 , and still show Perssion denied error.
> >
> >  
> >
> > What’s the reason? And how to solve it?
> >
> >  
> >
> > Thank you.
> >
> >
> > ___
> > Devel mailing list
> > Devel@ovirt.org 
> > http://lists.ovirt.org/mailman/listinfo/devel 
> > 
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel