Hi guys,
You may notice recently I work on porting VDSM to Ubuntu. I managed to run VDSM functional tests with some hacks in the code, then I documented the hacks and try to create long term solution patches for them [1].
I'm a bit stuck on the two files, vdsmd.init.in and vdsm.spec.in. I made a lot of small modifications to vdsmd.init.in to make it work in Ubuntu. Firstly I try to do it in the GNU autotools way to add more macros to this file, and make it adapt to Ubuntu. Then I find this file is already somewhat complicated, adding more macros to configure.ac and this file would make it worse. So I created a separate init file for Ubuntu based on vdsmd.init.in, but I find the structure and most part of the new file is the same as the original one. Dan suggests me break the init file into small functions and put the functions in vdsm-tool. I think this job may take long time and delay the process of porting VDSM. You can have a look at my modifications to this file at [2].
I have another idea. I can create a vdsm-contrib sub-directory under the VDSM source directory. Then put a vdsm-contrib/ubuntu/vdsmd.init.in.patch file in it. When the user build VDSM in Ubuntu, he can firstly patch the vdsmd.init.in. In this way we avoid creating more complicated macros and re-use the existing code. We do not have to maintain vdsmd.init.in.patch. There is no promise on this file to be patched cleanly in the long term. For now I can write new upates for vdsm-contrib/ubuntu temporarily. Once Ubuntu accept VDSM, we have them maintain the init file. How does this plan sound like?
As regarding to vdsm.spec.in, I find there are some shell scripts to be executed during/after the installation. When I'm on Ubuntu, I grab the scripts out of vdsm.spec and run them to make VDSM work. If I want to create .deb files, these scripts should be re-used. Otherwise the spec file for .deb contains duplicated content from spec file for .rpm. My idea is crab these script out of .spec.in and create standalone scripts like vdsm_postInstall.sh. Then we distribute these script in vdsm package and invoke them after installation.
If I could successfully port these two files, it would be a big step closer to my final goal. Could anyone gives me some suggestions? Really thanks.
[1] http://www.ovirt.org/VDSM_on_Ubuntu [2] https://github.com/edwardbadboy/vdsm-ubuntu/commit/0b23299f48c5a341b73f2bb2b...
Great work!
Can you please split commit to smaller, based on subject?
I see most can be submitted today upstream.
Change to vdsm/storage/12-vdsm-lvm.rules:
You should add the owner and group to configure.ac and rename the file to an .in suffix so that substitutes can happen. This can be merged today if defaults are the same.
Change to configure.ac and relevant also to the above...
You should add --with-user-qemu= to autoconf, with the default of qemu, same for group and any change between distributions, then you can go ahead and configure the package properly with built.
Change to tests/functional/xmlrpcTests.py
I do not know the code well, but it seems like you can ask for distribution name and perform the assignment accordingly.
Change to tests/run_tests.sh.in requires root, so I don't think it is wise... better just to fail test if the configfs is not mounted, asking user to make sure it is.
uninstall - I am not sure it is required at all.
Why did you change the order of the udev rules?
Change to vdsm/storage/multipath.py - please detect distribution at autoconf and handle right service.
Change to vdsm/storage/protect/spmstop.sh can be submitted now.
Can you please explain change to vdsm/utils.py?
I leave our the change for vdsm/vdsmd.init.in, as it needs much work, but we can leave as last task, it requires more detection using autoconf, and call common script.
Thank you, Alon
----- Original Message -----
From: "Zhou Zheng Sheng" zhshzhou@linux.vnet.ibm.com To: "VDSM Project Development" vdsm-devel@lists.fedorahosted.org Sent: Wednesday, March 20, 2013 12:00:57 PM Subject: [vdsm] Porting vdsmd.init.in and vdsm.spec.in to Ubuntu
Hi guys,
You may notice recently I work on porting VDSM to Ubuntu. I managed to run VDSM functional tests with some hacks in the code, then I documented the hacks and try to create long term solution patches for them [1].
I'm a bit stuck on the two files, vdsmd.init.in and vdsm.spec.in. I made a lot of small modifications to vdsmd.init.in to make it work in Ubuntu. Firstly I try to do it in the GNU autotools way to add more macros to this file, and make it adapt to Ubuntu. Then I find this file is already somewhat complicated, adding more macros to configure.ac and this file would make it worse. So I created a separate init file for Ubuntu based on vdsmd.init.in, but I find the structure and most part of the new file is the same as the original one. Dan suggests me break the init file into small functions and put the functions in vdsm-tool. I think this job may take long time and delay the process of porting VDSM. You can have a look at my modifications to this file at [2].
I have another idea. I can create a vdsm-contrib sub-directory under the VDSM source directory. Then put a vdsm-contrib/ubuntu/vdsmd.init.in.patch file in it. When the user build VDSM in Ubuntu, he can firstly patch the vdsmd.init.in. In this way we avoid creating more complicated macros and re-use the existing code. We do not have to maintain vdsmd.init.in.patch. There is no promise on this file to be patched cleanly in the long term. For now I can write new upates for vdsm-contrib/ubuntu temporarily. Once Ubuntu accept VDSM, we have them maintain the init file. How does this plan sound like?
As regarding to vdsm.spec.in, I find there are some shell scripts to be executed during/after the installation. When I'm on Ubuntu, I grab the scripts out of vdsm.spec and run them to make VDSM work. If I want to create .deb files, these scripts should be re-used. Otherwise the spec file for .deb contains duplicated content from spec file for .rpm. My idea is crab these script out of .spec.in and create standalone scripts like vdsm_postInstall.sh. Then we distribute these script in vdsm package and invoke them after installation.
If I could successfully port these two files, it would be a big step closer to my final goal. Could anyone gives me some suggestions? Really thanks.
[1] http://www.ovirt.org/VDSM_on_Ubuntu [2] https://github.com/edwardbadboy/vdsm-ubuntu/commit/0b23299f48c5a341b73f2bb2b...
-- Thanks and best regards!
Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397
vdsm-devel mailing list vdsm-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
on 03/20/2013 18:21, Alon Bar-Lev wrote:
Why did you change the order of the udev rules?
Thanks a lot for the suggestions, really helpful. I sent some patches to gerrit http://gerrit.ovirt.org/#/q/project:vdsm+branch:master+topic:ubuntu,n,z . Some is merged.
I change the order of the udev rules because there is a 85-lvm2.rules under Ubuntu /lib/udev/rules.d/, it sets the owner group of LV to "disk', preventing VDSM from chown-ing, reading, writing the LV. When I ran the functional tests, vdsm failed to access the LV. After I change the order of VDSM udev rules, the functional test works. Maybe you can give me some comments on http://gerrit.ovirt.org/#/c/12816/ . Thank you very much!
----- Original Message -----
From: "Zhou Zheng Sheng" zhshzhou@linux.vnet.ibm.com To: "VDSM Project Development" vdsm-devel@lists.fedorahosted.org Sent: Wednesday, March 20, 2013 12:00:57 PM Subject: [vdsm] Porting vdsmd.init.in and vdsm.spec.in to Ubuntu
Hi guys,
You may notice recently I work on porting VDSM to Ubuntu. I managed to run VDSM functional tests with some hacks in the code, then I documented the hacks and try to create long term solution patches for them [1].
I'm a bit stuck on the two files, vdsmd.init.in and vdsm.spec.in. I made a lot of small modifications to vdsmd.init.in to make it work in Ubuntu. Firstly I try to do it in the GNU autotools way to add more macros to this file, and make it adapt to Ubuntu. Then I find this file is already somewhat complicated, adding more macros to configure.ac and this file would make it worse. So I created a separate init file for Ubuntu based on vdsmd.init.in, but I find the structure and most part of the new file is the same as the original one. Dan suggests me break the init file into small functions and put the functions in vdsm-tool. I think this job may take long time and delay the process of porting VDSM. You can have a look at my modifications to this file at [2].
I have another idea. I can create a vdsm-contrib sub-directory under the VDSM source directory. Then put a vdsm-contrib/ubuntu/vdsmd.init.in.patch file in it. When the user build VDSM in Ubuntu, he can firstly patch the vdsmd.init.in. In this way we avoid creating more complicated macros and re-use the existing code. We do not have to maintain vdsmd.init.in.patch. There is no promise on this file to be patched cleanly in the long term. For now I can write new upates for vdsm-contrib/ubuntu temporarily. Once Ubuntu accept VDSM, we have them maintain the init file. How does this plan sound like?
As regarding to vdsm.spec.in, I find there are some shell scripts to be executed during/after the installation. When I'm on Ubuntu, I grab the scripts out of vdsm.spec and run them to make VDSM work. If I want to create .deb files, these scripts should be re-used. Otherwise the spec file for .deb contains duplicated content from spec file for .rpm. My idea is crab these script out of .spec.in and create standalone scripts like vdsm_postInstall.sh. Then we distribute these script in vdsm package and invoke them after installation.
If I could successfully port these two files, it would be a big step closer to my final goal. Could anyone gives me some suggestions? Really thanks.
[1] http://www.ovirt.org/VDSM_on_Ubuntu [2] https://github.com/edwardbadboy/vdsm-ubuntu/commit/0b23299f48c5a341b73f2bb2b...
-- Thanks and best regards!
Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397
vdsm-devel mailing list vdsm-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
On Wed, Mar 20, 2013 at 06:00:57PM +0800, Zhou Zheng Sheng wrote:
You can have a look at my modifications to this file at https://github.com/edwardbadboy/vdsm-ubuntu/commit/0b23299f48c5a341b73f2bb2b...
I know oVirt isn't using github to develop, but you could fork it from https://github.com/oVirt/vdsm so it's at least tracked.
----- Original Message -----
From: "Ewoud Kohl van Wijngaarden" ewoud@kohlvanwijngaarden.nl To: vdsm-devel@lists.fedorahosted.org Sent: Wednesday, March 20, 2013 2:31:35 PM Subject: Re: [vdsm] Porting vdsmd.init.in and vdsm.spec.in to Ubuntu
On Wed, Mar 20, 2013 at 06:00:57PM +0800, Zhou Zheng Sheng wrote:
You can have a look at my modifications to this file at https://github.com/edwardbadboy/vdsm-ubuntu/commit/0b23299f48c5a341b73f2bb2b...
I know oVirt isn't using github to develop, but you could fork it from https://github.com/oVirt/vdsm so it's at least tracked.
I don't think there is no difference between forking in github or cloning a repository, if changes are to be pushed eventually to gerrit.
Alon
vdsm-devel@lists.fedorahosted.org