Federico Simoncelli has uploaded a new change for review.
Change subject: [WIP] Move the VDSM common code to the python site lib ......................................................................
[WIP] Move the VDSM common code to the python site lib
Some VDSM code is shared between different components (eg: vdsm and vdsm-cli share vdscli.py) and some modules have a really common name (eg: utils, config) risking to collide with other packages. For these two reasons and for cleanliness some modules are moved to a new location (the standard python site lib) and they can be shipped in a different package.
Change-Id: I4baa573532e41f47bbb19a011856c876f851a2b6 --- M configure.ac M vds_bootstrap/vds_bootstrap.py M vdsm.spec.in M vdsm/Makefile.am M vdsm/caps.py M vdsm/clientIF.py M vdsm/config.py M vdsm/configNetwork.py M vdsm/get-conf-item M vdsm/guestIF.py M vdsm/hooks.py M vdsm/kaxmlrpclib.py M vdsm/ksm.py M vdsm/libvirtconnection.py M vdsm/libvirtvm.py M vdsm/netinfo.py M vdsm/set-conf-item M vdsm/storage/blockSD.py M vdsm/storage/blockVolume.py M vdsm/storage/devicemapper.py M vdsm/storage/dispatcher.py M vdsm/storage/fileSD.py M vdsm/storage/fileUtils.py M vdsm/storage/hsm.py M vdsm/storage/image.py M vdsm/storage/iscsi.py M vdsm/storage/lvm.py M vdsm/storage/misc.py M vdsm/storage/multipath.py M vdsm/storage/outOfProcess.py M vdsm/storage/processPool.py M vdsm/storage/resourceFactories.py M vdsm/storage/safelease.py M vdsm/storage/sd.py M vdsm/storage/sdc.py M vdsm/storage/sp.py M vdsm/storage/storage_connection.py M vdsm/storage/storage_mailbox.py M vdsm/storage/task.py M vdsm/storage/taskManager.py M vdsm/storage/volume.py M vdsm/substitute_constants.py M vdsm/supervdsm.py M vdsm/supervdsmServer.py M vdsm/ut/ivdsm.py M vdsm/ut/testGuestChannel.py M vdsm/utils.py M vdsm/vdsm M vdsm/vm.py M vdsm_cli/Makefile.am M vdsm_cli/dumpStorageTable.py M vdsm_cli/vdsClient.py M vdsm_cli/vdscli.py.in M vdsm_hooks/faqemu/before_vm_start.py M vdsm_hooks/vhostmd/after_vm_destroy.py M vdsm_reg/rhevm.py M vdsm_reg/vdsm-reg-setup 57 files changed, 144 insertions(+), 129 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/86/286/1 -- To view, visit http://gerrit.ovirt.org/286 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I4baa573532e41f47bbb19a011856c876f851a2b6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: [WIP] Move the VDSM common code to the python site lib ......................................................................
Patch Set 1: I would prefer that you didn't submit this
wow. I was considering to have a proper vdsm python package since ever. I considered moving all (but few executable scripts) - and feared the head ache. I never thought of moving only several of the modules.
However, do we really need vdsm-python as a separate rpm? I find the name a bit funny as everything else is python, too. (I understand the use case of vdsm-less vdsm-cli.)
-- To view, visit http://gerrit.ovirt.org/286 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4baa573532e41f47bbb19a011856c876f851a2b6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com
Federico Simoncelli has posted comments on this change.
Change subject: [WIP] Move the VDSM common code to the python site lib ......................................................................
Patch Set 1:
wow. I was considering to have a proper vdsm python package since ever. I considered moving all (but few executable scripts) - and feared the head ache. I never thought of moving only several of the modules.
Moving them all is easier (you don't have to modify the imports), the problem is that not all the modules we have are designed to be used as standalone libraries. I really hope to move other modules in the new package soon but only when they're designed properly.
However, do we really need vdsm-python as a separate rpm?
Yes, as explained in the commit message it's solving one problem in the standard way: shipping the common files in a separate package.
I find the name a bit funny as everything else is python, too.
Everything else is in python but it's not designed to be a library, it's an application and we don't care about its language since we're interacting with it just through its executables and not through any library.
-- To view, visit http://gerrit.ovirt.org/286 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4baa573532e41f47bbb19a011856c876f851a2b6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: [WIP] Move the VDSM common code to the python site lib ......................................................................
Patch Set 3:
Well, in my opinion it's wrong that everyone are accessing constants and config.
Config in my opinion should only be accessed by clientIf.py and HSM.py each reading it's own section of the configuration and then distributing the proper values in a less global fashion.
the huge constants.py should be removed. each tool should have it's own wrapper and have it be the only point the path is defined. All modules should use the the warrper module so there aren't multiple users of the constant.
The actual way to devide this in my opinion would be
VDSM pacakge Storage package python-syntools - collection of our sync objects made in a way that they can be useful to other projects python-XXX - more packages with reusable parts stripped off.
-- To view, visit http://gerrit.ovirt.org/286 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4baa573532e41f47bbb19a011856c876f851a2b6 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: Move the VDSM common code to the python site lib ......................................................................
Patch Set 5:
I don't have the required mental skills to make sure nothing broke. Get someone to verify it and I'll blindly +1 it.
-- To view, visit http://gerrit.ovirt.org/286 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4baa573532e41f47bbb19a011856c876f851a2b6 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Federico Simoncelli has posted comments on this change.
Change subject: Move the VDSM common code to the python site lib ......................................................................
Patch Set 6:
Dan, as discussed, this patch might cause a problem if rhevm uploads an old bootstrap.
-- To view, visit http://gerrit.ovirt.org/286 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4baa573532e41f47bbb19a011856c876f851a2b6 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Move the VDSM common code to the python site lib ......................................................................
Patch Set 6: Verified; Looks good to me, approved
(1 inline comment)
I believe it wouldn't be so hard to reinstate the ability to install vdsm with legacy file positioning into this commit's deployUtil.
.................................................... File vdsm_reg/deployUtil.py.in Line 320: from vdsm import netinfo hmm, it seems that making bootsrapping work for old AND new vdsm locations should not be that hard. a smarter function to import netinfo may do the trick
-- To view, visit http://gerrit.ovirt.org/286 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4baa573532e41f47bbb19a011856c876f851a2b6 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has posted comments on this change.
Change subject: Move the VDSM common code to the python site lib ......................................................................
Patch Set 7: Verified; Looks good to me, approved
rebased
-- To view, visit http://gerrit.ovirt.org/286 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I4baa573532e41f47bbb19a011856c876f851a2b6 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Move the VDSM common code to the python site lib ......................................................................
Move the VDSM common code to the python site lib
Some VDSM code is shared between different components (eg: vdsm and vdsm-cli share vdscli.py) and some modules have a really common name (eg: utils, config) risking to collide with other packages. For these two reasons and for cleanliness some modules are moved to a new location (the standard python site lib) and they can be shipped in a different package.
Change-Id: I4baa573532e41f47bbb19a011856c876f851a2b6 --- M configure.ac M vds_bootstrap/vds_bootstrap.py M vdsm.spec.in M vdsm/API.py M vdsm/BindingXMLRPC.py M vdsm/Makefile.am A vdsm/__init__.py M vdsm/caps.py M vdsm/clientIF.py M vdsm/configNetwork.py M vdsm/dumpStorageTable.py.in M vdsm/get-conf-item M vdsm/guestIF.py M vdsm/hooks.py M vdsm/kaxmlrpclib.py M vdsm/ksm.py M vdsm/libvirtconnection.py M vdsm/libvirtvm.py M vdsm/set-conf-item M vdsm/storage/blockSD.py M vdsm/storage/blockVolume.py M vdsm/storage/devicemapper.py M vdsm/storage/dispatcher.py M vdsm/storage/fileSD.py M vdsm/storage/fileUtils.py M vdsm/storage/fileVolume.py M vdsm/storage/fuser.py M vdsm/storage/hsm.py M vdsm/storage/image.py M vdsm/storage/iscsi.py M vdsm/storage/lvm.py M vdsm/storage/misc.py M vdsm/storage/mount.py M vdsm/storage/multipath.py M vdsm/storage/outOfProcess.py M vdsm/storage/processPool.py M vdsm/storage/resourceFactories.py M vdsm/storage/safelease.py M vdsm/storage/sd.py M vdsm/storage/sdc.py M vdsm/storage/sp.py M vdsm/storage/storage_connection.py M vdsm/storage/storage_mailbox.py M vdsm/storage/task.py M vdsm/storage/taskManager.py M vdsm/storage/volume.py M vdsm/substitute_constants.py M vdsm/supervdsm.py M vdsm/supervdsmServer.py M vdsm/ut/ivdsm.py M vdsm/utils.py M vdsm/vdsm M vdsm/vm.py M vdsm_cli/Makefile.am M vdsm_cli/vdsClient.py M vdsm_cli/vdscli.py.in M vdsm_hooks/directlun/after_vm_destroy.py M vdsm_hooks/directlun/before_vm_migrate_destination.py M vdsm_hooks/directlun/before_vm_start.py M vdsm_hooks/faqemu/before_vm_start.py M vdsm_hooks/hostusb/after_vm_destroy.py M vdsm_hooks/hostusb/before_vm_start.py M vdsm_hooks/hugepages/before_vm_migrate_destination.py M vdsm_hooks/hugepages/before_vm_start.py M vdsm_hooks/promisc/after_vm_start.py M vdsm_hooks/promisc/before_vm_destroy.py M vdsm_hooks/scratchpad/before_vm_start.py M vdsm_hooks/sriov/after_vm_destroy.py M vdsm_hooks/sriov/before_vm_start.py M vdsm_hooks/vhostmd/after_vm_destroy.py M vdsm_reg/deployUtil.py.in M vdsm_reg/engine.py M vdsm_reg/vdsm-reg-setup.in 73 files changed, 159 insertions(+), 133 deletions(-)
Approvals: Dan Kenigsberg: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/286 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I4baa573532e41f47bbb19a011856c876f851a2b6 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
vdsm-patches@lists.fedorahosted.org