Change in vdsm[master]: storage: move threadPool module to vdsm storage lib

2016-08-14 Thread aaviram
Amit Aviram has abandoned this change.

Change subject: storage: move threadPool module to vdsm storage lib
..


Abandoned

Already moved to vdsm/storage

-- 
To view, visit https://gerrit.ovirt.org/56571
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ie5f4edd8eea38fdb6bdf3be5c7732fee0b56d58e
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: storage: move outOfProcess module to vdsm storage lib

2016-08-14 Thread aaviram
Amit Aviram has abandoned this change.

Change subject: storage: move outOfProcess module to vdsm storage lib
..


Abandoned

oop already moved to Storage lib

-- 
To view, visit https://gerrit.ovirt.org/56576
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I390f8bc440c377b225a328aeb424233498522a5a
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: qemuimg: Introduce supports_compat helper

2016-07-05 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: qemuimg: Introduce supports_compat helper
..


Patch Set 13: Code-Review+1

-- 
To view, visit https://gerrit.ovirt.org/59410
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I341b4559d5d10709fa93b722572cf7f0a8f953ff
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: verify_untrusted_volume: Check compatibility version

2016-07-04 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: verify_untrusted_volume: Check compatibility version
..


Patch Set 14: Code-Review+1

Now with the next patch, this is a good addition

-- 
To view, visit https://gerrit.ovirt.org/59411
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2d5609340ba3bbe00f81d0cde727eb75c94ebec
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: verify_untrusted_volume: Check compatibility version

2016-07-03 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: verify_untrusted_volume: Check compatibility version
..


Patch Set 14: Code-Review-1

-- 
To view, visit https://gerrit.ovirt.org/59411
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2d5609340ba3bbe00f81d0cde727eb75c94ebec
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: verify_untrusted_volume: Check compatibility version

2016-07-03 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: verify_untrusted_volume: Check compatibility version
..


Patch Set 7:

(1 comment)

https://gerrit.ovirt.org/#/c/59411/7/lib/vdsm/storage/misc.py
File lib/vdsm/storage/misc.py:

PS7, Line 805: qcow2
With the current implementation of supports_compat(compat), this will check if 
VDSM generally supports the volume's compat level, while this specific host 
might not support it. we want this function to verify with "config.get('irs', 
'qcow2_compat')"

You can change supports_compat(compat) or add another helper that relies on 
this config.


-- 
To view, visit https://gerrit.ovirt.org/59411
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2d5609340ba3bbe00f81d0cde727eb75c94ebec
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: qemuimg: Introduce supports_compat helper

2016-07-03 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: qemuimg: Introduce supports_compat helper
..


Patch Set 7:

(1 comment)

https://gerrit.ovirt.org/#/c/59410/7/lib/vdsm/qemuimg.py
File lib/vdsm/qemuimg.py:

Line 48: _QCOW2_COMPAT_SUPPORTED = ("0.10", "1.1")
Line 49: 
Line 50: 
Line 51: def supports_compat(compat):
Line 52: return compat in _QCOW2_COMPAT_SUPPORTED
> This does not verify anything, it just return if a value is one of the supp
supported generally in VDSM, but not in this specific host. we want to know 
what are the specific versions that this host supports, in order to use it to 
verify an image.
Line 53: 
Line 54: 
Line 55: class QImgError(Exception):
Line 56: def __init__(self, ecode, stdout, stderr, message=None):


-- 
To view, visit https://gerrit.ovirt.org/59410
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I341b4559d5d10709fa93b722572cf7f0a8f953ff
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: qemuimg: Introduce supports_compat helper

2016-06-30 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: qemuimg: Introduce supports_compat helper
..


Patch Set 8: Code-Review-1

See my comment in patch set 7

-- 
To view, visit https://gerrit.ovirt.org/59410
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I341b4559d5d10709fa93b722572cf7f0a8f953ff
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: verify_untrusted_volume: Check compatibility version

2016-06-29 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: verify_untrusted_volume: Check compatibility version
..


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/59411/1//COMMIT_MSG
Commit Message:

Line 6: 
Line 7: verify_untrusted_volume: Check compatibility version
Line 8: 
Line 9: When importing a volume using imaged, QCOW2 volumes with an unsupported
Line 10: compatibility version should be rejected.
> Looking again at previous patch, I see that we actually check for 0.11 and 
Nir, unfortunately we can't support any version of QCOW without being sure this 
disk will be readable in every host in the DC.

If we have 3.6 cluster with a rhel6 host, and using a rhel7 host with an 
uploaded 1.1 qcow image, the image won't be readable. only if the user 
configures the host to support 1.1, we should enable it.

Reminding this issue:
https://bugzilla.redhat.com/show_bug.cgi?id=1139707
Line 11: 
Line 12: Change-Id: Ib2d5609340ba3bbe00f81d0cde727eb75c94ebec
Line 13: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1344289


-- 
To view, visit https://gerrit.ovirt.org/59411
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2d5609340ba3bbe00f81d0cde727eb75c94ebec
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: verify_untrusted_volume: Check compatibility version

2016-06-29 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: verify_untrusted_volume: Check compatibility version
..


Patch Set 7: Code-Review-1

Please refer to my comment in 2 patches back in this chain

-- 
To view, visit https://gerrit.ovirt.org/59411
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2d5609340ba3bbe00f81d0cde727eb75c94ebec
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: qemuimg: Introduce supports_compat helper

2016-06-29 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: qemuimg: Introduce supports_compat helper
..


Patch Set 7:

(1 comment)

https://gerrit.ovirt.org/#/c/59410/7/lib/vdsm/qemuimg.py
File lib/vdsm/qemuimg.py:

PS7, Line 52: _QCOW2_COMPAT_SUPPORTED
I think you are verifying with the wrong value, this list is the versions that 
VDSM generally supports, while the version that the specific instance of VDSM 
runs is configured in:

config.get('irs', 'qcow2_compat')

See this change for reference:
I8e217ec42a803d53403947a5fb140cb51202fbfa


-- 
To view, visit https://gerrit.ovirt.org/59410
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I341b4559d5d10709fa93b722572cf7f0a8f953ff
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[ovirt-4.0]: build: support imageio in rhev

2016-06-27 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: build: support imageio in rhev
..


Patch Set 1:

Milestone is now correct

-- 
To view, visit https://gerrit.ovirt.org/59799
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3c65933e54662915a5a25ba5d7dd7d4277d6e8a4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.0
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[ovirt-4.0]: build: support imageio in rhev

2016-06-27 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: build: support imageio in rhev
..


Patch Set 1:

I need an approval from Allon/Yaniv for that. will take care of it asap

-- 
To view, visit https://gerrit.ovirt.org/59799
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3c65933e54662915a5a25ba5d7dd7d4277d6e8a4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.0
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: build: support imageio in rhev

2016-06-27 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: build: support imageio in rhev
..


Patch Set 2:

bp: https://gerrit.ovirt.org/#/c/59799/

-- 
To view, visit https://gerrit.ovirt.org/59696
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3c65933e54662915a5a25ba5d7dd7d4277d6e8a4
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[ovirt-4.0]: build: support imageio in rhev

2016-06-27 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: build: support imageio in rhev
..


Patch Set 1: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/59799
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3c65933e54662915a5a25ba5d7dd7d4277d6e8a4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.0
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[ovirt-4.0]: build: support imageio in rhev

2016-06-27 Thread aaviram
Hello Nir Soffer,

I'd like you to do a code review.  Please visit

https://gerrit.ovirt.org/59799

to review the following change.

Change subject: build: support imageio in rhev
..

build: support imageio in rhev

Since ovirt-imageio is now available in rhel's channels, we should
enable it in rhev. This will cause an auto-installation of ovirt-imageio
when installing VDSM, so image uploading can be supported in the
installed host without any user intervation.

Change-Id: I3c65933e54662915a5a25ba5d7dd7d4277d6e8a4
Bug-Url: https://bugzilla.redhat.com/1349033
Signed-off-by: Amit Aviram 
Reviewed-on: https://gerrit.ovirt.org/59696
Continuous-Integration: Jenkins CI
Reviewed-by: Allon Mureinik 
Reviewed-by: Nir Soffer 
---
M contrib/rhev_build.sh
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/59799/1

diff --git a/contrib/rhev_build.sh b/contrib/rhev_build.sh
index 8be028c..d31cb6f 100755
--- a/contrib/rhev_build.sh
+++ b/contrib/rhev_build.sh
@@ -10,7 +10,6 @@
 --with-qemu-img='qemu-img-rhev' \
 --enable-hooks \
 --disable-gluster-mgmt \
---disable-ovirt-imageio \
 --disable-python3
 make dist
 


-- 
To view, visit https://gerrit.ovirt.org/59799
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c65933e54662915a5a25ba5d7dd7d4277d6e8a4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.0
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Nir Soffer 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: build: support imageio in rhev

2016-06-27 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: build: support imageio in rhev
..


Patch Set 1:

Right, it is the opposite than what I said

-- 
To view, visit https://gerrit.ovirt.org/59696
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3c65933e54662915a5a25ba5d7dd7d4277d6e8a4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Sandro Bonazzola 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: build: support imageio in rhev

2016-06-26 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: build: support imageio in rhev
..


Patch Set 1:

Verified with the script itself, rhev_build.sh created a spec with 
"with_ovirt_imageio 0", while before this patch is was "1", which is tested and 
works.

-- 
To view, visit https://gerrit.ovirt.org/59696
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3c65933e54662915a5a25ba5d7dd7d4277d6e8a4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Sandro Bonazzola 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: build: support imageio in rhev

2016-06-26 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: build: support imageio in rhev
..


Patch Set 1: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/59696
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3c65933e54662915a5a25ba5d7dd7d4277d6e8a4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Sandro Bonazzola 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: build: support imageio in rhev

2016-06-23 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: build: support imageio in rhev
..

build: support imageio in rhev

Since ovirt-imageio is now available in rhel's channels, we should
enable it in rhev. This will cause an auto-installation of ovirt-imageio
when installing VDSM, so image uploading can be supported in the
installed host without any user intervation.

Change-Id: I3c65933e54662915a5a25ba5d7dd7d4277d6e8a4
Bug-Url: https://bugzilla.redhat.com/1349033
Signed-off-by: Amit Aviram 
---
M contrib/rhev_build.sh
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/59696/1

diff --git a/contrib/rhev_build.sh b/contrib/rhev_build.sh
index 8be028c..d31cb6f 100755
--- a/contrib/rhev_build.sh
+++ b/contrib/rhev_build.sh
@@ -10,7 +10,6 @@
 --with-qemu-img='qemu-img-rhev' \
 --enable-hooks \
 --disable-gluster-mgmt \
---disable-ovirt-imageio \
 --disable-python3
 make dist
 


-- 
To view, visit https://gerrit.ovirt.org/59696
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c65933e54662915a5a25ba5d7dd7d4277d6e8a4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: storage: move outOfProcess module to vdsm storage lib

2016-05-08 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: storage: move outOfProcess module to vdsm storage lib
..


Patch Set 7: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/56576
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I390f8bc440c377b225a328aeb424233498522a5a
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: move outOfProcess module to vdsm storage lib

2016-05-08 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: storage: move outOfProcess module to vdsm storage lib
..


Patch Set 6:

(2 comments)

https://gerrit.ovirt.org/#/c/56576/6/tests/outOfProcessTests.py
File tests/outOfProcessTests.py:

PS6, Line 2: 2012
> 2012-2016
Done


Line 18: # Refer to the README and COPYING files for full details of the license
Line 19: #
Line 20: 
Line 21: from testlib import VdsmTestCase as TestCaseBase
Line 22: from vdsm.storage import outOfProcess as oop
> Move it first with an empty line after it
Done
Line 23: from monkeypatch import MonkeyPatchScope
Line 24: 
Line 25: import gc
Line 26: import logging


-- 
To view, visit https://gerrit.ovirt.org/56576
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I390f8bc440c377b225a328aeb424233498522a5a
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: move outOfProcess module to vdsm storage lib

2016-05-08 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: storage: move outOfProcess module to vdsm storage lib
..


Patch Set 6: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/56576
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I390f8bc440c377b225a328aeb424233498522a5a
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: move threadPool module to vdsm storage lib

2016-05-08 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: storage: move threadPool module to vdsm storage lib
..


Patch Set 4: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/56571
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie5f4edd8eea38fdb6bdf3be5c7732fee0b56d58e
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: move threadPool module to vdsm storage lib

2016-04-26 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: storage: move threadPool module to vdsm storage lib
..


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/56571/2/lib/vdsm/storage/threadPool.py
File lib/vdsm/storage/threadPool.py:

Line 5: # License: PSF License
Line 6: # http://wiki.python.org/moin/PythonSoftwareFoundationLicenseV2Easy
Line 7: #
Line 8: 
Line 9: from __future__ import absolute_import
> Done
I think it makes the CI tests to fail:
"Missing absolute_import in lib/vdsm/storage/threadPool.py"

http://jenkins.phx.ovirt.org/job/vdsm_master_check-patch-fc23-x86_64/110/console
Line 10: from __future__ import print_function
Line 11: import threading
Line 12: from time import sleep
Line 13: from Queue import Queue, Empty


-- 
To view, visit https://gerrit.ovirt.org/56571
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie5f4edd8eea38fdb6bdf3be5c7732fee0b56d58e
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: move outOfProcess module to vdsm storage lib

2016-04-26 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: storage: move outOfProcess module to vdsm storage lib
..


Patch Set 4:

(1 comment)

https://gerrit.ovirt.org/#/c/56576/4/tests/miscTests.py
File tests/miscTests.py:

PS4, Line 42: storage
Missed, will change to "from .." soon


-- 
To view, visit https://gerrit.ovirt.org/56576
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I390f8bc440c377b225a328aeb424233498522a5a
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: move outOfProcess module to vdsm storage lib

2016-04-26 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: storage: move outOfProcess module to vdsm storage lib
..


Patch Set 2:

(8 comments)

