Re: [ovirt-devel] execCmd() and storing stdout and stderr in log file

2016-07-05 Thread Yaniv Bronheim
Hi
I do work to remove the cpopen usages from execCmd. Using std popen over
py3 and subprocess32 over py2 which both implements the same api. The only
gap is the output object for async calls that we need to align with the
standard implementation and modify our current usages. I don't think that
adding more non-standard logics to execCmd is a good idea. we should fit
the standard usage in this function or override it separately with specific
implementation in commands.py. You may propose such patch

On Fri, Jul 1, 2016 at 5:43 PM, Tomáš Golembiovský 
wrote:

> Hi,
>
> I had a need recently to run a command with execCmd() and store it's
> output and error to a log file, while still receiving it in the calling
> code. Redirecting the error to output stream to have all in one stream
> is also useful feature.
>
> All this can be done in the calling code:
>
> a)  On the shell level, by modyfing the command. This can be
> intentionally dangerous because things like quoting of arguments has to
> be considered and also could cause problems when wrappers (sudo, nice,
> ...) are used.
>
> b)  By handling the writing to files in a code. This would add
> unnecessary code duplication in a long run. (I don't think I'm the only
> one who can see a potential in this.) Also for asynchronous process
> runs, when storing both stderr & stdout in one file, it requires polling
> and some stream magic. It would be better to have this done right and
> only once so it can be properly tested.
>
> That's why I think having it present in execCmd() ready for everyone's
> use is the best solution. Unfortunately it seems that the code is a)
> essential on many places in vdsm and b) not properly covered by tests.
> Which makes it hard to touch. Also apparently some refactoring is either
> planned or already underway.
>
> What is the situation about refactoring that code area? Anyone working
> on it? Do we have an estimation of time-frame for it?
>
> Any suggestions/ideas?
>
>
> Tomas
>
> --
> Tomáš Golembiovský 
> ___
> Devel mailing list
> Devel@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel




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

Re: [ovirt-devel] execCmd() and storing stdout and stderr in log file

2016-07-05 Thread Yaniv Bronheim
On Tue, Jul 5, 2016 at 10:44 AM, Yaniv Bronheim  wrote:

> Hi
> I do work to remove the cpopen usages from execCmd. Using std popen over
> py3 and subprocess32 over py2 which both implements the same api. The only
> gap is the output object for async calls that we need to align with the
> standard implementation and modify our current usages. I don't think that
> adding more non-standard logics to execCmd is a good idea. we should fit
> the standard usage in this function or override it separately with specific
> implementation in commands.py. You may propose such patch
>
> On Fri, Jul 1, 2016 at 5:43 PM, Tomáš Golembiovský 
> wrote:
>
>> Hi,
>>
>> I had a need recently to run a command with execCmd() and store it's
>> output and error to a log file, while still receiving it in the calling
>> code. Redirecting the error to output stream to have all in one stream
>> is also useful feature.
>>
>> All this can be done in the calling code:
>>
>> a)  On the shell level, by modyfing the command. This can be
>> intentionally dangerous because things like quoting of arguments has to
>> be considered and also could cause problems when wrappers (sudo, nice,
>> ...) are used.
>>
>> b)  By handling the writing to files in a code. This would add
>> unnecessary code duplication in a long run. (I don't think I'm the only
>> one who can see a potential in this.) Also for asynchronous process
>> runs, when storing both stderr & stdout in one file, it requires polling
>> and some stream magic. It would be better to have this done right and
>> only once so it can be properly tested.
>>
>> That's why I think having it present in execCmd() ready for everyone's
>> use is the best solution. Unfortunately it seems that the code is a)
>> essential on many places in vdsm and b) not properly covered by tests.
>> Which makes it hard to touch. Also apparently some refactoring is either
>> planned or already underway.
>>
>> What is the situation about refactoring that code area? Anyone working
>> on it? Do we have an estimation of time-frame for it?
>>
>> Any suggestions/ideas?
>>
>>
btw, after examine the area again, isn't watchCmd func is what you
 describe? we just need to replace the asyncProc usages there with
something that doesn't use StringIO as we do to support py3


>> Tomas
>>
>> --
>> Tomáš Golembiovský 
>> ___
>> Devel mailing list
>> Devel@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/devel
>
>
>
>
> --
> *Yaniv Bronhaim.*
>



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

[ovirt-devel] update - no infra support for the next 2 days

2016-07-05 Thread Eyal Edri
FYI,

Due to various holidays, PTOs and an on going 3.6.8 build there is not
infra support for the next two days.

If there are urgent issues, please open a ticket to infra-supp...@ovirt.org
and we'll do our best to handle it if possible.

-- 
Eyal Edri
Associate Manager
RHEV DevOps
EMEA ENG Virtualization R&D
Red Hat Israel

phone: +972-9-7692018
irc: eedri (on #tlv #rhev-dev #rhev-integ)
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

[ovirt-devel] SPM or SDM for a new verb?

2016-07-05 Thread Shmuel Melamud
Hi!

I'm writing code for a new verb (sparsifyInplace) in VDSM and got two
different opinions about whether to use SPM or SDM for it:

1) SDM is the new correct approach, need to use it.

2) SDM is on early stage and may be changed significantly, so it is better
to use SPM as mature and reliable approach.

What's your opinion?

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

Re: [ovirt-devel] Ovirt Node Next 4.0.0 host networking setup attempts to bridge an Infiniband interface

2016-07-05 Thread Ryan Barry
Hi Giorgio -

Unfortunately, I don't actually have any infiniband hardware to test with
in my lab. I'm not even sure anybody on the Node team knew there were IPoIB
use environments. That's great news (for 3.6)!

