Saggi Mizrahi has uploaded a new change for review.
Change subject: Add create operation to qemu-img ......................................................................
Add create operation to qemu-img
Change-Id: I078afcb0899792805584fc56832747d36908f18b Signed-off-by: Saggi Mizrahi smizrahi@redhat.com --- M vdsm/qemuImg.py 1 file changed, 29 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/6245/1 -- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 4: I would prefer that you didn't submit this
(2 inline comments)
.................................................... File vdsm/qemuImg.py Line 110: #TBD: Escape backing file option? How? what are you fearing, exactly?
space or equality are not an issue. what is?
Line 115: cmd.append("%dk" % (size / 1024)) silently rounding down smells like a future bug.
how about raising an error if we are passed a size that we cannot create?
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Shu Ming has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 4: I would prefer that you didn't submit this
It seems no elsewhere to use this new qemu-img create operation. Can you explain which one need this new option and how it is used?
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
Federico Simoncelli has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 4: (1 inline comment)
.................................................... File vdsm/qemuImg.py Line 115: cmd.append("%dk" % (size / 1024)) I think that the granularity used is 512 (by both qemu-img and qemu in general). I think I already checked this but check it again eventually: qemu rounds down (obviously, to not expose an incomplete bs at the end). Sadly I think that qemu-img doesn't fail on create and it rounds up. I think that it's not our business to care, what we receive here will be passed to qemu-img (to maintain its behavior). We can try to push the check into qemu-img eventually (and fail there).
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
Ewoud Kohl van Wijngaarden has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 5: (1 inline comment)
.................................................... File vdsm/qemuImg.py Line 105: raise ValueError("size must be a positive number and a multiply of " I think it's multiple instead of multiply
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
Ewoud Kohl van Wijngaarden has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 6: I would prefer that you didn't submit this
(2 inline comments)
.................................................... File vdsm/qemuImg.py Line 114: #TBD: Escape backing file option? How? I think Popen normally escapes the arguments and betterPopen inherits from Popen. Can you elaborate what you mean here?
Line 117: cmd.append(filename) Please insert an empty line between this and the next to keep it consistent.
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
Saggi Mizrahi has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 6: (1 inline comment)
.................................................... File vdsm/qemuImg.py Line 114: #TBD: Escape backing file option? How? unicode file names
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 12: No score
Build Started http://jenkins.ovirt.info/job/vdsm_unit_tests_by_patch/237/
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 12:
Build Successful
http://jenkins.ovirt.info/job/vdsm_unit_tests_by_patch/237/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Ewoud Kohl van Wijngaarden has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 12: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm/qemuImg.py Line 104: if size <= 0 or size % 1024: If size is None you will raise a ValueError making it a non-optional argument. Please check for None.
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 13:
Build Successful
http://jenkins.ovirt.info/job/patch_vdsm_unit_tests/420/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Ewoud Kohl van Wijngaarden has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 13: Looks good to me, but someone else must approve
I think it's good now, but still not sure about the escaping. I think popen should do the right thing but I can't say for sure.
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Ayal Baron has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 13: (1 inline comment)
.................................................... File vdsm/qemuImg.py Line 99: if rc != 0: Line 100: raise QImgError(rc, out, err) Line 101: Line 102: Line 103: def create(filename, imgFormat=None, backingFile=None, size=None): preallocation? (for nfs)
cluster_size? Line 104: cmd = [_qemuimg.cmd, "create"] Line 105: Line 106: if imgFormat: Line 107: cmd.extend(("-f", imgFormat))
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Igor Lvovsky has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 13: (1 inline comment)
.................................................... File vdsm/qemuImg.py Line 107: cmd.extend(("-f", imgFormat)) Line 108: Line 109: if backingFile: Line 110: #TBD: Escape backing file option? How? Line 111: cmd.extend(("-o", "backing_file=%s" % backingFile)) Sometimes, you will need to know backingFile's format '-F' (mostly for block devices) Line 112: Line 113: cmd.append(filename) Line 114: Line 115: if size is not None:
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 14:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/216/ (1/3)
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 14:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1070/ (2/3)
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 14:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1105/ (3/3)
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Add create operation to qemu-img ......................................................................
Patch Set 14: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1070/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1105/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/216/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/6245 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I078afcb0899792805584fc56832747d36908f18b Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ewoud Kohl van Wijngaarden ewoud@kohlvanwijngaarden.nl Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Saggi Mizrahi has abandoned this change.
Change subject: Add create operation to qemu-img ......................................................................
Abandoned
vdsm-patches@lists.fedorahosted.org