https://gerrit.ovirt.org/#/c/56576/2/lib/vdsm/storage/outOfProcess.py
File lib/vdsm/storage/outOfProcess.py:

Line 25: import types
Line 26: from warnings import warn
Line 27: import weakref
Line 28: 
Line 29: from __future__ import absolute_import
> This must be the first import in the file.
Done
Line 30: 
Line 31: from vdsm import constants
Line 32: from vdsm.config import config
Line 33: from vdsm.storage import exception as se


https://gerrit.ovirt.org/#/c/56576/2/tests/outOfProcessTests.py
File tests/outOfProcessTests.py:

Line 18: # Refer to the README and COPYING files for full details of the license
Line 19: #
Line 20: 
Line 21: from testlib import VdsmTestCase as TestCaseBase
Line 22: import vdsm.storage.outOfProcess as oop
> from vdsm.storage import outOfProcess as oop
Done
Line 23: from monkeypatch import MonkeyPatchScope
Line 24: 
Line 25: import gc
Line 26: import logging


https://gerrit.ovirt.org/#/c/56576/2/vdsm/storage/fileSD.py
File vdsm/storage/fileSD.py:

Line 29: from vdsm.storage import exception as se
Line 30: from vdsm.storage import fileUtils
Line 31: from vdsm.storage import mount
Line 32: from vdsm.storage.persistent import PersistentDict, DictValidator
Line 33: import vdsm.storage.outOfProcess as oop
> from ...
Done
Line 34: 
Line 35: import sd
Line 36: import sdm.volume_artifacts
Line 37: import fileVolume


https://gerrit.ovirt.org/#/c/56576/2/vdsm/storage/fileVolume.py
File vdsm/storage/fileVolume.py:

Line 27: from vdsm.commands import grepCmd
Line 28: from vdsm.storage import exception as se
Line 29: from vdsm.storage.constants import FILE_VOLUME_PERMISSIONS
Line 30: from vdsm.storage.constants import LEASE_FILEEXT
Line 31: import vdsm.storage.outOfProcess as oop
> from...
Done
Line 32: from vdsm.storage.threadLocal import vars
Line 33: 
Line 34: from sdc import sdCache
Line 35: import volume


https://gerrit.ovirt.org/#/c/56576/2/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

Line 48: from vdsm.storage import fileUtils
Line 49: from vdsm.storage import mount
Line 50: from vdsm.storage.constants import STORAGE
Line 51: from vdsm.storage.constants import SECTOR_SIZE
Line 52: import vdsm.storage.outOfProcess as oop
> from
Done
Line 53: from vdsm.storage.threadLocal import vars
Line 54: 
Line 55: import sp
Line 56: from spbackends import MAX_POOL_DESCRIPTION_SIZE, MAX_DOMAINS


https://gerrit.ovirt.org/#/c/56576/2/vdsm/storage/nfsSD.py
File vdsm/storage/nfsSD.py:

Line 22: 
Line 23: from vdsm.storage import exception as se
Line 24: from vdsm.storage import fileUtils
Line 25: from vdsm.storage import mount
Line 26: import vdsm.storage.outOfProcess as oop
> from
Done
Line 27: 
Line 28: import sd
Line 29: import fileSD
Line 30: import misc


https://gerrit.ovirt.org/#/c/56576/2/vdsm/storage/sd.py
File vdsm/storage/sd.py:

Line 26: import codecs
Line 27: from contextlib import contextmanager
Line 28: 
Line 29: from vdsm.storage import exception as se
Line 30: import vdsm.storage.outOfProcess as oop
> from
Done
Line 31: from vdsm.storage.persistent import unicodeEncoder, unicodeDecoder
Line 32: 
Line 33: import image
Line 34: import misc


https://gerrit.ovirt.org/#/c/56576/2/vdsm/storage/task.py
File vdsm/storage/task.py:

Line 52: from contextlib import contextmanager
Line 53: from functools import wraps
Line 54: 
Line 55: from vdsm.storage import exception as se
Line 56: import vdsm.storage.outOfProcess as oop
> from
Done
Line 57: from vdsm.storage.threadLocal import vars
Line 58: 
Line 59: import uuid
Line 60: import misc


-- 
To view, visit https://gerrit.ovirt.org/56576
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I390f8bc440c377b225a328aeb424233498522a5a
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: move threadPool module to vdsm storage lib

2016-04-26 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: storage: move threadPool module to vdsm storage lib
..


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/56571/2/lib/vdsm/storage/threadPool.py
File lib/vdsm/storage/threadPool.py:

Line 5: # License: PSF License
Line 6: # http://wiki.python.org/moin/PythonSoftwareFoundationLicenseV2Easy
Line 7: #
Line 8: 
Line 9: from __future__ import absolute_import
> Merge with the other __future__ import, leaving blank line between the othe
Done
Line 10: from __future__ import print_function
Line 11: import threading
Line 12: from time import sleep
Line 13: from Queue import Queue, Empty


-- 
To view, visit https://gerrit.ovirt.org/56571
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie5f4edd8eea38fdb6bdf3be5c7732fee0b56d58e
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: move threadLocal module to vdsm storage lib

2016-04-26 Thread aaviram
Amit Aviram has abandoned this change.

Change subject: storage: move threadLocal module to vdsm storage lib
..


Abandoned

We have this patch, waiting for verification:
https://gerrit.ovirt.org/55255/

-- 
To view, visit https://gerrit.ovirt.org/56575
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I9b3e106598b1b76478505a7709a74f2841f782fa
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: move outOfProcess module to vdsm storage lib

2016-04-25 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: storage: move outOfProcess module to vdsm storage lib
..

storage: move outOfProcess module to vdsm storage lib

This patch moves the module storage/outOfProcess.py to
vdsm/storage/outOfProcess.py.

Change-Id: I390f8bc440c377b225a328aeb424233498522a5a
Signed-off-by: Amit Aviram 
---
R lib/vdsm/storage/outOfProcess.py
M tests/outOfProcessTests.py
M vdsm/storage/fileSD.py
M vdsm/storage/fileVolume.py
M vdsm/storage/hsm.py
M vdsm/storage/nfsSD.py
M vdsm/storage/sd.py
M vdsm/storage/task.py
8 files changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/76/56576/1

diff --git a/vdsm/storage/outOfProcess.py b/lib/vdsm/storage/outOfProcess.py
similarity index 99%
rename from vdsm/storage/outOfProcess.py
rename to lib/vdsm/storage/outOfProcess.py
index ce2057d..a81b9cc 100644
--- a/vdsm/storage/outOfProcess.py
+++ b/lib/vdsm/storage/outOfProcess.py
@@ -26,6 +26,8 @@
 from warnings import warn
 import weakref
 
+from __future__ import absolute_import
+
 from vdsm import constants
 from vdsm.config import config
 from vdsm.storage import exception as se
diff --git a/tests/outOfProcessTests.py b/tests/outOfProcessTests.py
index e159364..1c4e493 100644
--- a/tests/outOfProcessTests.py
+++ b/tests/outOfProcessTests.py
@@ -19,7 +19,7 @@
 #
 
 from testlib import VdsmTestCase as TestCaseBase
-import storage.outOfProcess as oop
+import vdsm.storage.outOfProcess as oop
 from monkeypatch import MonkeyPatchScope
 
 import gc
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index bb843a6..fd5185d 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -30,12 +30,12 @@
 from vdsm.storage import fileUtils
 from vdsm.storage import mount
 from vdsm.storage.persistent import PersistentDict, DictValidator
+import vdsm.storage.outOfProcess as oop
 
 import sd
 import sdm.volume_artifacts
 import fileVolume
 import misc
-import outOfProcess as oop
 from vdsm import constants
 from vdsm.utils import stripNewLines
 from vdsm.storage.constants import LEASE_FILEEXT
diff --git a/vdsm/storage/fileVolume.py b/vdsm/storage/fileVolume.py
index db74732..b55b4eb 100644
--- a/vdsm/storage/fileVolume.py
+++ b/vdsm/storage/fileVolume.py
@@ -28,10 +28,10 @@
 from vdsm.storage import exception as se
 from vdsm.storage.constants import FILE_VOLUME_PERMISSIONS
 from vdsm.storage.constants import LEASE_FILEEXT
+import vdsm.storage.outOfProcess as oop
 from vdsm.storage.threadLocal import vars
 
 from sdc import sdCache
-import outOfProcess as oop
 import volume
 import image
 import sd
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index c0968e1..26df9ab 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -49,6 +49,7 @@
 from vdsm.storage import mount
 from vdsm.storage.constants import STORAGE
 from vdsm.storage.constants import SECTOR_SIZE
+import vdsm.storage.outOfProcess as oop
 from vdsm.storage.threadLocal import vars
 
 import sp
@@ -63,7 +64,6 @@
 import localFsSD
 import lvm
 import multipath
-import outOfProcess as oop
 from sdc import sdCache
 import image
 import imagetickets
diff --git a/vdsm/storage/nfsSD.py b/vdsm/storage/nfsSD.py
index ece3f50..0594c16 100644
--- a/vdsm/storage/nfsSD.py
+++ b/vdsm/storage/nfsSD.py
@@ -23,10 +23,10 @@
 from vdsm.storage import exception as se
 from vdsm.storage import fileUtils
 from vdsm.storage import mount
+import vdsm.storage.outOfProcess as oop
 
 import sd
 import fileSD
-import outOfProcess as oop
 import misc
 
 
diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py
index 3e261bf..33358b9 100644
--- a/vdsm/storage/sd.py
+++ b/vdsm/storage/sd.py
@@ -27,6 +27,7 @@
 from contextlib import contextmanager
 
 from vdsm.storage import exception as se
+import vdsm.storage.outOfProcess as oop
 from vdsm.storage.persistent import unicodeEncoder, unicodeDecoder
 
 import image
@@ -38,7 +39,6 @@
 from vdsm import constants
 from vdsm.storage import constants as storage_constants
 import clusterlock
-import outOfProcess as oop
 import volume
 
 from vdsm.config import config
diff --git a/vdsm/storage/task.py b/vdsm/storage/task.py
index e2b0e2b..c710db9 100644
--- a/vdsm/storage/task.py
+++ b/vdsm/storage/task.py
@@ -53,6 +53,7 @@
 from functools import wraps
 
 from vdsm.storage import exception as se
+import vdsm.storage.outOfProcess as oop
 from vdsm.storage.threadLocal import vars
 
 import uuid
@@ -62,7 +63,6 @@
 from vdsm import concurrent
 from vdsm.config import config
 from vdsm.logUtils import SimpleLogAdapter
-import outOfProcess as oop
 
 
 getProcPool = oop.getGlobalProcPool


-- 
To view, visit https://gerrit.ovirt.org/56576
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I390f8bc440c377b225a328aeb424233498522a5a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 

Change in vdsm[master]: storage: move threadLocal module to vdsm storage lib

2016-04-25 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: storage: move threadLocal module to vdsm storage lib
..

storage: move threadLocal module to vdsm storage lib

This patch moves the module storage/threadPool.py to
vdsm/storage/threadLocal.py.

Change-Id: I9b3e106598b1b76478505a7709a74f2841f782fa
Signed-off-by: Amit Aviram 
---
M lib/vdsm/storage/Makefile.am
R lib/vdsm/storage/threadLocal.py
M vdsm.spec.in
M vdsm/storage/Makefile.am
M vdsm/storage/blockVolume.py
M vdsm/storage/fileVolume.py
M vdsm/storage/hsm.py
M vdsm/storage/image.py
M vdsm/storage/sdm/api/base.py
M vdsm/storage/task.py
M vdsm/storage/volume.py
11 files changed, 12 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/56575/1

diff --git a/lib/vdsm/storage/Makefile.am b/lib/vdsm/storage/Makefile.am
index 720eafd..e482e6d 100644
--- a/lib/vdsm/storage/Makefile.am
+++ b/lib/vdsm/storage/Makefile.am
@@ -31,5 +31,6 @@
rwlock.py \
securable.py \
sync.py \
+   threadLocal.py \
threadPool.py \
$(NULL)
diff --git a/vdsm/storage/threadLocal.py b/lib/vdsm/storage/threadLocal.py
similarity index 91%
rename from vdsm/storage/threadLocal.py
rename to lib/vdsm/storage/threadLocal.py
index ea245d0..5fabb64 100644
--- a/vdsm/storage/threadLocal.py
+++ b/lib/vdsm/storage/threadLocal.py
@@ -1,5 +1,5 @@
 #
-# Copyright 2011 Red Hat, Inc.
+# Copyright 2011-2016 Red Hat, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,6 +18,8 @@
 # Refer to the README and COPYING files for full details of the license
 #
 
+from __future__ import absolute_import
+
 import threading
 
 vars = threading.local()
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 037ccc5..a0f02b7 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -961,7 +961,6 @@
 %{_datadir}/%{vdsm_name}/storage/storageServer.py*
 %{_datadir}/%{vdsm_name}/storage/taskManager.py*
 %{_datadir}/%{vdsm_name}/storage/task.py*
-%{_datadir}/%{vdsm_name}/storage/threadLocal.py*
 %{_datadir}/%{vdsm_name}/storage/volume.py*
 %{_datadir}/%{vdsm_name}/storage/imageRepository/__init__.py*
 %{_datadir}/%{vdsm_name}/storage/imageRepository/formatConverter.py*
@@ -1181,6 +1180,7 @@
 %{python_sitelib}/%{vdsm_name}/storage/rwlock.py*
 %{python_sitelib}/%{vdsm_name}/storage/securable.py*
 %{python_sitelib}/%{vdsm_name}/storage/sync.py*
+%{python_sitelib}/%{vdsm_name}/storage/threadLocal.py*
 %{python_sitelib}/%{vdsm_name}/storage/threadPool.py*
 %{python_sitelib}/%{vdsm_name}/tc/__init__.py*
 %{python_sitelib}/%{vdsm_name}/tc/_parser.py*
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index ff598ac..c5884ec 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -60,7 +60,6 @@
storageServer.py \
taskManager.py \
task.py \
-   threadLocal.py \
volume.py
 
 dist_vdsmexec_SCRIPTS = \
diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py
index d33e137..2372774 100644
--- a/vdsm/storage/blockVolume.py
+++ b/vdsm/storage/blockVolume.py
@@ -28,6 +28,7 @@
 from vdsm.config import config
 from vdsm.storage import exception as se
 from vdsm.storage import fileUtils
+from vdsm.storage.threadLocal import vars
 import vdsm.utils as utils
 
 import volume
@@ -40,7 +41,6 @@
 import task
 import lvm
 import resourceManager as rm
-from threadLocal import vars
 from sdc import sdCache
 from resourceFactories import LVM_ACTIVATION_NAMESPACE
 
diff --git a/vdsm/storage/fileVolume.py b/vdsm/storage/fileVolume.py
index 0afe6f3..db74732 100644
--- a/vdsm/storage/fileVolume.py
+++ b/vdsm/storage/fileVolume.py
@@ -28,6 +28,7 @@
 from vdsm.storage import exception as se
 from vdsm.storage.constants import FILE_VOLUME_PERMISSIONS
 from vdsm.storage.constants import LEASE_FILEEXT
+from vdsm.storage.threadLocal import vars
 
 from sdc import sdCache
 import outOfProcess as oop
@@ -38,7 +39,6 @@
 import misc
 from misc import deprecated
 import task
-from threadLocal import vars
 
 META_FILEEXT = ".meta"
 LEASE_FILEOFFSET = 0
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index bd33b25..c0968e1 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -49,6 +49,7 @@
 from vdsm.storage import mount
 from vdsm.storage.constants import STORAGE
 from vdsm.storage.constants import SECTOR_SIZE
+from vdsm.storage.threadLocal import vars
 
 import sp
 from spbackends import MAX_POOL_DESCRIPTION_SIZE, MAX_DOMAINS
@@ -72,7 +73,6 @@
 from misc import deprecated
 import taskManager
 import clusterlock
-from threadLocal import vars
 import resourceManager as rm
 from resourceFactories import IMAGE_NAMESPACE
 import devicemapper
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index 381b2a1..68923dc 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -30,6 +30,7 @@
 

Change in vdsm[master]: storage: move threadPool module to vdsm storage lib

2016-04-25 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: storage: move threadPool module to vdsm storage lib
..


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/56571/1/vdsm/storage/storage_mailbox.py
File vdsm/storage/storage_mailbox.py:

Line 30: import uuid
Line 31: 
Line 32: from vdsm.config import config
Line 33: from vdsm.storage.exception import InvalidParameterException
Line 34: 
> The import should be here
Done
Line 35: import sd
Line 36: import misc
Line 37: import task
Line 38: from vdsm.storage.threadPool import ThreadPool


https://gerrit.ovirt.org/#/c/56571/1/vdsm/storage/taskManager.py
File vdsm/storage/taskManager.py:

Line 23: import threading
Line 24: 
Line 25: from vdsm.config import config
Line 26: from vdsm.storage import exception as se
Line 27: 
> The import should be here
Done
Line 28: from task import Task, Job, TaskCleanType
Line 29: from vdsm.storage.threadPool import ThreadPool
Line 30: 
Line 31: 


-- 
To view, visit https://gerrit.ovirt.org/56571
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie5f4edd8eea38fdb6bdf3be5c7732fee0b56d58e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: move threadPool module to vdsm storage lib

2016-04-25 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: storage: move threadPool module to vdsm storage lib
..

storage: move threadPool module to vdsm storage lib

This patch moves the module storage/threadPool.py to
vdsm/storage/threadPool.py.

Change-Id: Ie5f4edd8eea38fdb6bdf3be5c7732fee0b56d58e
Signed-off-by: Amit Aviram 
---
M lib/vdsm/storage/Makefile.am
R lib/vdsm/storage/threadPool.py
M vdsm.spec.in
M vdsm/storage/Makefile.am
M vdsm/storage/storage_mailbox.py
M vdsm/storage/taskManager.py
6 files changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/56571/1

diff --git a/lib/vdsm/storage/Makefile.am b/lib/vdsm/storage/Makefile.am
index b39baf2..720eafd 100644
--- a/lib/vdsm/storage/Makefile.am
+++ b/lib/vdsm/storage/Makefile.am
@@ -31,4 +31,5 @@
rwlock.py \
securable.py \
sync.py \
+   threadPool.py \
$(NULL)
diff --git a/vdsm/storage/threadPool.py b/lib/vdsm/storage/threadPool.py
similarity index 99%
rename from vdsm/storage/threadPool.py
rename to lib/vdsm/storage/threadPool.py
index 594a6b9..caf1be9 100644
--- a/vdsm/storage/threadPool.py
+++ b/lib/vdsm/storage/threadPool.py
@@ -6,6 +6,7 @@
 # http://wiki.python.org/moin/PythonSoftwareFoundationLicenseV2Easy
 #
 
+from __future__ import absolute_import
 from __future__ import print_function
 import threading
 from time import sleep
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 4095195..037ccc5 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -962,7 +962,6 @@
 %{_datadir}/%{vdsm_name}/storage/taskManager.py*
 %{_datadir}/%{vdsm_name}/storage/task.py*
 %{_datadir}/%{vdsm_name}/storage/threadLocal.py*
-%{_datadir}/%{vdsm_name}/storage/threadPool.py*
 %{_datadir}/%{vdsm_name}/storage/volume.py*
 %{_datadir}/%{vdsm_name}/storage/imageRepository/__init__.py*
 %{_datadir}/%{vdsm_name}/storage/imageRepository/formatConverter.py*
@@ -1182,6 +1181,7 @@
 %{python_sitelib}/%{vdsm_name}/storage/rwlock.py*
 %{python_sitelib}/%{vdsm_name}/storage/securable.py*
 %{python_sitelib}/%{vdsm_name}/storage/sync.py*
+%{python_sitelib}/%{vdsm_name}/storage/threadPool.py*
 %{python_sitelib}/%{vdsm_name}/tc/__init__.py*
 %{python_sitelib}/%{vdsm_name}/tc/_parser.py*
 %{python_sitelib}/%{vdsm_name}/tc/_wrapper.py*
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index cad6053..ff598ac 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -61,7 +61,6 @@
taskManager.py \
task.py \
threadLocal.py \
-   threadPool.py \
volume.py
 
 dist_vdsmexec_SCRIPTS = \
diff --git a/vdsm/storage/storage_mailbox.py b/vdsm/storage/storage_mailbox.py
index baeda1e..d1739d1 100644
--- a/vdsm/storage/storage_mailbox.py
+++ b/vdsm/storage/storage_mailbox.py
@@ -35,7 +35,7 @@
 import sd
 import misc
 import task
-from threadPool import ThreadPool
+from vdsm.storage.threadPool import ThreadPool
 from vdsm import concurrent
 from vdsm import constants
 
diff --git a/vdsm/storage/taskManager.py b/vdsm/storage/taskManager.py
index d2ec32e..fd2de0f 100644
--- a/vdsm/storage/taskManager.py
+++ b/vdsm/storage/taskManager.py
@@ -26,7 +26,7 @@
 from vdsm.storage import exception as se
 
 from task import Task, Job, TaskCleanType
-from threadPool import ThreadPool
+from vdsm.storage.threadPool import ThreadPool
 
 
 class TaskManager:


-- 
To view, visit https://gerrit.ovirt.org/56571
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5f4edd8eea38fdb6bdf3be5c7732fee0b56d58e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add untrusted image verification.

2016-04-14 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add untrusted image verification.
..


Patch Set 9:

This is tested with the following engine branch:
https://gerrit.ovirt.org/#/c/55817/

Which calls this API.
QCOW with/without backing file, wrong formats and RAW images was tested 
successfully.

-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add untrusted image verification.

2016-04-14 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add untrusted image verification.
..


Patch Set 9: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add untrusted image verification.

2016-04-14 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add untrusted image verification.
..


Patch Set 7:

(1 comment)

https://gerrit.ovirt.org/#/c/55746/7/lib/api/vdsmapi-schema.json
File lib/api/vdsmapi-schema.json:

Line 8300: # comparing the untrusted volume's format with the format that is 
specified
Line 8301: # in the volume's metadata, and if the format is QCOW, verifying that
Line 8302: # it has no backingfile.
Line 8303: # If one of the verifications above fails, an
Line 8304: # ImageVerificationError will be returned.
> We are dropping this format, so it does not make sense to fix the parser to
Done, reversing to one paragraph.
Line 8305: #
Line 8306: # @storagepoolID:The Storage Pool associated with the Volume
Line 8307: #
Line 8308: # @storagedomainID:  The Storage Domain associated with the Volume


-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add untrusted image verification.

2016-04-14 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add untrusted image verification.
..


Patch Set 7:

(1 comment)

https://gerrit.ovirt.org/#/c/55746/7/lib/api/vdsmapi-schema.json
File lib/api/vdsmapi-schema.json:

Line 8300: # comparing the untrusted volume's format with the format that is 
specified
Line 8301: # in the volume's metadata, and if the format is QCOW, verifying that
Line 8302: # it has no backingfile.
Line 8303: # If one of the verifications above fails, an
Line 8304: # ImageVerificationError will be returned.
> Which test fail? sounds like broken test to me.
It is "process-schema.py" that fail:

PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=./../lib \
/usr/bin/python ./process-schema.py \
  ./vdsmapi-schema.json ./vdsm-api.html
Traceback (most recent call last):
  File "./process-schema.py", line 376, in 
main()
  File "./process-schema.py", line 370, in main
symbols = read_schema_doc(f, api)
  File "./process-schema.py", line 175, in read_schema_doc
read_symbol_comment(f, api)
  File "./process-schema.py", line 156, in read_symbol_comment
symbol[mode][last_arg] += ' ' + line
KeyError: None
Line 8305: #
Line 8306: # @storagepoolID:The Storage Pool associated with the Volume
Line 8307: #
Line 8308: # @storagedomainID:  The Storage Domain associated with the Volume


-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add untrusted image verification.

2016-04-12 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add untrusted image verification.
..


Patch Set 7:

(1 comment)

https://gerrit.ovirt.org/#/c/55746/7/lib/api/vdsmapi-schema.json
File lib/api/vdsmapi-schema.json:

Line 8300: # comparing the untrusted volume's format with the format that is 
specified
Line 8301: # in the volume's metadata, and if the format is QCOW, verifying that
Line 8302: # it has no backingfile.
Line 8303: # If one of the verifications above fails, an
Line 8304: # ImageVerificationError will be returned.
> This can be the last sentence of the paragraph about the verification, or a
Tests fail with a blank line like:
"""
# Text 
#
# Text 
"""

Is there another way doing it? otherwise we will have to go without the blank 
line.
Line 8305: #
Line 8306: # @storagepoolID:The Storage Pool associated with the Volume
Line 8307: #
Line 8308: # @storagedomainID:  The Storage Domain associated with the Volume


-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add untrusted image verification.

2016-04-12 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add untrusted image verification.
..


Patch Set 7:

(2 comments)

https://gerrit.ovirt.org/#/c/55746/7/lib/api/vdsmapi-schema.json
File lib/api/vdsmapi-schema.json:

Line 8295: #
Line 8296: # An untrusted volume is a volume that was in control of a user or 
untrusted
Line 8297: # external program, and may contain malicious data. One example is a 
volume
Line 8298: # uploaded by a user using ovirt-imageio.
Line 8299: # verify_untrusted verifies an untrusted volume. The verification 
includes
> The first sentence is now useless.
Done
Line 8300: # comparing the untrusted volume's format with the format that is 
specified
Line 8301: # in the volume's metadata, and if the format is QCOW, verifying that
Line 8302: # it has no backingfile.
Line 8303: # If one of the verifications above fails, an


Line 8300: # comparing the untrusted volume's format with the format that is 
specified
Line 8301: # in the volume's metadata, and if the format is QCOW, verifying that
Line 8302: # it has no backingfile.
Line 8303: # If one of the verifications above fails, an
Line 8304: # ImageVerificationError will be returned.
> This can be the last sentence of the paragraph about the verification, or a
Done
Line 8305: #
Line 8306: # @storagepoolID:The Storage Pool associated with the Volume
Line 8307: #
Line 8308: # @storagedomainID:  The Storage Domain associated with the Volume


-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add untrusted image verification.

2016-04-12 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add untrusted image verification.
..


Patch Set 6:

(5 comments)

https://gerrit.ovirt.org/#/c/55746/6/lib/api/vdsmapi-schema.json
File lib/api/vdsmapi-schema.json:

Line 8293: ##
Line 8294: # @Volume.verify_untrusted:
Line 8295: #
Line 8296: # Verify an untrusted image's volume. The verification includes 
comparing
Line 8297: # the uploaded image's format with the format that is specified in 
the
> Remove "uploaded".
Done
Line 8298: # image's volume's metadata, and if the format is QCOW, verifying 
that
Line 8299: # it has no backingfile. if one of the verifications above fails, an
Line 8300: # error will be raised.
Line 8301: # An untrusted volume can be one which is uploaded by oVirt's user, 
or


Line 8294: # @Volume.verify_untrusted:
Line 8295: #
Line 8296: # Verify an untrusted image's volume. The verification includes 
comparing
Line 8297: # the uploaded image's format with the format that is specified in 
the
Line 8298: # image's volume's metadata, and if the format is QCOW, verifying 
that
> image's volume's -> volume's
Done
Line 8299: # it has no backingfile. if one of the verifications above fails, an
Line 8300: # error will be raised.
Line 8301: # An untrusted volume can be one which is uploaded by oVirt's user, 
or
Line 8302: # taken from an external source.