oVirt Node Next is much closer to "plain" RHEL. This sounds like it may be
a bug in ovirt-host-deploy, but it may also be cockpit.

Can you be more specific about where you're seeing this issue? Adding a
bridge from cockpit, adding a hosted engine node, or registering the node
to engine?

On Fri, Jul 1, 2016 at 6:51 AM, Giorgio Biacchi  wrote:

> Hello list,
> currently I have an up and running Ovirt 3.6 installation where every
> hypervisor
> access the data domain via NFS over infiniband. All is working as
> expected, with
> a couple of hooks I can set connected mode on ib0 and an MTU of 65520.
>
> Now I'm testing Ovirt Node Next, but the behavior is different. When I try
> to
> set up host networking the procedure attempts to bridge the network
> "ibstorage",
> defined in Networks tab, with ib0 interface but a non ethernet interface
> cannot
> be bridged that way.
>
> There's any way I can obtain the desired result? Or somehow tell to the
> hypervisor to not bridge that connection and to use ib0 directly?
>
> Thanks
> --
> gb
>
> PGP Key: http://pgp.mit.edu/
> Primary key fingerprint: C510 0765 943E EBED A4F2 69D3 16CC DC90 B9CB 0F34
> ___
> 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] SPM or SDM for a new verb?

2016-07-05 Thread Adam Litke

On 05/07/16 12:07 +0300, Shmuel Melamud wrote:

Hi!

I'm writing code for a new verb (sparsifyInplace) in VDSM and got two
different opinions about whether to use SPM or SDM for it:

1) SDM is the new correct approach, need to use it.

2) SDM is on early stage and may be changed significantly, so it is better
to use SPM as mature and reliable approach.

What's your opinion?


SDM is definitely the better way to go, if you can, since it will make
less work for you in the future and also make your verb use host
resources more efficiently.

My guess is that sparsifyInplace just needs to run a command against a
volume path that is visible to a selected vdsm host and wait for it to
complete.  Do you intend for this to be run also while a VM is using
the volume?

For SDM verbs in vdsm there is a basic formula.  All verbs are
asynchronous.  A new public API function is created in HSM.  This
function unpacks parameters and then creates and schedules a HostJob
instance.  The HostJob performs any necessary locking and does the
work.  It also has an interface for progress reporting and for
aborting the operation.  Engine monitors HostJobs using a public vdsm
API.  


While it's true that SDM is in early stages, the underlying
infrastructure that you will need has been upstream for awhile now.
I'll be happy to provide some additional details if you have further
questions.


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


[ovirt-devel] oVirt Community Newsletter: June 2016

2016-07-05 Thread Brian Proffitt
Not only was June the occasion of the Red Hat Summit event in San
Francisco, where oVirt was well-represented in the event and within
Community Central, but it was also the month where the year's biggest
release, oVirt 4.0!

The latest release of oVirt features:

* A New Administration Portal
* Improved Live-Migration Performance
* Improved Image Features
* Container Support
* New and Improved oVirt Node

Check out oVirt 4.0 today, and in the meantime, here's what happened in
June, 2016:

-
Software Releases
-

oVirt 4.0.0 Final Release is now available
http://lists.ovirt.org/pipermail/announce/2016-June/000268.html

New oVirt-Live (4.0.0) is available for download
http://lists.ovirt.org/pipermail/users/2016-June/040577.html

oVirt 3.6.7 Fifth Release Candidate is now available for testing
http://lists.ovirt.org/pipermail/announce/2016-June/000265.html


In the Community


oVirt 4.0 is released!
http://www.ovirt.org/blog/2016/06/ovirt-40-release/

Go Upstream at Summit Community Central
http://red.ht/29ipa6z

oVirt Meetup Boston - MA
http://www.meetup.com/Boston-oVirt-Community/

A New oVirt Dashboard for Disaster Recovery
https://bitbucket.org/chocomango/ovirt-dashboard

P.L. Ferrari Deploys Red Hat Enterprise Virtualization for a More Efficient
IT Infrastructure
http://red.ht/1V12049

Red Hat Summit Community Track Day One
http://red.ht/29mAH5m

oVirt 4.0 mit neuem Dashboard (Deutsch)
http://www.pro-linux.de/news/1/23702/ovirt-40-mit-neuem-dashboard.html


Deep Dives and Technical Discussions


Supercharge Your Network Throughput via Single Root I/O Virtualization
(SR-IOV)
http://red.ht/1RX3Qkx

oVirt Release 4.0: New opportunities [Russian] [Video]
https://youtu.be/I4hQAH08Dlg

How to Install oVirt (Open Virtualisation) on Centos 7 [Indonesian] [Video]
https://youtu.be/eO0tzmQ9LCk

Fedora 24 Server & oVirt 4.0 [Video Playlist]
http://bit.ly/29iqDtk

Creating a KVM VM through oVirt 4.0 with Intel Skull Canyon [Video]
https://youtu.be/AjmstE30sM0

Unedited Install of Windows 2012 R2 on KVM oVirt with Nuctastic Intel Skull
Canyon [Video]
https://youtu.be/DnhutZdLYT4

3 Minute Provisioning VM from KVM oVirt Template [Video]
https://youtu.be/uH7QraPPFnw

Restart of KVM Ovirt Windows 2016 VM in less than 2 seconds [Video]
https://youtu.be/Ea_QeOv9mD8

-- 
Brian Proffitt
Principal Community Analyst
Open Source and Standards
@TheTechScribe
574.383.9BKP
___
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel