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(a)linux.vnet.ibm.com>
> To: "VDSM Project Development" <vdsm-devel(a)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/0b23299f48c5a341b73f2b...
>
> --
> Thanks and best regards!
>
> Zhou Zheng Sheng / 周征晟
> E-mail: zhshzhou(a)linux.vnet.ibm.com
> Telephone: 86-10-82454397
>
> _______________________________________________
> vdsm-devel mailing list
> vdsm-devel(a)lists.fedorahosted.org
>
https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
>
--
Thanks and best regards!
Zhou Zheng Sheng / 周征晟
E-mail: zhshzhou(a)linux.vnet.ibm.com
Telephone: 86-10-82454397