Line 8296: # Verify an untrusted image's volume. The verification includes 
comparing
Line 8297: # the uploaded image's format with the format that is specified in 
the
Line 8298: # image's volume's metadata, and if the format is QCOW, verifying 
that
Line 8299: # it has no backingfile. if one of the verifications above fails, an
Line 8300: # error will be raised.
> we don't raise errors, re return an error response - and specify the error 
Done
Line 8301: # An untrusted volume can be one which is uploaded by oVirt's user, 
or
Line 8302: # taken from an external source.
Line 8303: #
Line 8304: # @storagepoolID:The Storage Pool associated with the Volume


Line 8297: # the uploaded image's format with the format that is specified in 
the
Line 8298: # image's volume's metadata, and if the format is QCOW, verifying 
that
Line 8299: # it has no backingfile. if one of the verifications above fails, an
Line 8300: # error will be raised.
Line 8301: # An untrusted volume can be one which is uploaded by oVirt's user, 
or
> can be -> is
Done
Line 8302: # taken from an external source.
Line 8303: #
Line 8304: # @storagepoolID:The Storage Pool associated with the Volume
Line 8305: #


Line 8298: # image's volume's metadata, and if the format is QCOW, verifying 
that
Line 8299: # it has no backingfile. if one of the verifications above fails, an
Line 8300: # error will be raised.
Line 8301: # An untrusted volume can be one which is uploaded by oVirt's user, 
or
Line 8302: # taken from an external source.
> This should be the first sentence. I would rephrase it like this:
Done
Line 8303: #
Line 8304: # @storagepoolID:The Storage Pool associated with the Volume
Line 8305: #
Line 8306: # @storagedomainID:  The Storage Domain associated with the Volume


-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add untrusted image verification.

2016-04-11 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add untrusted image verification.
..


Patch Set 4:

(2 comments)

https://gerrit.ovirt.org/#/c/55746/4/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

Line 1505: @public
Line 1506: def verify_untrusted_volume(self, spUUID, sdUUID, imgUUID, 
volUUID):
Line 1507: dom = sdCache.produce(sdUUID=sdUUID)
Line 1508: vol = dom.produceVolume(imgUUID, volUUID)
Line 1509: actual_info = qemuimg.info(vol.getVolumePath())
> I'm fine with these names.
Done
Line 1510: 
Line 1511: expected_format = volume.FMT2STR[vol.getFormat()]
Line 1512: actual_format = actual_info["format"]
Line 1513: if expected_format != actual_format:


Line 1514: raise se.ImageVerificationError(
Line 1515: "Uploaded image format is %s while the format 
specified "
Line 1516: "by the user is %s" % (actual_format, 
expected_format)
Line 1517: )
Line 1518: if "backingfile" in actual_info:
> We don't support it now, and it is not in our todo list.
If we'll support it in the future, an image verification will be different- so 
currently it is ok to verify that.
Line 1519: raise se.ImageVerificationError(
Line 1520: "'%s' is defined as a backingfile, while backingfile 
is not "
Line 1521: "allowed for an uploaded image."
Line 1522: % actual_info["backingfile"]


-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add untrusted image verification.

2016-04-07 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add untrusted image verification.
..


Patch Set 5: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add untrusted image verification.

2016-04-07 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add untrusted image verification.
..


Patch Set 4:

(1 comment)

https://gerrit.ovirt.org/#/c/55746/2/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

Line 1562: """
Line 1563: Move/Copy image between storage domains within same storage 
pool
Line 1564: """
Line 1565: argsStr = ("spUUID=%s, srcDomUUID=%s, dstDomUUID=%s, 
imgUUID=%s, "
Line 1566:"vmUUID=%s, op=%s, force=%s, postZero=%s 
force=%s" %
> The placement of the terminating parenthesis - use:
Done
Line 1567:(spUUID, srcDomUUID, dstDomUUID, imgUUID, vmUUID, 
op,
Line 1568: force, postZero, force))
Line 1569: vars.task.setDefaultException(se.MoveImageError("%s" % 
argsStr))
Line 1570: if srcDomUUID == dstDomUUID:


-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add uploaded image verification

2016-04-07 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add uploaded image verification
..


Patch Set 2:

(9 comments)

https://gerrit.ovirt.org/#/c/55746/2/lib/api/vdsmapi-schema.json
File lib/api/vdsmapi-schema.json:

Line 8504:   'postZero': 'bool', 'force': 'bool'},
Line 8505:  'returns': 'UUID'}
Line 8506: 
Line 8507: ##
Line 8508: # @Volume.verify_upload:
> How about verify_untrusted_volume?
As this is a Volume's method, we can call it verify_untrusted (Finally it will 
be @Volume.verify_untrusted)
Line 8509: #
Line 8510: # Verify an uploaded image's volume. The verification includes 
comparing
Line 8511: # the uploaded image's format with the format that is specified in 
the
Line 8512: # image's volume's metadata, and if the format is QCOW, verifying 
that


Line 8506: 
Line 8507: ##
Line 8508: # @Volume.verify_upload:
Line 8509: #
Line 8510: # Verify an uploaded image's volume. The verification includes 
comparing
> Upload is only one use case.
Done, will generalize.
Line 8511: # the uploaded image's format with the format that is specified in 
the
Line 8512: # image's volume's metadata, and if the format is QCOW, verifying 
that
Line 8513: # it has no backingfile. if one of the verifications above fails, an
Line 8514: # error will be raised.


Line 8512: # image's volume's metadata, and if the format is QCOW, verifying 
that
Line 8513: # it has no backingfile. if one of the verifications above fails, an
Line 8514: # error will be raised.
Line 8515: #
Line 8516: # @volumeID: The UUID of the Volume
> The volume id typically appear last (PDIV - pool, domain, image, volume). T
Done
Line 8517: #
Line 8518: # @storagepoolID:The Storage Pool associated with the Volume
Line 8519: #
Line 8520: # @storagedomainID:  The Storage Domain associated with the Volume


https://gerrit.ovirt.org/#/c/55746/2/vdsm/API.py
File vdsm/API.py:

Line 826: return self._irs.deleteVolume(self._sdUUID, self._spUUID,
Line 827:   self._imgUUID, [self._UUID], 
postZero,
Line 828:   force)
Line 829: 
Line 830: def verify_upload(self):
> Lets keep the new style (verify_upload) all the way down, or the old style,
Done
Line 831: return self._irs.verifyUpload(self._sdUUID, self._spUUID,
Line 832:   self._imgUUID, self._UUID)
Line 833: 
Line 834: def extendSize(self, newSize):


Line 828:   force)
Line 829: 
Line 830: def verify_upload(self):
Line 831: return self._irs.verifyUpload(self._sdUUID, self._spUUID,
Line 832:   self._imgUUID, self._UUID)
> Keep the argument in the same order both in the schema and here (PDIV).
Done
Line 833: 
Line 834: def extendSize(self, newSize):
Line 835: return self._irs.extendVolumeSize(
Line 836: self._spUUID, self._sdUUID, self._imgUUID, self._UUID, 
newSize)


https://gerrit.ovirt.org/#/c/55746/2/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

Line 1554: @public
Line 1555: def verifyUpload(self, sdUUID, spUUID, imgUUID, volUUID):
Line 1556: dom = sdCache.produce(sdUUID=sdUUID)
Line 1557: vol = dom.produceVolume(imgUUID, volUUID)
Line 1558: vol_qemu_info = qemuimg.info(vol.getVolumePath())
> Let call this actual_info
Done
Line 1559: 
Line 1560: vol_md_fmt = volume.FMT2STR[vol.getFormat()]
Line 1561: uploaded_fmt = vol_qemu_info["format"]
Line 1562: if vol_md_fmt != uploaded_fmt:


Line 1556: dom = sdCache.produce(sdUUID=sdUUID)
Line 1557: vol = dom.produceVolume(imgUUID, volUUID)
Line 1558: vol_qemu_info = qemuimg.info(vol.getVolumePath())
Line 1559: 
Line 1560: vol_md_fmt = volume.FMT2STR[vol.getFormat()]
> Lets call this expected_format
Done
Line 1561: uploaded_fmt = vol_qemu_info["format"]
Line 1562: if vol_md_fmt != uploaded_fmt:
Line 1563: raise se.ImageVerificationError(
Line 1564: "Uploaded image format is %s while the format 
specified "


Line 1557: vol = dom.produceVolume(imgUUID, volUUID)
Line 1558: vol_qemu_info = qemuimg.info(vol.getVolumePath())
Line 1559: 
Line 1560: vol_md_fmt = volume.FMT2STR[vol.getFormat()]
Line 1561: uploaded_fmt = vol_qemu_info["format"]
> And actual_format
Done
Line 1562: if vol_md_fmt != uploaded_fmt:
Line 1563: raise se.ImageVerificationError(
Line 1564: "Uploaded image format is %s while the format 
specified "
Line 1565: "by the user is %s" % (uploaded_fmt, vol_md_fmt)


Line 1562: if vol_md_fmt != uploaded_fmt:
Line 1563: raise se.ImageVerificationError(
Line 1564: "Uploaded image format is %s while the format 
specified "
Line 1565: "by the user is %s" % 

Change in vdsm[master]: hsm: add uploaded image verification

2016-04-06 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add uploaded image verification
..


Patch Set 2: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add uploaded image verification

2016-04-06 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add uploaded image verification
..


Patch Set 2:

Verified with qcow2 image with/without backingfile, and raw images.

-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: image: add a flag for preparing with illegal volumes.

2016-04-06 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: image: add a flag for preparing with illegal volumes.
..


Patch Set 3: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/55199
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie18ab167635e6e099c3a12e03ea6620578c3103f
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add uploaded image verification

2016-04-06 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hsm: add uploaded image verification
..


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/55746/1/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

PS1, Line 1561: format
Needs fix, works only for raw storage. (for qcow2, qemu-img returns "qcow2" 
while "cow" is being saved in the md)


-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: add uploaded image verification

2016-04-06 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: hsm: add uploaded image verification
..

hsm: add uploaded image verification

In the new image upload flow, a VDSM's image is being generated and data
is being sent into the created volume inside. As this flow is risky in
cases where the data is a QCOW file with an invalid backing file, or
wrong disk format is sent, VDSM should verify the image in the upload
process.

This patch adds a verb for upload verification, which verifies that
there is no backing file for a QCOW image, and that the format of the
uploaded image fits to what the user has specified.

Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Signed-off-by: Amit Aviram 
---
M lib/api/vdsmapi-schema.json
M lib/vdsm/storage/exception.py
M vdsm/API.py
M vdsm/storage/hsm.py
4 files changed, 50 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/46/55746/1

diff --git a/lib/api/vdsmapi-schema.json b/lib/api/vdsmapi-schema.json
index 1016993..d0c246d 100644
--- a/lib/api/vdsmapi-schema.json
+++ b/lib/api/vdsmapi-schema.json
@@ -8505,6 +8505,29 @@
  'returns': 'UUID'}
 
 ##
+# @Volume.verify_upload:
+#
+# Verify an uploaded image's volume. The verification includes comparing
+# the uploaded image's format with the format that is specified in the
+# image's volume's metadata, and if the format is QCOW, verifying that
+# it has no backingfile. if one of the verifications above fails, an
+# error will be raised.
+#
+# @volumeID: The UUID of the Volume
+#
+# @storagepoolID:The Storage Pool associated with the Volume
+#
+# @storagedomainID:  The Storage Domain associated with the Volume
+#
+# @imageID:  The Image associated with the Volume
+#
+# Since: 4.18.0
+##
+{'command': {'class': 'Volume', 'name': 'verify_upload'},
+ 'data': {'volumeID': 'UUID', 'storagepoolID': 'UUID',
+  'storagedomainID': 'UUID', 'imageID': 'UUID'}}
+
+##
 # @Volume.extendSize:
 #
 # Extends the virtual size of a volume.
diff --git a/lib/vdsm/storage/exception.py b/lib/vdsm/storage/exception.py
index 5194a87..677d736 100644
--- a/lib/vdsm/storage/exception.py
+++ b/lib/vdsm/storage/exception.py
@@ -1224,6 +1224,14 @@
 message = "Image daemon is unsupported"
 
 
+class ImageVerificationError(StorageException):
+code = 484
+message = "Image verification failed"
+
+def __init__(self, reason):
+self.value = "reason=%s" % reason
+
+
 #
 #  LVM related Exceptions
 #
diff --git a/vdsm/API.py b/vdsm/API.py
index 60bf9ed..0ad1a06 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -827,6 +827,10 @@
   self._imgUUID, [self._UUID], postZero,
   force)
 
+def verify_upload(self):
+return self._irs.verifyUpload(self._sdUUID, self._spUUID,
+  self._imgUUID, self._UUID)
+
 def extendSize(self, newSize):
 return self._irs.extendVolumeSize(
 self._spUUID, self._sdUUID, self._imgUUID, self._UUID, newSize)
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 117023d..940d80e 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -1551,6 +1551,21 @@
 self._spmSchedule(spUUID, "purgeImage_%s" % imgUUID,
   pool.purgeImage, sdUUID, imgUUID, volsByImg)
 
+@public
+def verifyUpload(self, sdUUID, spUUID, imgUUID, volUUID):
+dom = sdCache.produce(sdUUID=sdUUID)
+vol = dom.produceVolume(imgUUID, volUUID)
+vol_metadata = vol.getInfo()
+vol_qemu_info = qemuimg.info(vol.getVolumePath())
+
+if vol_metadata["format"].lower() != vol_qemu_info["format"].lower():
+raise se.ImageVerificationError(
+"Image format is different than the "
+"format specified by the user")
+if "backingfile" in vol_metadata and vol_metadata["backingfile"]:
+raise se.ImageVerificationError(
+"Backingfile is not allowed for an uploaded image")
+
 def validateImageMove(self, srcDom, dstDom, imgUUID):
 """
 Determines if the image move is legal.


-- 
To view, visit https://gerrit.ovirt.org/55746
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf85061536eb4ddff021539c742a674f183a8984
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: volume: Add internal info from qemuimg in getVolumeInfo.

2016-04-05 Thread aaviram
Amit Aviram has abandoned this change.

Change subject: volume: Add internal info from qemuimg in getVolumeInfo.
..


Abandoned

Going with different approach.

-- 
To view, visit https://gerrit.ovirt.org/55221
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ib0e88568ac9088e05fe5d51abf37ed55207d93b1
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: volume: Add internal info from qemuimg in getVolumeInfo.

2016-04-04 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: volume: Add internal info from qemuimg in getVolumeInfo.
..


Patch Set 4:

(1 comment)

https://gerrit.ovirt.org/#/c/55221/4/vdsm/storage/volume.py
File vdsm/storage/volume.py:

PS4, Line 1250: getInternal
This breaks sdm_indirection_tests.py, which compares the Volume function calls 
to its manifest calls.

The problem is that the tests are assuming that manifest calls do not use 
kwargs, but only regular args- thus comparing a list of [(fn, args, kwargs)] 
and fails.

Nir/Adam- should we change the tests, make it pass, add new test- or just make 
"getInfo" to have 1 non-keyword argument? note that there are around 25 
permutation in this test..


-- 
To view, visit https://gerrit.ovirt.org/55221
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib0e88568ac9088e05fe5d51abf37ed55207d93b1
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: image: add a flag for preparing with illegal volumes.

2016-04-04 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: image: add a flag for preparing with illegal volumes.
..


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/55199/2/lib/api/vdsmapi-schema.json
File lib/api/vdsmapi-schema.json:

Line 5311: # @allowIllegal: #optional False by default. If set to True, 
prepare will
Line 5312: #succeed even if any of the image volumes are 
illegal,
Line 5313: #for making the volume writable by untrusted 
source.
Line 5314: #*Warning- Never use this when exposing this 
volume's
Line 5315: #  image to a vm!
> *Warning? 
Done
Line 5316: #
Line 5317: # Returns:
Line 5318: # Information about prepared image
Line 5319: # (new in version 4.18)


-- 
To view, visit https://gerrit.ovirt.org/55199
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie18ab167635e6e099c3a12e03ea6620578c3103f
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: image: add a flag for preparing with illegal volumes.

2016-03-29 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: image: add a flag for preparing with illegal volumes.
..


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/55199/2/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

Line 3192: if legality == volume.ILLEGAL_VOL:
Line 3193: if allowIllegal:
Line 3194: self.log.info("Preparing illegal volume %s", 
leafUUID)
Line 3195: else:
Line 3196: raise se.prepareIllegalVolumeError(volUUID)
> This works, but unfortunately, it does not protect old vdsm versions. The l
Not necessarily that this is a problem.
What we want to avoid, is that a disk will never be usable if  it is in upload 
process.

When setting the volume to illegal, that means that the disk will be marked 
illegal in the storage domain.
When detaching the storage domain, and importing it again, the engine uses this 
flag, and marks it illegal in the engine side as well- that means that if we 
use this disk in older DCs, the ENGINE will not allow 
attaching/exporting/moving/copying this disk.

So marking this volume as illegal will actually prevent using it in every 
plausible scenario (unless I'm missing something here)
Line 3197: 
Line 3198: imgPath = dom.activateVolumes(imgUUID, imgVolumes)
Line 3199: if spUUID and spUUID != sd.BLANK_UUID:
Line 3200: runImgPath = dom.linkBCImage(imgPath, imgUUID)


-- 
To view, visit https://gerrit.ovirt.org/55199
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie18ab167635e6e099c3a12e03ea6620578c3103f
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: Organize imports in storage.sdc

2016-03-27 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: storage: Organize imports in storage.sdc
..


Patch Set 2: Code-Review+1

-- 
To view, visit https://gerrit.ovirt.org/55260
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id949a69853e2c97a4f1177cd3e717b9c956d03c8
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: Fix copyright years in storage.imagetickets

2016-03-27 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: storage: Fix copyright years in storage.imagetickets
..


Patch Set 2: Code-Review+1

-- 
To view, visit https://gerrit.ovirt.org/55257
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0abb7d2f8d2aa3f952cd37c3813afc696a4cef58
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage: Fix copyright years in storage.imagetickets

2016-03-27 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: storage: Fix copyright years in storage.imagetickets
..


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/55257/1/vdsm/storage/imagetickets.py
File vdsm/storage/imagetickets.py:

Line 1: #
Line 2: # Copyright 2016 Red Hat, Inc.
> Not sure about the copyright change.
Thanks for the headsup, however the copyright part is copied from other 
modules, that's why the "2009" is there. It should be deleted since this file 
is completely new, and not borrowed from other project
Line 3: #
Line 4: # This program is free software; you can redistribute it and/or modify
Line 5: # it under the terms of the GNU General Public License as published by
Line 6: # the Free Software Foundation; either version 2 of the License, or


-- 
To view, visit https://gerrit.ovirt.org/55257
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0abb7d2f8d2aa3f952cd37c3813afc696a4cef58
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: volume: Add internal info from qemuimg in getVolumeInfo.

2016-03-24 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: volume: Add internal info from qemuimg in getVolumeInfo.
..

volume: Add internal info from qemuimg in getVolumeInfo.

Currently Volume's getInfo() fetches volume's info mainly from the
volume's metadata in the storage.

In the new image upload flow, a VDSM's image is being generated and data
is being sent into the created volume inside. as this flow is risky in
cases where the data is a QCOW file with an invalid backing file, or
wrong disk format is sent, the engine needs to know if the generated disk
fits the data being sent. For making these validations, the actual
qemu-img info needs to be added to Volume's getInfo().

This patch adds a flag in Volume.getInfo's API for getting the internal
qemuimg info of the volume.

Change-Id: Ib0e88568ac9088e05fe5d51abf37ed55207d93b1
Signed-off-by: Amit Aviram 
---
M lib/api/vdsmapi-schema.json
M lib/vdsm/rpc/bindingxmlrpc.py
M vdsm/API.py
M vdsm/storage/hsm.py
M vdsm/storage/volume.py
5 files changed, 31 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/21/55221/1

diff --git a/lib/api/vdsmapi-schema.json b/lib/api/vdsmapi-schema.json
index d83aa4a..69cc784 100644
--- a/lib/api/vdsmapi-schema.json
+++ b/lib/api/vdsmapi-schema.json
@@ -8629,6 +8629,12 @@
 #
 # @children:  A list of descendent Volumes that depend on this Volume
 #
+# @backingfile:   Volume's qemu backing file. retrieved only by explicit
+# getInternal request in Volume.getInfo
+#
+# @internal_format: actual underlying volume's QEMU format. retrieved only
+#   by explicit getInternal request in Volume.getInfo
+#
 # Since: 4.10.0
 ##
 {'type': 'VolumeInfo',
@@ -8638,7 +8644,8 @@
   'description': 'str', 'pool': 'UUID', 'domain': 'UUID',
   'image': 'UUID', 'ctime': 'int', 'mtime': 'uint',
   'legality': 'VolumeLegality', 'apparentsize': 'uint',
-  'truesize': 'uint', 'status': 'VolumeStatus', 'children': ['UUID']}}
+  'truesize': 'uint', 'status': 'VolumeStatus', 'children': ['UUID'],
+  'backingfile': 'str', 'internal_format': 'str'}}
 
 ##
 # @Volume.getInfo:
@@ -8653,6 +8660,9 @@
 #
 # @imageID:  The Image associated with the Volume
 #
+# @getInternal:  #optional get the underlying volume info fetched
+#from qemuimg
+#
 # Returns:
 # Volume information
 #
@@ -8660,7 +8670,8 @@
 ##
 {'command': {'class': 'Volume', 'name': 'getInfo'},
  'data': {'volumeID': 'UUID', 'storagepoolID': 'UUID',
-  'storagedomainID': 'UUID', 'imageID': 'UUID'},
+  'storagedomainID': 'UUID', 'imageID': 'UUID'
+  '*getInternal': 'bool'},
  'returns': 'VolumeInfo'}
 
 ##
diff --git a/lib/vdsm/rpc/bindingxmlrpc.py b/lib/vdsm/rpc/bindingxmlrpc.py
index 8850634..0506e60 100644
--- a/lib/vdsm/rpc/bindingxmlrpc.py
+++ b/lib/vdsm/rpc/bindingxmlrpc.py
@@ -904,9 +904,10 @@
 volume = API.Volume(volUUID, spUUID, sdUUID, imgUUID)
 return volume.extendSize(newSize)
 
-def volumeGetInfo(self, sdUUID, spUUID, imgUUID, volUUID):
+def volumeGetInfo(self, sdUUID, spUUID, imgUUID, volUUID,
+  getInternal=False):
 volume = API.Volume(volUUID, spUUID, sdUUID, imgUUID)
-return volume.getInfo()
+return volume.getInfo(getInternal=getInternal)
 
 def volumeGetSize(self, sdUUID, spUUID, imgUUID, volUUID):
 volume = API.Volume(volUUID, spUUID, sdUUID, imgUUID)
diff --git a/vdsm/API.py b/vdsm/API.py
index 077d875..c404bf7 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -835,9 +835,10 @@
 return self._irs.updateVolumeSize(
 self._spUUID, self._sdUUID, self._imgUUID, self._UUID, newSize)
 
-def getInfo(self):
+def getInfo(self, getInternal=False):
 return self._irs.getVolumeInfo(self._sdUUID, self._spUUID,
-   self._imgUUID, self._UUID)
+   self._imgUUID, self._UUID,
+   getInternal=getInternal)
 
 def getSize(self):
 return self._irs.getVolumeSize(self._sdUUID, self._spUUID,
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 86c7281..32fecb8 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3147,7 +3147,8 @@
 vol.setSize(sectors)
 
 @public
-def getVolumeInfo(self, sdUUID, spUUID, imgUUID, volUUID, options=None):
+def getVolumeInfo(self, sdUUID, spUUID, imgUUID, volUUID, options=None,
+  getInternal=False):
 """
 Gets a volume's info.
 
@@ -3167,7 +3168,7 @@
 vars.task.getSharedLock(STORAGE, sdUUID)
 info = sdCache.produce(
 sdUUID=sdUUID).produceVolume(imgUUID=imgUUID,
- volUUID=volUUID).getInfo()
+ 

Change in vdsm[master]: : ...

2016-03-24 Thread aaviram
Amit Aviram has abandoned this change.

Change subject: : 
short summary under 50 chars
..


Abandoned

-- 
To view, visit https://gerrit.ovirt.org/55220
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ie02bb4388dcd620d0745200669e53132546162a0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: : ...

2016-03-24 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: : 
short summary under 50 chars
..

: short summary under 
50 chars

Longer description using lines' length under 72 chars.

With multiple paragraphs if necessary.

Change-Id: Ie02bb4388dcd620d0745200669e53132546162a0
Bug-Url: https://bugzilla.redhat.com/??
Signed-off-by: Amit Aviram 
---
M vdsm/vdsm
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/55220/1

diff --git a/vdsm/vdsm b/vdsm/vdsm
index 2090e01..5fa7d90 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -11,6 +11,13 @@
 from __future__ import print_function
 import sys
 
+# AMIT DEBUG
+sys.path.append('/usr/lib64/python2.7/pycharm-debug.egg')
+import pydevd
+
+pydevd.settrace('10.35.0.212', port=22200, stdoutToServer=True,
+stderrToServer=True)
+
 # When using Python 2, we must monkey patch threading module before importing
 # any other module.
 if sys.version_info[0] == 2:


-- 
To view, visit https://gerrit.ovirt.org/55220
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie02bb4388dcd620d0745200669e53132546162a0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: image: add a flag for preparing with illegal volumes

2016-03-24 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: image: add a flag for preparing with illegal volumes
..


Patch Set 1:

(6 comments)

https://gerrit.ovirt.org/#/c/55199/1//COMMIT_MSG
Commit Message:

Line 8: 
Line 9: Currently preparing an image is impossible if one of its volumes is
Line 10: illegal.
Line 11: 
Line 12: In the new image upload flow, an image which is uploaded must have the
> ... an image prepared for upload or random I/O using ovirt-imageio-daemon .
Done
Line 13: image prepared and have the image in ILLEGAL state. that means that if
Line 14: an upload is stopped by any reason- resuming it means preparing the
Line 15: image while it is in ILLEGAL state.
Line 16: 


PS1, Line 13: that
> That
Thanks :) Done


Line 14: an upload is stopped by any reason- resuming it means preparing the
Line 15: image while it is in ILLEGAL state.
Line 16: 
Line 17: This patch adds a flag in the API for enabling the prepare process even
Line 18: if its volumes are ILLEGAL, for the upload image to use.
> Please show here the image upload flow, explaining how we manage the illega
Done
Line 19: 
Line 20: Change-Id: Ie18ab167635e6e099c3a12e03ea6620578c3103f


https://gerrit.ovirt.org/#/c/55199/1/lib/api/vdsmapi-schema.json
File lib/api/vdsmapi-schema.json:

Line 5308: #
Line 5309: # @volumeID: The UUID of the Volume
Line 5310: #
Line 5311: # @allowIllegal: #optional If set to True, prepare will succeed 
even if
Line 5312: #any of the image volumes are illegal.
> Make it clear that this is false by default.
Done
Line 5313: #
Line 5314: # Returns:
Line 5315: # Information about prepared image
Line 5316: # (new in version 4.18)


https://gerrit.ovirt.org/#/c/55199/1/vdsm/API.py
File vdsm/API.py:

Line 925: def download(self, methodArgs, volumeID=None):
Line 926: return self._irs.downloadImage(
Line 927: methodArgs, self._spUUID, self._sdUUID, self._UUID, 
volumeID)
Line 928: 
Line 929: def prepare(self, volumeID, allowIllegal):
> This is optional, so keep the allowIllegal=False
Done
Line 930: return self._irs.prepareImage(self._sdUUID, self._spUUID,
Line 931:   self._UUID, volumeID,
Line 932:   allowIllegal=allowIllegal)
Line 933: 


https://gerrit.ovirt.org/#/c/55199/1/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

Line 3190: if not allowIllegal:
Line 3191: for volUUID in imgVolumes:
Line 3192: legality = dom.produceVolume(imgUUID, 
volUUID).getLegality()
Line 3193: if legality == volume.ILLEGAL_VOL:
Line 3194: raise se.prepareIllegalVolumeError(volUUID)
> This skips the verification silently. I would like to keep the verification
good idea.. Done
Line 3195: 
Line 3196: imgPath = dom.activateVolumes(imgUUID, imgVolumes)
Line 3197: if spUUID and spUUID != sd.BLANK_UUID:
Line 3198: runImgPath = dom.linkBCImage(imgPath, imgUUID)


-- 
To view, visit https://gerrit.ovirt.org/55199
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie18ab167635e6e099c3a12e03ea6620578c3103f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Idan Shaby 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: image: add a flag for preparing with illegal volumes

2016-03-24 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: image: add a flag for preparing with illegal volumes
..

image: add a flag for preparing with illegal volumes

Currently preparing an image is impossible if one of its volumes is
illegal.

In the new image upload flow, an image which is uploaded must have the
image prepared and have the image in ILLEGAL state. that means that if
an upload is stopped by any reason- resuming it means preparing the
image while it is in ILLEGAL state.

This patch adds a flag in the API for enabling the prepare process even
if its volumes are ILLEGAL, for the upload image to use.

Change-Id: Ie18ab167635e6e099c3a12e03ea6620578c3103f
Signed-off-by: Amit Aviram 
---
M lib/api/vdsmapi-schema.json
M lib/vdsm/rpc/bindingxmlrpc.py
M vdsm/API.py
M vdsm/storage/hsm.py
4 files changed, 20 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/55199/1

diff --git a/lib/api/vdsmapi-schema.json b/lib/api/vdsmapi-schema.json
index 0ab6136..320eb1c 100644
--- a/lib/api/vdsmapi-schema.json
+++ b/lib/api/vdsmapi-schema.json
@@ -5308,6 +5308,9 @@
 #
 # @volumeID: The UUID of the Volume
 #
+# @allowIllegal: #optional If set to True, prepare will succeed even if
+#any of the image volumes are illegal.
+#
 # Returns:
 # Information about prepared image
 # (new in version 4.18)
@@ -5316,8 +5319,9 @@
 ##
 {'command': {'class': 'Image', 'name': 'prepare'},
  'data': {'storagepoolID': 'UUID', 'storagedomainID': 'UUID',
-  'imageID': 'UUID', 'volumeID': 'UUID'}
- 'returns': 'ImageInfo'}}
+  'imageID': 'UUID', 'volumeID': 'UUID',
+  '*allowIllegal': 'bool'},
+ 'returns': 'ImageInfo'}
 
 ##
 # @Image.teardown:
diff --git a/lib/vdsm/rpc/bindingxmlrpc.py b/lib/vdsm/rpc/bindingxmlrpc.py
index d87943f..cfb2eff 100644
--- a/lib/vdsm/rpc/bindingxmlrpc.py
+++ b/lib/vdsm/rpc/bindingxmlrpc.py
@@ -755,9 +755,10 @@
 image = API.Image(imgUUID, spUUID, sdUUID)
 return image.download(methodArgs, volUUID)
 
-def imagePrepare(self, spUUID, sdUUID, imgUUID, volUUID):
+def imagePrepare(self, spUUID, sdUUID, imgUUID, volUUID,
+ allowIllegal=False):
 image = API.Image(imgUUID, spUUID, sdUUID)
-return image.prepare(volUUID)
+return image.prepare(volUUID, allowIllegal)
 
 def imageTeardown(self, spUUID, sdUUID, imgUUID, volUUID=None):
 image = API.Image(imgUUID, spUUID, sdUUID)
diff --git a/vdsm/API.py b/vdsm/API.py
index 13c5ee4..c5a4067 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -926,9 +926,10 @@
 return self._irs.downloadImage(
 methodArgs, self._spUUID, self._sdUUID, self._UUID, volumeID)
 
-def prepare(self, volumeID):
-return self._irs.prepareImage(
-self._sdUUID, self._spUUID, self._UUID, volumeID)
+def prepare(self, volumeID, allowIllegal):
+return self._irs.prepareImage(self._sdUUID, self._spUUID,
+  self._UUID, volumeID,
+  allowIllegal=allowIllegal)
 
 def teardown(self, volumeID=None):
 return self._irs.teardownImage(
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 881f337..ee45027 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3158,7 +3158,8 @@
 self.log.error("Failed to remove the following rules: %s", fails)
 
 @public
-def prepareImage(self, sdUUID, spUUID, imgUUID, leafUUID):
+def prepareImage(self, sdUUID, spUUID, imgUUID, leafUUID,
+ allowIllegal=False):
 """
 Prepare an image, activating the needed volumes.
 Return the path to the leaf and an unsorted list of the image volumes.
@@ -3186,10 +3187,11 @@
 if leafUUID not in imgVolumes:
 raise se.VolumeDoesNotExist(leafUUID)
 
-for volUUID in imgVolumes:
-legality = dom.produceVolume(imgUUID, volUUID).getLegality()
-if legality == volume.ILLEGAL_VOL:
-raise se.prepareIllegalVolumeError(volUUID)
+if not allowIllegal:
+for volUUID in imgVolumes:
+legality = dom.produceVolume(imgUUID, volUUID).getLegality()
+if legality == volume.ILLEGAL_VOL:
+raise se.prepareIllegalVolumeError(volUUID)
 
 imgPath = dom.activateVolumes(imgUUID, imgVolumes)
 if spUUID and spUUID != sd.BLANK_UUID:


-- 
To view, visit https://gerrit.ovirt.org/55199
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie18ab167635e6e099c3a12e03ea6620578c3103f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org

Change in vdsm[master]: hotplugDisk: Handle prepareVolumePath errors gracefully.

2016-03-19 Thread aaviram
Amit Aviram has abandoned this change.

Change subject: hotplugDisk: Handle prepareVolumePath errors gracefully.
..


Abandoned

Common error catching is being implemented, see: 
https://gerrit.ovirt.org/#/c/54664/

-- 
To view, visit https://gerrit.ovirt.org/54266
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ic049f388eb25127864edf5931ddb3b21b67f2dff
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: virt: common handling of exceptions

2016-03-19 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: virt: common handling of exceptions
..


Patch Set 6: Code-Review+1

-- 
To view, visit https://gerrit.ovirt.org/54664
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic186dc8fa062d8b3789c6057bba68fbbc23f311b
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Vinzenz Feenstra 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: vm: use the new response handling

2016-03-19 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: vm: use the new response handling
..


Patch Set 1:

Looks good, but what about the rest? (if you need any help in 
implementation/verification in the storage parts I'll be glad to help)

-- 
To view, visit https://gerrit.ovirt.org/54799
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib594a5cc6cd8945c24cfcb3704ad92d02102993b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-03-09 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: add tests
..


Patch Set 12:

(1 comment)

https://gerrit.ovirt.org/#/c/52900/12/vdsm/storage/imagetickets.py
File vdsm/storage/imagetickets.py:

> Is this change related to the patch ?
Yes, it is essential for the tests that uhttp will be used in that-The code we 
had before failed when ovirt_image_daemon was not installed.
Thanks for the review!
Line 1: #
Line 2: # Copyright 2009-2012 Red Hat, Inc.
Line 3: #
Line 4: # This program is free software; you can redistribute it and/or modify


-- 
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hotplugDisk: Handle prepareVolumePath errors gracefully.

2016-03-03 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hotplugDisk: Handle prepareVolumePath errors gracefully.
..


Patch Set 2: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/54266
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic049f388eb25127864edf5931ddb3b21b67f2dff
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hotplugDisk: Handle prepareVolumePath errors gracefully.

2016-03-03 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hotplugDisk: Handle prepareVolumePath errors gracefully.
..


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/54266/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 2653: except VolumeError as e:
Line 2654: self.log.error(traceback.format_exc())
Line 2655: return response.error(
Line 2656: 'hotplugDisk',
Line 2657: "Preparing path during hotplug disk failed: %s" % e)
> The error type is detected by engine using the error code - set by using "h
Unfortunately the engine doesn't use that info, but just shows the attached 
message.. however it makes more sense to solve it in the engine rather than 
here, so I'll change it to your suggestion.
Line 2658: 
Line 2659: if isVdsmImage(diskParams):
Line 2660: self._normalizeVdsmImg(diskParams)
Line 2661: self._createTransientDisk(diskParams)


-- 
To view, visit https://gerrit.ovirt.org/54266
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic049f388eb25127864edf5931ddb3b21b67f2dff
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hotplugDisk: Handle prepareVolumePath errors gracefully.

2016-03-02 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: hotplugDisk: Handle prepareVolumePath errors gracefully.
..


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/54266/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 2650: diskParams = params.get('drive', {})
Line 2651: try:
Line 2652: diskParams['path'] = 
self.cif.prepareVolumePath(diskParams)
Line 2653: except VolumeError as e:
Line 2654: self.log.error(traceback.format_exc())
> Use self.log.exception("description ...")
Done
Line 2655: return response.error(
Line 2656: 'hotplugDisk',
Line 2657: "Preparing path during hotplug disk failed: %s" % e)
Line 2658: 


Line 2653: except VolumeError as e:
Line 2654: self.log.error(traceback.format_exc())
Line 2655: return response.error(
Line 2656: 'hotplugDisk',
Line 2657: "Preparing path during hotplug disk failed: %s" % e)
> I think that "Cannot prepare path: %s" is better.
Supplying a message to response.error will set the message that the user will 
eventually see, and replace the 'hotplugDisk' default message, so I think it is 
better for ux
Line 2658: 
Line 2659: if isVdsmImage(diskParams):
Line 2660: self._normalizeVdsmImg(diskParams)
Line 2661: self._createTransientDisk(diskParams)


-- 
To view, visit https://gerrit.ovirt.org/54266
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic049f388eb25127864edf5931ddb3b21b67f2dff
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-03-02 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: add tests
..


Patch Set 12: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hotplugDisk: Handle prepareVolumePath errors gracefully.

2016-03-02 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: hotplugDisk: Handle prepareVolumePath errors gracefully.
..

hotplugDisk: Handle prepareVolumePath errors gracefully.

While hotplugging a disk, a call is being made to prepareVolumePath
which prepares the image and builds a path to the volume.

Naturally, this flow can raise errors in some scenarios, e.g when the
storage is unreachable.

This patch makes hotplugDisk to handle errors thrown from prepareVolumePath
so that the user will recieve a hotplug related error, and logs the relevant
information from that error.

Related Bug-Url: https://bugzilla.redhat.com/1311465
Change-Id: Ic049f388eb25127864edf5931ddb3b21b67f2dff
Signed-off-by: Amit Aviram 
---
M vdsm/virt/vm.py
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/66/54266/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index c12d50d..d126a9a 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -29,6 +29,7 @@
 import tempfile
 import threading
 import time
+import traceback
 import uuid
 import xml.etree.ElementTree as ET
 
@@ -2647,7 +2648,13 @@
 return response.error('migInProgress')
 
 diskParams = params.get('drive', {})
-diskParams['path'] = self.cif.prepareVolumePath(diskParams)
+try:
+diskParams['path'] = self.cif.prepareVolumePath(diskParams)
+except VolumeError as e:
+self.log.error(traceback.format_exc())
+return response.error(
+'hotplugDisk',
+"Preparing path during hotplug disk failed: %s" % e)
 
 if isVdsmImage(diskParams):
 self._normalizeVdsmImg(diskParams)


-- 
To view, visit https://gerrit.ovirt.org/54266
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic049f388eb25127864edf5931ddb3b21b67f2dff
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-02-29 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: add tests
..


Patch Set 10:

(2 comments)

https://gerrit.ovirt.org/#/c/52900/10/tests/imagetickets_test.py
File tests/imagetickets_test.py:

Line 121: 
Line 122: @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
Line 123: def test_res_header_error(self):
Line 124: imagetickets.uhttp.response = \
Line 125: FakeResponse(status=300, headers={"content-length": 
"invalid"})
> Please avoid \ - use this format:
np, can you please elaborate why?
Line 126: with self.assertRaises(se.ImageDaemonError):
Line 127: imagetickets.remove_ticket("uuid")
Line 128: 
Line 129: @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())


Line 136: @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
Line 137: def test_image_daemon_error_ret(self):
Line 138: imagetickets.uhttp.response = \
Line 139: FakeResponse(status=300,
Line 140:  data=u'{"image_daemon_message":' 
u'"content"}')
> This should be one string - it works because Python joins multiple strings,
Done
Line 141: try:
Line 142: imagetickets.remove_ticket("uuid")
Line 143: except se.ImageDaemonError as e:
Line 144: self.assertTrue("image_daemon_message=content" in e.value)


-- 
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-02-29 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: add tests
..


Patch Set 9:

(4 comments)

https://gerrit.ovirt.org/#/c/52900/9/tests/imagetickets_test.py
File tests/imagetickets_test.py:

Line 53: GET = "GET"
Line 54: PATCH = "PATCH"
Line 55: PUT = "PUT"
Line 56: 
Line 57: def __init__(self, response=FakeResponse()):
> You cannot use mutable object as default value - all the tests using FakeUH
Done
Line 58: self.closed = False
Line 59: self.response = response
Line 60: 
Line 61: def UnixHTTPConnection(self, sock_path):


Line 121: 
Line 122: @MonkeyPatch(imagetickets, 'uhttp',
Line 123:  FakeUHTTP(
Line 124:  FakeResponse(status=300,
Line 125:   headers={"content-length": 
"invalid"})))
> This works, but it will be easier to replace the response on the fake http 
Done
Line 126: def test_res_header_error(self):
Line 127: with self.assertRaises(se.ImageDaemonError):
Line 128: imagetickets.remove_ticket("uuid")
Line 129: 


Line 128: imagetickets.remove_ticket("uuid")
Line 129: 
Line 130: @MonkeyPatch(imagetickets, 'uhttp',
Line 131:  FakeUHTTP(FakeResponse(status=300,
Line 132: data=u"not a json string")))
> Same
Done
Line 133: def test_res_invalid_json_ret(self):
Line 134: with self.assertRaises(se.ImageDaemonError):
Line 135: imagetickets.remove_ticket("uuid")
Line 136: 


Line 136: 
Line 137: @MonkeyPatch(imagetickets, 'uhttp',
Line 138:  FakeUHTTP(FakeResponse(status=300,
Line 139: 
data=u'{"image_daemon_message":'
Line 140:  u'"content"}')))
> Same
Done
Line 141: def test_image_daemon_error_ret(self):
Line 142: try:
Line 143: imagetickets.remove_ticket("uuid")
Line 144: except se.ImageDaemonError as e:


-- 
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-02-29 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: add tests
..


Patch Set 9: -Verified

-- 
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-02-29 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: add tests
..


Patch Set 9: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-02-28 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: add tests
..


Patch Set 8: -Verified

-- 
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-02-28 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: add tests
..


Patch Set 8: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-02-28 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: add tests
..


Patch Set 7:

(10 comments)

https://gerrit.ovirt.org/#/c/52900/7/tests/imagetickets_test.py
File tests/imagetickets_test.py:

Line 101: expected = [
Line 102: ("request", ("PATCH", "/tickets/uuid"), {"timeout": 
timeout}),
Line 103: ]
Line 104: 
Line 105: self.assertTrue(imagetickets.uhttp.__calls__, expected)
> assertEqual
Done
Line 106: self.assertTrue(imagetickets.uhttp.closed)
Line 107: 
Line 108: @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
Line 109: def test_remove_ticket(self):


Line 108: @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
Line 109: def test_remove_ticket(self):
Line 110: imagetickets.remove_ticket("uuid")
Line 111: expected = [
Line 112: ("request", ("PATCH", "/tickets/uuid"), None),
> Patch?
Done
Line 113: ]
Line 114: 
Line 115: self.assertTrue(imagetickets.uhttp.__calls__, expected)
Line 116: self.assertTrue(imagetickets.uhttp.closed)


Line 111: expected = [
Line 112: ("request", ("PATCH", "/tickets/uuid"), None),
Line 113: ]
Line 114: 
Line 115: self.assertTrue(imagetickets.uhttp.__calls__, expected)
> assertEqual - this error hides the bad expected value
Done
Line 116: self.assertTrue(imagetickets.uhttp.closed)
Line 117: 
Line 118: @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
Line 119: def test_res_header_error(self):


Line 118: @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
Line 119: def test_res_header_error(self):
Line 120: imagetickets.uhttp.response.status = 300
Line 121: 
Line 122: def str_ret(*args, **kwargs):
> getheader would be a better name, and we don't need to accept *args and **k
Taking the approach you suggested, so this change is irrelevant.
Line 123: return "string"
Line 124: 
Line 125: imagetickets.uhttp.response.getheader = str_ret
Line 126: with self.assertRaises(se.ImageDaemonError):


Line 129: @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
Line 130: def test_res_invalid_json_ret(self):
Line 131: imagetickets.uhttp.response.status = 300
Line 132: 
Line 133: def not_json_ret(*args, **kwargs):
> Same as previous test:
Taking the approach you suggested, so this change is irrelevant.
Line 134: return "string"
Line 135: 
Line 136: imagetickets.uhttp.response.read = not_json_ret
Line 137: with self.assertRaises(se.ImageDaemonError):


Line 140: @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
Line 141: def test_image_daemon_error_ret(self):
Line 142: imagetickets.uhttp.response.status = 300
Line 143: 
Line 144: def image_daemon_fake_ret(*args, **kwargs):
> Same:
Taking the approach you suggested, so this change is irrelevant.
Line 145: return '{"image_daemon_message":"content"}'
Line 146: 
Line 147: imagetickets.uhttp.response.read = image_daemon_fake_ret
Line 148: try:


Line 143: 
Line 144: def image_daemon_fake_ret(*args, **kwargs):
Line 145: return '{"image_daemon_message":"content"}'
Line 146: 
Line 147: imagetickets.uhttp.response.read = image_daemon_fake_ret
> We should also fake getheader to return the correct content_length value, a
Good idea, I'll go with that approach.
Line 148: try:
Line 149: imagetickets.remove_ticket("uuid")
Line 150: except se.ImageDaemonError as e:
Line 151: self.assertTrue("image_daemon_message" in e.value)


Line 147: imagetickets.uhttp.response.read = image_daemon_fake_ret
Line 148: try:
Line 149: imagetickets.remove_ticket("uuid")
Line 150: except se.ImageDaemonError as e:
Line 151: self.assertTrue("image_daemon_message" in e.value)
> I think we expect:
It is actually "...=content", Done
Line 152: 
Line 153: @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
Line 154: def test_res_read_error(self):
Line 155: imagetickets.uhttp.response.status = 300


Line 154: def test_res_read_error(self):
Line 155: imagetickets.uhttp.response.status = 300
Line 156: err_msg = "Environment error message"
Line 157: 
Line 158: def env_err(*args, **kwargs):
> Same:
Done
Line 159: raise EnvironmentError(err_msg)
Line 160: imagetickets.uhttp.response.read = env_err
Line 161: 
Line 162: try:


Line 168: @permutations([[httplib.HTTPException], [socket.error], 
[OSError]])
Line 169: def test_image_tickets_error(self, exc_type):
Line 170: ticket = create_ticket(uuid="uuid")
Line 171: 
Line 172: def failing_request(*args, **kwargs):
> Better have the same signature of the real request. Will fail with TypeErro
Done
Line 173: raise exc_type
Line 174: 

Change in vdsm[master]: localFsSD: Use the right manifest.

2016-02-21 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: localFsSD: Use the right manifest.
..


Patch Set 3:

This bug was introduced in patch 28582d, which does not exist in 3.6. so no 
backport is needed. (The flow was tested, and does not exists in 3.6)

-- 
To view, visit https://gerrit.ovirt.org/53688
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I482511290032cad3813e5c8b85b59d2369da2e90
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Vered Volansky 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: localFsSD: Use the right manifest.

2016-02-18 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: localFsSD: Use the right manifest.
..


Patch Set 2: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/53688
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I482511290032cad3813e5c8b85b59d2369da2e90
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Vered Volansky 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: localFsSD: Use the right manifest.

2016-02-18 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: localFsSD: Use the right manifest.
..

localFsSD: Use the right manifest.

Local storage domain should use its own manifest instead of the
inherited one from FileStorageDomain.

Change-Id: I482511290032cad3813e5c8b85b59d2369da2e90
Bug-Url:https://bugzilla.redhat.com/1305768
Signed-off-by: Amit Aviram 
---
M vdsm/storage/localFsSD.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/53688/1

diff --git a/vdsm/storage/localFsSD.py b/vdsm/storage/localFsSD.py
index 845b461..bbbc1a7 100644
--- a/vdsm/storage/localFsSD.py
+++ b/vdsm/storage/localFsSD.py
@@ -39,6 +39,8 @@
 
 
 class LocalFsStorageDomain(fileSD.FileStorageDomain):
+manifestClass = LocalFsStorageDomainManifest
+
 @property
 def supportsMailbox(self):
 return False


-- 
To view, visit https://gerrit.ovirt.org/53688
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I482511290032cad3813e5c8b85b59d2369da2e90
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: hsm: organize imports.

2016-02-11 Thread aaviram
Amit Aviram has abandoned this change.

Change subject: hsm: organize imports.
..


Abandoned

-- 
To view, visit https://gerrit.ovirt.org/50373
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: Iba1888c23b8fdea510547c5b26977ec71fd0d1e0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: Add tests.

2016-02-10 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: imagetickets: Add tests.
..

imagetickets: Add tests.

Change-Id: Ia1d414c96c06484365911804e438845dfe17cbb1
Signed-off-by: Amit Aviram 
---
M tests/imagetickets_test.py
1 file changed, 45 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/53331/1

diff --git a/tests/imagetickets_test.py b/tests/imagetickets_test.py
index 556ac63..b32d144 100644
--- a/tests/imagetickets_test.py
+++ b/tests/imagetickets_test.py
@@ -62,6 +62,12 @@
 self.status = 200
 self.reason = "OK"
 
+def getheader(*args, **kwargs):
+return 0
+
+def read (*args, **kwargs):
+return "{}"
+
 
 @expandPermutations
 class TestImageTickets(VdsmTestCase):
@@ -73,7 +79,7 @@
 ["remove_ticket", ["uuid"]],
 ])
 def test_not_supported(self, method, args):
-with self.assertRaises(se.ImageDeamonUnsupported):
+with self.assertRaises(se.ImageDaemonUnsupported):
 func = getattr(imagetickets, method)
 func(*args)
 
@@ -91,6 +97,44 @@
 
 @MonkeyPatch(imagetickets, '_have_image_daemon', True)
 @MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
+def test_extend_ticket(self):
+timeout = 300
+imagetickets.extend_ticket("uuid", timeout)
+expected = [
+("request", ("PATCH", "/tickets/uuid"), {"timeout": timeout}),
+]
+
+self.assertTrue(imagetickets.uhttp.__calls__, expected)
+self.assertTrue(imagetickets.uhttp.closed)
+
+@MonkeyPatch(imagetickets, '_have_image_daemon', True)
+@MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
+def test_remove_ticket(self):
+imagetickets.remove_ticket("uuid")
+expected = [
+("request", ("PATCH", "/tickets/uuid"), None),
+]
+
+self.assertTrue(imagetickets.uhttp.__calls__, expected)
+self.assertTrue(imagetickets.uhttp.closed)
+
+
+@MonkeyPatch(imagetickets, '_have_image_daemon', True)
+@MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
+@permutations([
+["getheader", lambda *args, **kwargs: "string"],
+["read", lambda *args, **kwargs: (_ for _ in 
()).throw(EnvironmentError)],
+["read", lambda *args, **kwargs: "not json"],
+])
+def test_image_daemon_error(self, func_name, fake_impl):
+imagetickets.uhttp.response.status = 300
+setattr(imagetickets.uhttp.response, func_name, fake_impl)
+with self.assertRaises(se.ImageDaemonError):
+imagetickets.remove_ticket("uuid")
+
+
+@MonkeyPatch(imagetickets, '_have_image_daemon', True)
+@MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
 @permutations([[httplib.HTTPException], [socket.error], [OSError]])
 def test_image_tickets_error(self, exc_type):
 ticket = create_ticket(uuid="uuid")


-- 
To view, visit https://gerrit.ovirt.org/53331
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1d414c96c06484365911804e438845dfe17cbb1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-02-10 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: add tests
..


Patch Set 4: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: Add tests.

2016-02-10 Thread aaviram
Amit Aviram has abandoned this change.

Change subject: imagetickets: Add tests.
..


Abandoned

-- 
To view, visit https://gerrit.ovirt.org/53331
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ia1d414c96c06484365911804e438845dfe17cbb1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-02-10 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: add tests
..


Patch Set 4: -Verified

-- 
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-02-10 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: add tests
..


Patch Set 4:

re: first issue, Done.
re: second issue: I'm guessing you are not rebased, 
https://gerrit.ovirt.org/#/c/53279/ changed the error name

-- 
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: fix typo in Daemon Error

2016-02-09 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: imagetickets: fix typo in Daemon Error
..

imagetickets: fix typo in Daemon Error

DeamonError -> DaemonError

Change-Id: Iea5ac6f0ca98edf8344f3040717ca825ed021e2e
Signed-off-by: Amit Aviram 
---
M vdsm/storage/imagetickets.py
M vdsm/storage/storage_exception.py
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/79/53279/1

diff --git a/vdsm/storage/imagetickets.py b/vdsm/storage/imagetickets.py
index 62ada7d..e87a34c 100644
--- a/vdsm/storage/imagetickets.py
+++ b/vdsm/storage/imagetickets.py
@@ -45,7 +45,7 @@
 @functools.wraps(func)
 def wrapper(*args, **kw):
 if not _have_image_daemon:
-raise se.ImageDeamonUnsupported()
+raise se.ImageDaemonUnsupported()
 return func(*args, **kw)
 
 return wrapper
@@ -88,7 +88,7 @@
 except ValueError as e:
 error_info = {"explanation": "Invalid content-length",
   "detail": str(e)}
-raise se.ImageDeamonError(res.status, res.reason, error_info)
+raise se.ImageDaemonError(res.status, res.reason, error_info)
 
 try:
 res_data = res.read(content_length)
diff --git a/vdsm/storage/storage_exception.py 
b/vdsm/storage/storage_exception.py
index 1fc01b5..b01b6f5 100644
--- a/vdsm/storage/storage_exception.py
+++ b/vdsm/storage/storage_exception.py
@@ -1212,7 +1212,7 @@
 self.value = "reason=%s" % reason
 
 
-class ImageDeamonError(StorageException):
+class ImageDaemonError(StorageException):
 code = 482
 message = "Image daemon request failed"
 
@@ -1223,7 +1223,7 @@
 self.value = ", ".join("%s=%s" % (k, v) for k, v in d.items())
 
 
-class ImageDeamonUnsupported(StorageException):
+class ImageDaemonUnsupported(StorageException):
 code = 483
 message = "Image daemon is unsupported"
 


-- 
To view, visit https://gerrit.ovirt.org/53279
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea5ac6f0ca98edf8344f3040717ca825ed021e2e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: fix typo in Daemon Error

2016-02-09 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: fix typo in Daemon Error
..


Patch Set 1: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/53279
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iea5ac6f0ca98edf8344f3040717ca825ed021e2e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: add tests

2016-01-31 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: imagetickets: add tests
..

imagetickets: add tests

Adding tests to the new imagetickets module.

Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Bug-Url: https://bugzilla.redhat.com/??
Signed-off-by: Amit Aviram 
---
A tests/imagetickets_test.py
1 file changed, 114 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/52900/1

diff --git a/tests/imagetickets_test.py b/tests/imagetickets_test.py
new file mode 100644
index 000..556ac63
--- /dev/null
+++ b/tests/imagetickets_test.py
@@ -0,0 +1,114 @@
+#
+# Copyright 2016 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+
+import httplib
+import json
+import socket
+
+from monkeypatch import MonkeyPatch
+from testlib import VdsmTestCase
+from testlib import expandPermutations, permutations
+from testlib import recorded
+
+from storage import imagetickets
+from storage import storage_exception as se
+
+
+class FakeUHTTP(object):
+
+DELETE = "DELETE"
+GET = "GET"
+PATCH = "PATCH"
+PUT = "PUT"
+
+def __init__(self):
+self.closed = False
+self.response = FakeResponse()
+
+def UnixHTTPConnection(self, sock_path):
+return self
+
+@recorded
+def request(self, method, path, body=None):
+pass
+
+def getresponse(self):
+return self.response
+
+def close(self):
+self.closed = True
+
+
+class FakeResponse(object):
+
+def __init__(self):
+self.status = 200
+self.reason = "OK"
+
+
+@expandPermutations
+class TestImageTickets(VdsmTestCase):
+
+@MonkeyPatch(imagetickets, '_have_image_daemon', False)
+@permutations([
+["add_ticket", [{}]],
+["extend_ticket", ["uuid", 300]],
+["remove_ticket", ["uuid"]],
+])
+def test_not_supported(self, method, args):
+with self.assertRaises(se.ImageDeamonUnsupported):
+func = getattr(imagetickets, method)
+func(*args)
+
+@MonkeyPatch(imagetickets, '_have_image_daemon', True)
+@MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
+def test_add_ticket(self):
+ticket = create_ticket(uuid="uuid")
+body = json.dumps(ticket)
+expected = [
+("request", ("PUT", "/tickets/uuid"), {"body": body}),
+]
+imagetickets.add_ticket(ticket)
+self.assertEqual(imagetickets.uhttp.__calls__, expected)
+self.assertTrue(imagetickets.uhttp.closed)
+
+@MonkeyPatch(imagetickets, '_have_image_daemon', True)
+@MonkeyPatch(imagetickets, 'uhttp', FakeUHTTP())
+@permutations([[httplib.HTTPException], [socket.error], [OSError]])
+def test_image_tickets_error(self, exc_type):
+ticket = create_ticket(uuid="uuid")
+
+def failing_request(*args, **kwargs):
+raise exc_type
+
+imagetickets.uhttp.request = failing_request
+with self.assertRaises(se.ImageTicketsError):
+imagetickets.add_ticket(ticket)
+
+
+def create_ticket(uuid, ops=("read", "write"), timeout=300,
+  size=1024**3, path="/path/to/image"):
+return {
+"uuid": uuid,
+"timeout": timeout,
+"ops": list(ops),
+"size": size,
+"path": path,
+}


-- 
To view, visit https://gerrit.ovirt.org/52900
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2728851a91529ec35501f423d9a798af961fb82a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: Support image tickets

2016-01-25 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: Support image tickets
..


Patch Set 15: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/50014
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b9ded4bde73b1ab504cae50d2cea726d4f77e51
Gerrit-PatchSet: 15
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: Support image tickets

2016-01-24 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: Support image tickets
..


Patch Set 13: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/50014
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b9ded4bde73b1ab504cae50d2cea726d4f77e51
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Debugging vm.py

2016-01-24 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: Debugging vm.py
..

Debugging vm.py

Change-Id: I583efd29cc2d7fbe064c331b6e52a692fac9fc97
Signed-off-by: Amit Aviram 
---
M vdsm/vdsm
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/58/52658/1

diff --git a/vdsm/vdsm b/vdsm/vdsm
index 58b6041..beae6fc 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -11,6 +11,13 @@
 from __future__ import print_function
 import sys
 
+# AMIT DEBUG
+sys.path.append('/usr/lib64/python2.7/pycharm-debug.egg')
+import pydevd
+
+pydevd.settrace('10.35.0.160', port=22200, stdoutToServer=True,
+stderrToServer=True)
+
 # When using Python 2, we must monkey patch threading module before importing
 # any other module.
 if sys.version_info[0] == 2:


-- 
To view, visit https://gerrit.ovirt.org/52658
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I583efd29cc2d7fbe064c331b6e52a692fac9fc97
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: DEBUG

2016-01-24 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: DEBUG
..

DEBUG

Change-Id: I568a9cebd9b981cb387e92518dc2e64b463ea991
Signed-off-by: Amit Aviram 
---
M vdsm/vdsm
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/52659/1

diff --git a/vdsm/vdsm b/vdsm/vdsm
index beae6fc..c1289c9 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -15,7 +15,7 @@
 sys.path.append('/usr/lib64/python2.7/pycharm-debug.egg')
 import pydevd
 
-pydevd.settrace('10.35.0.160', port=22200, stdoutToServer=True,
+pydevd.settrace('10.35.202.149', port=22200, stdoutToServer=True,
 stderrToServer=True)
 
 # When using Python 2, we must monkey patch threading module before importing


-- 
To view, visit https://gerrit.ovirt.org/52659
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I568a9cebd9b981cb387e92518dc2e64b463ea991
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Fix

2016-01-24 Thread aaviram
Amit Aviram has uploaded a new change for review.

Change subject: Fix
..

Fix

Change-Id: I6b0bf654b3711ac68c65fb9d2294f91efc92272d
Signed-off-by: Amit Aviram 
---
M vdsm/storage/imagetickets.py
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/60/52660/1

diff --git a/vdsm/storage/imagetickets.py b/vdsm/storage/imagetickets.py
index f9afe6b..f3b7be6 100644
--- a/vdsm/storage/imagetickets.py
+++ b/vdsm/storage/imagetickets.py
@@ -83,9 +83,10 @@
 
 if res.status >= 300:
 try:
-content_length = int(res.getheader("content-length", "0"))
+content_length = int(res.getheader("content-length",
+   default="0"))
 except ValueError as e:
-error_info = {"explanation": "Missing content-length",
+error_info = {"explanation": "Invalid content-length",
   "detail": str(e)}
 raise se.ImageDeamonError(res.status, res.reason, error_info)
 


-- 
To view, visit https://gerrit.ovirt.org/52660
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b0bf654b3711ac68c65fb9d2294f91efc92272d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: Support image tickets

2016-01-24 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: Support image tickets
..


Patch Set 13:

(1 comment)

https://gerrit.ovirt.org/#/c/50014/13/vdsm/storage/imagetickets.py
File vdsm/storage/imagetickets.py:

Line 84: if res.status >= 300:
Line 85: try:
Line 86: content_length = int(res.getheader("content-length", 
"0"))
Line 87: except ValueError as e:
Line 88: error_info = {"explanation": "Missing content-length",
> The issue is invalid content length, not missing.
If there is no header, it returns "None", unless we give it a default value. 
That means that if we do give it a default value, we can't get "None".

If there is no content length, I think the code can continue to the 
ImageDaemonError raising as before- because the message will contain almost the 
same value: states, reason, and some general error_info.

So I'm for changing the text to "invalid" and not checking if content length is 
there.
Line 89:   "detail": str(e)}
Line 90: raise se.ImageDeamonError(res.status, res.reason, 
error_info)
Line 91: 
Line 92: try:


-- 
To view, visit https://gerrit.ovirt.org/50014
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b9ded4bde73b1ab504cae50d2cea726d4f77e51
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: DEBUG

2016-01-24 Thread aaviram
Amit Aviram has abandoned this change.

Change subject: DEBUG
..


Abandoned

-- 
To view, visit https://gerrit.ovirt.org/52659
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I568a9cebd9b981cb387e92518dc2e64b463ea991
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Debugging vm.py

2016-01-24 Thread aaviram
Amit Aviram has abandoned this change.

Change subject: Debugging vm.py
..


Abandoned

-- 
To view, visit https://gerrit.ovirt.org/52658
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I583efd29cc2d7fbe064c331b6e52a692fac9fc97
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: Fix

2016-01-24 Thread aaviram
Amit Aviram has abandoned this change.

Change subject: Fix
..


Abandoned

-- 
To view, visit https://gerrit.ovirt.org/52660
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I6b0bf654b3711ac68c65fb9d2294f91efc92272d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: Support image tickets

2016-01-24 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: Support image tickets
..


Patch Set 14:

(4 comments)

https://gerrit.ovirt.org/#/c/50014/14/vdsm/storage/imagetickets.py
File vdsm/storage/imagetickets.py:

Line 83: 
Line 84: if res.status >= 300:
Line 85: try:
Line 86: content_length = int(res.getheader("content-length",
Line 87:default="0"))
> Use default="" - this will fail when converting to int, ensuring that we fa
Done
Line 88: except ValueError as e:
Line 89: error_info = {"explanation": "Invalid content-length",
Line 90:   "detail": str(e)}
Line 91: raise se.ImageDeamonError(res.status, res.reason, 
error_info)


https://gerrit.ovirt.org/#/c/50014/14/vdsm/storage/storage_exception.py
File vdsm/storage/storage_exception.py:

Line 1205: 
Line 1206: 
Line 1207: class ImageTicketsError(StorageException):
Line 1208: code = 481
Line 1209: message = "Unsuccessful request to imaged"
> Cannot communicate with image daemon
Done
Line 1210: 
Line 1211: def __init__(self, reason):
Line 1212: self.value = "reason=%s" % reason
Line 1213: 


Line 1213: 
Line 1214: 
Line 1215: class ImageDeamonError(StorageException):
Line 1216: code = 482
Line 1217: message = "Error returned from Imaged"
> Image daemon request failed
Done
Line 1218: 
Line 1219: def __init__(self, status, reason, error_info):
Line 1220: d = error_info.copy()
Line 1221: d['status'] = status


Line 1224: 
Line 1225: 
Line 1226: class ImageDeamonUnsupported(StorageException):
Line 1227: code = 483
Line 1228: message = "Image daemon is unsupported in the selected host"
> Remove "in the selected host", this message is always about this host.
Done
Line 1229: 
Line 1230: 
Line 1231: #
Line 1232: #  LVM related Exceptions


-- 
To view, visit https://gerrit.ovirt.org/50014
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b9ded4bde73b1ab504cae50d2cea726d4f77e51
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: imagetickets: Support image tickets

2016-01-20 Thread aaviram
Amit Aviram has posted comments on this change.

Change subject: imagetickets: Support image tickets
..


Patch Set 10:

(6 comments)

https://gerrit.ovirt.org/#/c/50014/10//COMMIT_MSG
Commit Message:

Line 11: oVirt's storage devices.
Line 12: 
Line 13: Specifically, this VDSM module is responsible for granting permissions
Line 14: for image transfers, via a ticket mechanism for an image, sent from
Line 15: engine, through VDSM to imaged- a process for image IO which resides
> Add a space before "-"
Done
Line 16: next to VDSM in the host.
Line 17: 
Line 18: Change-Id: I6b9ded4bde73b1ab504cae50d2cea726d4f77e51


https://gerrit.ovirt.org/#/c/50014/10/lib/api/vdsmapi-schema.json
File lib/api/vdsmapi-schema.json:

Line 8423: # @ops:   operations list to be applied on the image
Line 8424: #
Line 8425: # @size:  block size of each transferred chunk
Line 8426: #
Line 8427: # @path:  an image path
> Using a URL in all cases (incl. "file://") is a nice, extensible way to spe
Done
Line 8428: #
Line 8429: # Since: 4.18.0
Line 8430: ##
Line 8431: {'type': 'ImageTicket',


https://gerrit.ovirt.org/#/c/50014/10/vdsm/API.py
File vdsm/API.py:

Line 1623: return errCode['haErr']
Line 1624: return {'status': doneCode}
Line 1625: 
Line 1626: def add_image_ticket(self, ticket):
Line 1627: return self._irs.add_image_ticket(ticket)
> Done
This has to return a status, otherwise the infra will fail when trying to 
retrieve it. I'll just return a "donecode"
Line 1628: 
Line 1629: def remove_image_ticket(self, ticket_uuid):
Line 1630: return self._irs.remove_image_ticket(ticket_uuid)
Line 1631: 


https://gerrit.ovirt.org/#/c/50014/10/vdsm/storage/imagetickets.py
File vdsm/storage/imagetickets.py:

Line 33: from imaged import uhttp
Line 34: from imaged.server import Config
Line 35: _have_imaged = True
Line 36: except ImportError:
Line 37: pass
> We have tow code paths, each define the correct value of _have_imaged. Both
Ok if you prefer, since I'll update the patch anyway..
Line 38: 
Line 39: log = logging.getLogger('storage.imagetickets')
Line 40: 
Line 41: 


Line 71: try:
Line 72: with closing(con):
Line 73: con.request(method, "/tickets/%s" % ticket_uuid, body, {})
Line 74: res = con.getresponse()
Line 75: except socket.error as e:
> Are you sure that this can raise only socket.error? check httplib documenta
classes which are derived from HTTPException and socket.error  can be thrown in 
here, I could not find any further exceptions in the docs
Line 76: raise se.ImageTicketsError("Error connecting to imaged: 
{errno} - "
Line 77:"{strerror}".format(errno=e.errno,
Line 78:
strerror=e.strerror))
Line 79: if res.status not in (200, 204):


Line 79: if res.status not in (200, 204):
Line 80: try:
Line 81: ret_dict = json.loads(res.read(res.length))
Line 82: ret_code = ret_dict['code']
Line 83: ret_title = ret_dict['title']
> We can remove the the extra keys from the payload, as they are pass in the 
I will.
Line 84: ret_expl = ret_dict['explanation']
Line 85: ret_detail = ret_dict['detail'] if 'detail' in ret_dict 
else None
Line 86: except Exception as e:
Line 87: raise se.ImageDeamonError(res.status, res.reason,


-- 
To view, visit https://gerrit.ovirt.org/50014
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b9ded4bde73b1ab504cae50d2cea726d4f77e51
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Allon Mureinik 
Gerrit-Reviewer: Amit Aviram 
Gerrit-Reviewer: Greg Padgett 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


  1   2   >