From justin at redfish.com.au Fri Jul 2 08:25:43 2010 From: justin at redfish.com.au (Justin Clacherty) Date: Fri, 02 Jul 2010 18:25:43 +1000 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks Message-ID: <4C2DA287.7010100@redfish.com.au> Hi, I'm having some problems building ovirt. The build fails during the final ovirt build stage in the instructions. The failure is because it can't find "/usr/share/ovirt-node-tools/ovirt-node-recipe.ks". I've checked and sure enough it's not there. Has anyone else come across this problem? Building on FC13 using the instructions found here: https://fedorahosted.org/ovirt/wiki/Build The git clones were done today (02 July, 2010 Australian EST). Cheers, Justin. From dpierce at redhat.com Fri Jul 2 10:17:00 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Fri, 2 Jul 2010 06:17:00 -0400 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <4C2DA287.7010100@redfish.com.au> References: <4C2DA287.7010100@redfish.com.au> Message-ID: <20100702101700.GD3094@mcpierce-laptop.redhat.com> On Fri, Jul 02, 2010 at 06:25:43PM +1000, Justin Clacherty wrote: > Hi, > > I'm having some problems building ovirt. The build fails during the > final ovirt build stage in the instructions. The failure is because > it can't find "/usr/share/ovirt-node-tools/ovirt-node-recipe.ks". > I've checked and sure enough it's not there. Has anyone else come > across this problem? > > Building on FC13 using the instructions found here: > > https://fedorahosted.org/ovirt/wiki/Build > > The git clones were done today (02 July, 2010 Australian EST). I've fixed the wiki page to give the right command instruction, which is "make rpms". will generate the ovirt-node and ovirt-node-tools RPMs. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From justin at redfish.com.au Fri Jul 2 10:34:42 2010 From: justin at redfish.com.au (Justin Clacherty) Date: Fri, 02 Jul 2010 20:34:42 +1000 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <20100702101700.GD3094@mcpierce-laptop.redhat.com> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> Message-ID: <4C2DC0C2.9010904@redfish.com.au> On 07/02/2010 08:17 PM, Darryl L. Pierce wrote: > > I've fixed the wiki page to give the right command instruction, which is "make rpms". > will generate the ovirt-node and ovirt-node-tools RPMs. > "make rpms" fails for me. Justin. [root at ovirt ovirt]# make rpms make: *** No rule to make target `rpms'. Stop. From dpierce at redhat.com Fri Jul 2 10:43:21 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Fri, 2 Jul 2010 06:43:21 -0400 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <4C2DC0C2.9010904@redfish.com.au> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> Message-ID: <20100702104321.GE3094@mcpierce-laptop.redhat.com> On Fri, Jul 02, 2010 at 08:34:42PM +1000, Justin Clacherty wrote: > On 07/02/2010 08:17 PM, Darryl L. Pierce wrote: > > > >I've fixed the wiki page to give the right command instruction, which is "make rpms". > >will generate the ovirt-node and ovirt-node-tools RPMs. > > "make rpms" fails for me. > > Justin. > > [root at ovirt ovirt]# make rpms > make: *** No rule to make target `rpms'. Stop. Okay, then there's definitely something odd. I just did a complete build from a fresh clone of the repo: git clone ssh://git.fedorahosted.org/git/ovirt/node.git cd node git checkout -b next --track origin/next ./autogen.sh ./configure make rpms And it worked just fine. I have RPMs in my ~/rpmbuildsRPMS/{noarchs,x86_64} directories as expected. Can you verify that your environment has a Makefile in the node directory and that an error didn't happen after you ran ./configure, perhaps complaining about a missing package or library? -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From justin at redfish.com.au Fri Jul 2 11:00:14 2010 From: justin at redfish.com.au (Justin Clacherty) Date: Fri, 02 Jul 2010 21:00:14 +1000 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <20100702104321.GE3094@mcpierce-laptop.redhat.com> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> Message-ID: <4C2DC6BE.6050009@redfish.com.au> On 07/02/2010 08:43 PM, Darryl L. Pierce wrote: > > git clone ssh://git.fedorahosted.org/git/ovirt/node.git > cd node > git checkout -b next --track origin/next > ./autogen.sh > ./configure > make rpms > > > And it worked just fine. I have RPMs in my ~/rpmbuildsRPMS/{noarchs,x86_64} > directories as expected. Can you verify that your environment has a Makefile in the > node directory and that an error didn't happen after you ran ./configure, perhaps > complaining about a missing package or library? > my git clone was per the wiki ie. "git clone -b next ..." no --track From the node directory "make rpms" works fine. From the ovirt directory it doesn't. I'll yum remove everything, delete the ovirt directory and try again using the wiki. I think Alan is updating node-image.git to remove references to ovirt-node-recipe.ks as it's no longer supposed to be used so it might pay for me to wait until he's checked that in. Correct me if I'm wrong Alan. BTW, it looks as though you've updated the wiki to do a make rpms from the ovirt directory in the last stage, but the node build is still make publish. I'm guessing it should be make rpms as above. Cheers, Justin. From dpierce at redhat.com Fri Jul 2 11:40:22 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Fri, 2 Jul 2010 07:40:22 -0400 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <4C2DC6BE.6050009@redfish.com.au> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> <4C2DC6BE.6050009@redfish.com.au> Message-ID: <20100702114022.GF3094@mcpierce-laptop.redhat.com> On Fri, Jul 02, 2010 at 09:00:14PM +1000, Justin Clacherty wrote: > On 07/02/2010 08:43 PM, Darryl L. Pierce wrote: > > > >git clone ssh://git.fedorahosted.org/git/ovirt/node.git > >cd node > >git checkout -b next --track origin/next > >./autogen.sh > >./configure > >make rpms > > > > > >And it worked just fine. I have RPMs in my ~/rpmbuildsRPMS/{noarchs,x86_64} > >directories as expected. Can you verify that your environment has a Makefile in the > >node directory and that an error didn't happen after you ran ./configure, perhaps > >complaining about a missing package or library? > > my git clone was per the wiki ie. "git clone -b next ..." no --track > > From the node directory "make rpms" works fine. From the ovirt > directory it doesn't. AH! Okay, that make senses. The "rpms" target is a project specific one; i.e., we don't support the old ovirt-build/ovirt-release model any longer. > I'll yum remove everything, delete the ovirt > directory and try again using the wiki. I think Alan is updating > node-image.git to remove references to ovirt-node-recipe.ks as it's > no longer supposed to be used so it might pay for me to wait until > he's checked that in. Correct me if I'm wrong Alan. I'm also going to go through the wiki and clarify a few issue son it. > BTW, it looks as though you've updated the wiki to do a make rpms > from the ovirt directory in the last stage, but the node build is > still make publish. I'm guessing it should be make rpms as above. I'm going to fix a few things there, yeah. :) -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From justin at redfish.com.au Fri Jul 2 13:45:49 2010 From: justin at redfish.com.au (Justin Clacherty) Date: Fri, 02 Jul 2010 23:45:49 +1000 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <20100702114022.GF3094@mcpierce-laptop.redhat.com> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> <4C2DC6BE.6050009@redfish.com.au> <20100702114022.GF3094@mcpierce-laptop.redhat.com> Message-ID: <4C2DED8D.8020005@redfish.com.au> On 07/02/2010 09:40 PM, Darryl L. Pierce wrote: > > I'm going to fix a few things there, yeah. :) > I'm just starting from scratch using the new build instructions. The instructions clone the node and server repositories, should I be switching to the next branch as well? Cheers, Justin. From justin at redfish.com.au Fri Jul 2 14:17:24 2010 From: justin at redfish.com.au (Justin Clacherty) Date: Sat, 03 Jul 2010 00:17:24 +1000 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <4C2DED8D.8020005@redfish.com.au> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> <4C2DC6BE.6050009@redfish.com.au> <20100702114022.GF3094@mcpierce-laptop.redhat.com> <4C2DED8D.8020005@redfish.com.au> Message-ID: <4C2DF4F4.4020209@redfish.com.au> On 07/02/2010 11:45 PM, Justin Clacherty wrote: > On 07/02/2010 09:40 PM, Darryl L. Pierce wrote: >> >> I'm going to fix a few things there, yeah. :) > > I'm just starting from scratch using the new build instructions. The > instructions clone the node and server repositories, should I be > switching to the next branch as well? It appears I'm cursed :-) Building/Installing from the updated build instructions all goes well up to building the node iso. Now, in building the node iso it says to install ovirt-node-tools from the previous step, that works fine. Then go to node/recipe and run "make ovirt-node-image.iso". This fails complaining about missing kickstart files (see below). However, the missing file (repos.ks) was installed to /usr/share/ovirt-node-tools so I copied it from there and tried the build. It's runs a bit longer then fails because it is unable to find the ovirt-node package that was built in the previous step. Executing "yum list ovirt-node" shows that the newly built package is in the ovirt-local repository which is in the ovirt-cache directory pointed to by the environment variable. Justin. [root at ovirt recipe]# pwd /root/ovirt/node/recipe [root at ovirt recipe]# ls common-blacklist.ks common-pkgs.ks custom-template.ks Makefile.in version.ks common-install.ks common-post.ks Makefile node-creator common-manifest-post.ks common-post-nochroot.ks Makefile.am ovirt-node-image.ks [root at ovirt recipe]# make ovirt-node-image.iso ( \ echo "PRODUCT='"oVirt Node Hypervisor"'" ;\ echo "PACKAGE=ovirt-node-image" ;\ echo "VERSION=1.9.3" ;\ echo "RELEASE=" ;\ ) > version.ks node-creator ovirt-node-image.ks Failed to read kickstart file 'ovirt-node-image.ks' : The following problem occurred on line 0 of the kickstart file: Unable to open input kickstart file: Could not open/read file:///root/ovirt/node/recipe/repos.ks sed: can't read /root/ovirt-cache/node-creator-x86_64-tmp/ovirt-node-image.ks.tmp: No such file or directory cat: /root/ovirt-cache/node-creator-x86_64-tmp/ovirt-node-image.ks.tmp: No such file or directory /usr/lib/python2.6/site-packages/imgcreate/errors.py:40: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 return str(self.message) Traceback (most recent call last): File "/usr/bin/livecd-creator", line 140, in sys.exit(main()) File "/usr/bin/livecd-creator", line 114, in main creator = imgcreate.LiveImageCreator(ks, name, fs_label) File "/usr/lib/python2.6/site-packages/imgcreate/live.py", line 47, in __init__ LoopImageCreator.__init__(self, *args) File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 800, in __init__ ImageCreator.__init__(self, ks, name) File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 76, in __init__ self.__sanity_check() File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 395, in __sanity_check raise CreatorError("No packages or groups specified") imgcreate.errors.CreatorError: No packages or groups specified From justin at redfish.com.au Fri Jul 2 14:31:46 2010 From: justin at redfish.com.au (Justin Clacherty) Date: Sat, 03 Jul 2010 00:31:46 +1000 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <4C2DF4F4.4020209@redfish.com.au> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> <4C2DC6BE.6050009@redfish.com.au> <20100702114022.GF3094@mcpierce-laptop.redhat.com> <4C2DED8D.8020005@redfish.com.au> <4C2DF4F4.4020209@redfish.com.au> Message-ID: <4C2DF852.9010908@redfish.com.au> On 07/03/2010 12:17 AM, Justin Clacherty wrote: > However, the missing file (repos.ks) was installed to > /usr/share/ovirt-node-tools so I copied it from there and tried the > build. It's runs a bit longer then fails because it is unable to find > the ovirt-node package that was built in the previous step. Executing > "yum list ovirt-node" shows that the newly built package is in the > ovirt-local repository which is in the ovirt-cache directory pointed > to by the environment variable. The "repos.ks" that I copied had the following lines in it. repo --name=f13 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-13&arch=x86_64 repo --name=f13-updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f13&arch=x86_64 I figured that the build of the node tools should have created this file with the above lines as a base and then added a line to point to the local ovirt repository. Added the following line and tried to make the image again. repo --name=ovirt --baseurl=file:///root/ovirt-cache/ovirt It seems to be doing stuff now so I guess the node build isn't working quite the way it should. I had the OVIRT_CACHE_DIR environment variable set so I'm not sure what might have gone wrong. Cheers, Justin. From dpierce at redhat.com Fri Jul 2 16:44:23 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Fri, 2 Jul 2010 12:44:23 -0400 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <4C2DED8D.8020005@redfish.com.au> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> <4C2DC6BE.6050009@redfish.com.au> <20100702114022.GF3094@mcpierce-laptop.redhat.com> <4C2DED8D.8020005@redfish.com.au> Message-ID: <20100702164423.GC3174@mcpierce-laptop.redhat.com> On Fri, Jul 02, 2010 at 11:45:49PM +1000, Justin Clacherty wrote: > On 07/02/2010 09:40 PM, Darryl L. Pierce wrote: > > > >I'm going to fix a few things there, yeah. :) > > I'm just starting from scratch using the new build instructions. > The instructions clone the node and server repositories, should I be > switching to the next branch as well? That's normally preferable if you're going to do development. You can checkout the latest on master build that for the previous release. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From dpierce at redhat.com Fri Jul 2 16:45:54 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Fri, 2 Jul 2010 12:45:54 -0400 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <4C2DF4F4.4020209@redfish.com.au> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> <4C2DC6BE.6050009@redfish.com.au> <20100702114022.GF3094@mcpierce-laptop.redhat.com> <4C2DED8D.8020005@redfish.com.au> <4C2DF4F4.4020209@redfish.com.au> Message-ID: <20100702164554.GD3174@mcpierce-laptop.redhat.com> On Sat, Jul 03, 2010 at 12:17:24AM +1000, Justin Clacherty wrote: > On 07/02/2010 11:45 PM, Justin Clacherty wrote: > >On 07/02/2010 09:40 PM, Darryl L. Pierce wrote: > >> > >>I'm going to fix a few things there, yeah. :) > > > >I'm just starting from scratch using the new build instructions. > >The instructions clone the node and server repositories, should I > >be switching to the next branch as well? > > It appears I'm cursed :-) > > Building/Installing from the updated build instructions all goes > well up to building the node iso. Now, in building the node iso it > says to install ovirt-node-tools from the previous step, that works > fine. Then go to node/recipe and run "make ovirt-node-image.iso". > This fails complaining about missing kickstart files (see below). > > However, the missing file (repos.ks) was installed to > /usr/share/ovirt-node-tools so I copied it from there and tried the > build. It's runs a bit longer then fails because it is unable to > find the ovirt-node package that was built in the previous step. > Executing "yum list ovirt-node" shows that the newly built package > is in the ovirt-local repository which is in the ovirt-cache > directory pointed to by the environment variable. I'll doublecheck the Makefile, but it should be generating repos.ks automatically when you call the ovirt-node-image.iso target, since it's a dependency. In the meantime try: make make ovirt-node-image.iso since the repos.ks is the default target. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From apevec at gmail.com Fri Jul 2 19:18:08 2010 From: apevec at gmail.com (Alan Pevec) Date: Fri, 2 Jul 2010 21:18:08 +0200 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <20100702164554.GD3174@mcpierce-laptop.redhat.com> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> <4C2DC6BE.6050009@redfish.com.au> <20100702114022.GF3094@mcpierce-laptop.redhat.com> <4C2DED8D.8020005@redfish.com.au> <4C2DF4F4.4020209@redfish.com.au> <20100702164554.GD3174@mcpierce-laptop.redhat.com> Message-ID: Hi all, there was an inconsistency between ovirt-node.git and ovirt-node-image.git, few days ago I've pushed a change to ovirt-node/recipe w/o adjusting ovirt-node-image. This is fixed now, try with fresh checkouts from next branches: in ovirt-node: make publish then install fresh ovirt-node-tools in ovirt-node-image: make node You should get ovirt-node-image.iso Cheers, Alan From justin at redfish.com.au Sun Jul 4 15:40:53 2010 From: justin at redfish.com.au (Justin Clacherty) Date: Mon, 05 Jul 2010 01:40:53 +1000 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <20100702164554.GD3174@mcpierce-laptop.redhat.com> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> <4C2DC6BE.6050009@redfish.com.au> <20100702114022.GF3094@mcpierce-laptop.redhat.com> <4C2DED8D.8020005@redfish.com.au> <4C2DF4F4.4020209@redfish.com.au> <20100702164554.GD3174@mcpierce-laptop.redhat.com> Message-ID: <4C30AB85.2040805@redfish.com.au> On 07/03/2010 02:45 AM, Darryl L. Pierce wrote: > > I'll doublecheck the Makefile, but it should be generating repos.ks > automatically when you call the ovirt-node-image.iso target, since it's > a dependency. In the meantime try: > > make > make ovirt-node-image.iso > > since the repos.ks is the default target. > I did this and it made repos.ks however it would not make ovirt-node-image.iso because the repos.ks from the make did not have a line for the ovirt repository. I added the line from my previous mail and it worked. I think the build instructions require some rework. I started from scratch again and the current build instructions are insufficient to get an ovirt management server up and running. Here's what I did. - created a F13 VM with a minimal install - used yum to update to the latest packages - added the OVIRT_CACHE_DIR export to my .bash_profile (running as root on the VM) - cloned node.git and server.git and switched to the next branch - installed necessary tools to build per the last build instructions yum groupinstall "Fedora Packager" yum install git gcc autoconf automake ruby ruby-devel rubygem-gettext rubygem-rake rubygem-activeldap yum-fastestmirror libvirt-devel dbus-devel hal-devel python-devel python-setuptools pykickstart appliance-tools - created an ovirt-local.repo in /etc/yum.repos.d - cd to the node directory - ran ./autogen.sh (no errors) - ran ./configure (no errors) - ran "make publish" (no errors) - yum install ovirt-node-tools (installation successful) - cd to the recipe directory - make - edit repos.ks to add a line to point to the local ovirt repository - make ovirt-node-image.iso (no errors, iso created) Now the build instructions online finish there but we still need to build the server. - cd to server directory - ./autogen.sh (no errors) - ./configure (no errors) - make publish (no errors) - yum install ovirt-server-installer ovirt-server (installation successful) - ace -d install ovirt (fails) The ace install seems to fail when it gets to ipa-server still following up the error there but there are other errors. One is the lack of a ovirt-node-pxe.rpm or something like that. Before I troll through the 1500 lines of output from ace install can someone confirm that the procedure above should work on a freshly installed and updated F13 installation? Also, given that the ace install failed, is there a way to undo what it has done so I can retry it? Cheers, Justin. From justin at redfish.com.au Sun Jul 4 16:00:28 2010 From: justin at redfish.com.au (Justin Clacherty) Date: Mon, 05 Jul 2010 02:00:28 +1000 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <4C30AB85.2040805@redfish.com.au> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> <4C2DC6BE.6050009@redfish.com.au> <20100702114022.GF3094@mcpierce-laptop.redhat.com> <4C2DED8D.8020005@redfish.com.au> <4C2DF4F4.4020209@redfish.com.au> <20100702164554.GD3174@mcpierce-laptop.redhat.com> <4C30AB85.2040805@redfish.com.au> Message-ID: <4C30B01C.2080804@redfish.com.au> On 5/07/2010 1:40 AM, Justin Clacherty wrote: > > - yum install ovirt-server-installer ovirt-server (installation > successful) > - ace -d install ovirt (fails) I left out a step there, I also ran "ovirt-install" before running "ace -d install ovirt". Justin. From aclement at linagora.com Mon Jul 5 08:48:19 2010 From: aclement at linagora.com (=?UTF-8?q?Arthur=20Cl=C3=A9ment?=) Date: Mon, 5 Jul 2010 10:48:19 +0200 Subject: [Ovirt-devel] [PATCH] gettext initiation problem Thanks to Thibault Deloffre Message-ID: <1278319699-32190-1-git-send-email-aclement@linagora.com> From: root Signed-off-by: root --- src/app/controllers/application_controller.rb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb index 4c4666e..c7f8431 100644 --- a/src/app/controllers/application_controller.rb +++ b/src/app/controllers/application_controller.rb @@ -20,12 +20,13 @@ # Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. +require 'gettext_rails' class ApplicationController < ActionController::Base # FIXME: once all controller classes include this, remove here include ApplicationService -# init_gettext "ovirt" + init_gettext "ovirt" layout :choose_layout before_filter :is_logged_in, :get_help_section -- 1.7.0.1 From aclement at linagora.com Mon Jul 5 08:51:54 2010 From: aclement at linagora.com (=?UTF-8?q?Arthur=20Cl=C3=A9ment?=) Date: Mon, 5 Jul 2010 10:51:54 +0200 Subject: [Ovirt-devel] [PATCH] gettext initiation problem Thanks to Thibault Deloffre Message-ID: <1278319914-32586-1-git-send-email-aclement@linagora.com> From: root Signed-off-by: Arthur Cl??ment --- src/app/controllers/application_controller.rb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb index 4c4666e..c7f8431 100644 --- a/src/app/controllers/application_controller.rb +++ b/src/app/controllers/application_controller.rb @@ -20,12 +20,13 @@ # Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. +require 'gettext_rails' class ApplicationController < ActionController::Base # FIXME: once all controller classes include this, remove here include ApplicationService -# init_gettext "ovirt" + init_gettext "ovirt" layout :choose_layout before_filter :is_logged_in, :get_help_section -- 1.7.0.1 From aclement at linagora.com Mon Jul 5 08:55:23 2010 From: aclement at linagora.com (Arthur =?iso-8859-15?q?Cl=E9ment?=) Date: Mon, 5 Jul 2010 10:55:23 +0200 Subject: [Ovirt-devel] [PATCH] gettext initiation problem Thanks to Thibault Deloffre In-Reply-To: <1278319914-32586-1-git-send-email-aclement@linagora.com> References: <1278319914-32586-1-git-send-email-aclement@linagora.com> Message-ID: <201007051055.23407.aclement@linagora.com> This patch solve the problem of the empty forms (add storage, network...) On lundi 05 juillet 2010 10:51:54 Arthur Cl?ment wrote: > From: root > > > Signed-off-by: Arthur Cl??ment > --- > src/app/controllers/application_controller.rb | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/src/app/controllers/application_controller.rb > b/src/app/controllers/application_controller.rb index 4c4666e..c7f8431 > 100644 > --- a/src/app/controllers/application_controller.rb > +++ b/src/app/controllers/application_controller.rb > @@ -20,12 +20,13 @@ > # Filters added to this controller apply to all controllers in the > application. # Likewise, all the methods added will be available for all > controllers. > > +require 'gettext_rails' > > class ApplicationController < ActionController::Base > # FIXME: once all controller classes include this, remove here > include ApplicationService > > -# init_gettext "ovirt" > + init_gettext "ovirt" > layout :choose_layout > > before_filter :is_logged_in, :get_help_section -- Arthur CLEMENT Linagora Paris From aclement at linagora.com Mon Jul 5 09:46:54 2010 From: aclement at linagora.com (Arthur =?iso-8859-1?q?Cl=E9ment?=) Date: Mon, 5 Jul 2010 11:46:54 +0200 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: References: <4C2DA287.7010100@redfish.com.au> <20100702164554.GD3174@mcpierce-laptop.redhat.com> Message-ID: <201007051146.54788.aclement@linagora.com> Hello, If I'm not mistaken, ovirt-node-image.git is no more necessary to build the ovirt-node-image. I successfully builded an iso from node/recipe (I had to import and update repos.ks), but how can I get ovirt-node-image and ovirt-node-image-pxe packages with this new method ? PS : glad to see activity on the ML :) On vendredi 02 juillet 2010 21:18:08 Alan Pevec wrote: > Hi all, > > there was an inconsistency between ovirt-node.git and > ovirt-node-image.git, few days ago I've pushed a change to > ovirt-node/recipe w/o adjusting ovirt-node-image. This is fixed now, > try with fresh checkouts from next branches: > in ovirt-node: make publish then install fresh ovirt-node-tools > in ovirt-node-image: make node > You should get ovirt-node-image.iso > > Cheers, > Alan > > _______________________________________________ > Ovirt-devel mailing list > Ovirt-devel at redhat.com > https://www.redhat.com/mailman/listinfo/ovirt-devel -- Arthur CLEMENT Linagora Paris From dpierce at redhat.com Tue Jul 6 14:32:35 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Tue, 6 Jul 2010 10:32:35 -0400 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> <4C2DC6BE.6050009@redfish.com.au> <20100702114022.GF3094@mcpierce-laptop.redhat.com> <4C2DED8D.8020005@redfish.com.au> <4C2DF4F4.4020209@redfish.com.au> <20100702164554.GD3174@mcpierce-laptop.redhat.com> Message-ID: <20100706143234.GJ10500@mcpierce-desktop.usersys.redhat.com> On Fri, Jul 02, 2010 at 09:18:08PM +0200, Alan Pevec wrote: > Hi all, > > there was an inconsistency between ovirt-node.git and > ovirt-node-image.git, few days ago I've pushed a change to > ovirt-node/recipe w/o adjusting ovirt-node-image. This is fixed now, > try with fresh checkouts from next branches: > in ovirt-node: make publish then install fresh ovirt-node-tools > in ovirt-node-image: make node > You should get ovirt-node-image.iso ovirt-node-image.git is deprecated now. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From dpierce at redhat.com Tue Jul 6 14:34:52 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Tue, 6 Jul 2010 10:34:52 -0400 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <4C30AB85.2040805@redfish.com.au> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> <4C2DC6BE.6050009@redfish.com.au> <20100702114022.GF3094@mcpierce-laptop.redhat.com> <4C2DED8D.8020005@redfish.com.au> <4C2DF4F4.4020209@redfish.com.au> <20100702164554.GD3174@mcpierce-laptop.redhat.com> <4C30AB85.2040805@redfish.com.au> Message-ID: <20100706143452.GK10500@mcpierce-desktop.usersys.redhat.com> On Mon, Jul 05, 2010 at 01:40:53AM +1000, Justin Clacherty wrote: > - edit repos.ks to add a line to point to the local ovirt repository > - make ovirt-node-image.iso (no errors, iso created) Hrm. There used to be a check in the recipe to see if the release was 0 (development) and, if so, would use OVIRT_CACHE_DIR as one of the repos. > Now the build instructions online finish there but we still need to > build the server. > > - cd to server directory > - ./autogen.sh (no errors) > - ./configure (no errors) > - make publish (no errors) > - yum install ovirt-server-installer ovirt-server (installation successful) > - ace -d install ovirt (fails) > > The ace install seems to fail when it gets to ipa-server still > following up the error there but there are other errors. One is the > lack of a ovirt-node-pxe.rpm or something like that. Before I troll > through the 1500 lines of output from ace install can someone > confirm that the procedure above should work on a freshly installed > and updated F13 installation? Also, given that the ace install > failed, is there a way to undo what it has done so I can retry it? -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From justin at redfish.com.au Wed Jul 7 09:37:06 2010 From: justin at redfish.com.au (Justin Clacherty) Date: Wed, 07 Jul 2010 19:37:06 +1000 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <20100706143452.GK10500@mcpierce-desktop.usersys.redhat.com> References: <4C2DA287.7010100@redfish.com.au> <20100702101700.GD3094@mcpierce-laptop.redhat.com> <4C2DC0C2.9010904@redfish.com.au> <20100702104321.GE3094@mcpierce-laptop.redhat.com> <4C2DC6BE.6050009@redfish.com.au> <20100702114022.GF3094@mcpierce-laptop.redhat.com> <4C2DED8D.8020005@redfish.com.au> <4C2DF4F4.4020209@redfish.com.au> <20100702164554.GD3174@mcpierce-laptop.redhat.com> <4C30AB85.2040805@redfish.com.au> <20100706143452.GK10500@mcpierce-desktop.usersys.redhat.com> Message-ID: <4C344AC2.1080302@redfish.com.au> On 7/07/2010 12:34 AM, Darryl L. Pierce wrote: > > Hrm. There used to be a check in the recipe to see if the release was 0 > (development) and, if so, would use OVIRT_CACHE_DIR as one of the repos. Doesn't seem to work that way for me. >> Now the build instructions online finish there but we still need to >> build the server. >> >> - cd to server directory >> - ./autogen.sh (no errors) >> - ./configure (no errors) >> - make publish (no errors) >> - yum install ovirt-server-installer ovirt-server (installation successful) >> - ace -d install ovirt (fails) >> >> The ace install seems to fail when it gets to ipa-server still >> following up the error there but there are other errors. One is the >> lack of a ovirt-node-pxe.rpm or something like that. Before I troll >> through the 1500 lines of output from ace install can someone >> confirm that the procedure above should work on a freshly installed >> and updated F13 installation? Also, given that the ace install >> failed, is there a way to undo what it has done so I can retry it? Has anyone confirmed that the procedure at https://fedorahosted.org/ovirt/wiki/Build works for a freshly installed and updated F13 installation? I'd really like to get the latest version up and running. Cheers, Justin. From aclement at linagora.com Wed Jul 7 13:01:37 2010 From: aclement at linagora.com (Arthur =?iso-8859-1?q?Cl=E9ment?=) Date: Wed, 7 Jul 2010 15:01:37 +0200 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <4C344AC2.1080302@redfish.com.au> References: <4C2DA287.7010100@redfish.com.au> <20100706143452.GK10500@mcpierce-desktop.usersys.redhat.com> <4C344AC2.1080302@redfish.com.au> Message-ID: <201007071501.37584.aclement@linagora.com> Hi, This procedure partially works for me. I use ovirt with diskless & stateless nodes and I don't know how to build pxe images without git://git.fedorahosted.org/git/ovirt/node-image.git yet, so I still build with the deprecated method. There are still some patches waiting for commit approval (cf my last mails on the ML) but I'm using them right know. I have also : - a bug with host-register (cf mail 06/01/2010) (have to remove qpidd auth) - a bug with mongrel (cf patch 18/05/2010) - a bug with matahari (patch : https://bugzilla.redhat.com/show_bug.cgi?id=602975) A working ovirt on f13 is near ! On mercredi 07 juillet 2010 11:37:06 Justin Clacherty wrote: > Has anyone confirmed that the procedure at > https://fedorahosted.org/ovirt/wiki/Build works for a freshly installed > and updated F13 installation? I'd really like to get the latest version > up and running. > > Cheers, > Justin. > > > _______________________________________________ > Ovirt-devel mailing list > Ovirt-devel at redhat.com > https://www.redhat.com/mailman/listinfo/ovirt-devel -- Arthur CLEMENT Linagora Paris From dpierce at redhat.com Wed Jul 7 17:41:09 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Wed, 7 Jul 2010 13:41:09 -0400 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <201007071501.37584.aclement@linagora.com> References: <4C2DA287.7010100@redfish.com.au> <20100706143452.GK10500@mcpierce-desktop.usersys.redhat.com> <4C344AC2.1080302@redfish.com.au> <201007071501.37584.aclement@linagora.com> Message-ID: <20100707174109.GA3202@mcpierce-laptop.redhat.com> On Wed, Jul 07, 2010 at 03:01:37PM +0200, Arthur Cl?ment wrote: > Hi, > > This procedure partially works for me. I use ovirt with diskless & stateless nodes and I don't know how to build pxe images without > git://git.fedorahosted.org/git/ovirt/node-image.git yet, so I still build with the deprecated method. > > There are still some patches waiting for commit approval (cf my last mails on the ML) but I'm using them right know. > > I have also : > - a bug with host-register (cf mail 06/01/2010) (have to remove qpidd auth) > - a bug with mongrel (cf patch 18/05/2010) > - a bug with matahari (patch : https://bugzilla.redhat.com/show_bug.cgi?id=602975) There's now a candidate for this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=602975#c4 The issue is that the previous version of Matahari linked against the old Qpid/QMF libraries and not the new ones. This update should take care of that problem. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From pmialon at linagora.com Tue Jul 13 14:30:03 2010 From: pmialon at linagora.com (Pierre-Gilles Mialon) Date: Tue, 13 Jul 2010 16:30:03 +0200 Subject: [Ovirt-devel] [PATCH] gettext initiation problem Thanks to Thibault Deloffre In-Reply-To: <201007051055.23407.aclement@linagora.com> References: <1278319914-32586-1-git-send-email-aclement@linagora.com> <201007051055.23407.aclement@linagora.com> Message-ID: <201007131630.04327.pmialon@linagora.com> Le lundi 5 juillet 2010 10:55:23 Arthur Cl?ment, vous avez ?crit : > This patch solve the problem of the empty forms (add storage, network...) > > On lundi 05 juillet 2010 10:51:54 Arthur Cl?ment wrote: > > From: root > > > > > > Signed-off-by: Arthur Cl??ment > > --- > > > > src/app/controllers/application_controller.rb | 3 ++- > > 1 files changed, 2 insertions(+), 1 deletions(-) > > > > diff --git a/src/app/controllers/application_controller.rb > > b/src/app/controllers/application_controller.rb index 4c4666e..c7f8431 > > 100644 > > --- a/src/app/controllers/application_controller.rb > > +++ b/src/app/controllers/application_controller.rb > > @@ -20,12 +20,13 @@ > > > > # Filters added to this controller apply to all controllers in the > > > > application. # Likewise, all the methods added will be available for all > > controllers. > > > > +require 'gettext_rails' > > > > class ApplicationController < ActionController::Base > > > > # FIXME: once all controller classes include this, remove here > > include ApplicationService > > > > -# init_gettext "ovirt" > > + init_gettext "ovirt" > > > > layout :choose_layout > > > > before_filter :is_logged_in, :get_help_section ACK -- Pierre-Gilles Mialon Responsable h?bergement :: Head of Hosting services pmialon at linagora.com :: +33.1 46 96 63 58 Linagora :: http://www.linagora.com 74 rue Roque de Fillol :: 92800 Puteaux -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From aclement at linagora.com Tue Jul 13 15:27:29 2010 From: aclement at linagora.com (Arthur Clement) Date: Tue, 13 Jul 2010 17:27:29 +0200 Subject: [Ovirt-devel] [PATCH node] Kill persistent dhclient on the temporary interface Message-ID: <1279034849-18443-1-git-send-email-aclement@linagora.com> Signed-off-by: Arthur Clement --- scripts/ovirt-early | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/scripts/ovirt-early b/scripts/ovirt-early index 1c15792..6b510ca 100755 --- a/scripts/ovirt-early +++ b/scripts/ovirt-early @@ -43,6 +43,9 @@ configure_ovirt_management_nic() { log "Using interface $DEVICE" # setup temporary interface to retrieve configuration /sbin/dhclient $1 + # save dhclient PID for killing it later + dhclientPid=$( /sbin/pidof dhclient ) + fi if [ $? -eq 0 ]; then # from network-scripts/ifup-post @@ -97,7 +100,9 @@ configure_ovirt_management_nic() { log "Default config applied" fi - service network restart + service network stop + /bin/kill -9 $dhclientPid + service network start } -- 1.7.1 From apevec at gmail.com Tue Jul 13 15:55:10 2010 From: apevec at gmail.com (Alan Pevec) Date: Tue, 13 Jul 2010 17:55:10 +0200 Subject: [Ovirt-devel] [PATCH node] Kill persistent dhclient on the temporary interface In-Reply-To: <1279034849-18443-1-git-send-email-aclement@linagora.com> References: <1279034849-18443-1-git-send-email-aclement@linagora.com> Message-ID: On Tue, Jul 13, 2010 at 5:27 PM, Arthur Clement wrote: > > Signed-off-by: Arthur Clement > --- > ?scripts/ovirt-early | ? ?7 ++++++- > ?1 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/scripts/ovirt-early b/scripts/ovirt-early > index 1c15792..6b510ca 100755 > --- a/scripts/ovirt-early > +++ b/scripts/ovirt-early > @@ -43,6 +43,9 @@ configure_ovirt_management_nic() { > ? ? ? ? ? ? log "Using interface $DEVICE" > ? ? ? ? ? ? # setup temporary interface to retrieve configuration > ? ? ? ? ? ? /sbin/dhclient $1 nack, instead of saving PID and killing it, we could simply: - /sbin/dhclient $1 + /sbin/dhclient -1 $1 then there wouldn't be dhclient left running. > + ? ? ? ? ? # save dhclient PID for killing it later > + ? ? ? ? ? dhclientPid=$( /sbin/pidof dhclient ) > + > ? ? ? ? fi > ? ? ? ? if [ $? -eq 0 ]; then > ? ? ? ? ? ? # from network-scripts/ifup-post > @@ -97,7 +100,9 @@ configure_ovirt_management_nic() { > ? ? ? ? log "Default config applied" > ? ? fi > > - ? ?service network restart > + ? ?service network stop > + ? ?/bin/kill -9 $dhclientPid > + ? ?service network start > > ?} From apevec at gmail.com Tue Jul 13 17:35:20 2010 From: apevec at gmail.com (Alan Pevec) Date: Tue, 13 Jul 2010 19:35:20 +0200 Subject: [Ovirt-devel] [PATCH node] Kill persistent dhclient on the temporary interface In-Reply-To: References: <1279034849-18443-1-git-send-email-aclement@linagora.com> Message-ID: On Tue, Jul 13, 2010 at 5:55 PM, Alan Pevec wrote: > - ? ? ? ? ? ? /sbin/dhclient $1 > + ? ? ? ? ? ? /sbin/dhclient -1 $1 > > then there wouldn't be dhclient left running. I jumped the gun, -1 still keeps dhclient running in the background if there wasn't failure. Correct patch is: - /sbin/dhclient $1 + /sbin/dhclient -1 $1 \ + && [ -f /var/run/dhclient.pid ] \ + && kill $(cat /var/run/dhclient.pid) Address is already set when dhclient returns, so we can kill it immediately. From aclement at linagora.com Thu Jul 15 12:30:01 2010 From: aclement at linagora.com (Arthur =?iso-8859-1?q?Cl=E9ment?=) Date: Thu, 15 Jul 2010 14:30:01 +0200 Subject: [Ovirt-devel] [PATCH node] Kill persistent dhclient on the temporary interface In-Reply-To: References: <1279034849-18443-1-git-send-email-aclement@linagora.com> Message-ID: <201007151430.01760.aclement@linagora.com> Works great. I'll submit the patch ASAP On mardi 13 juillet 2010 19:35:20 Alan Pevec wrote: > On Tue, Jul 13, 2010 at 5:55 PM, Alan Pevec wrote: > > - /sbin/dhclient $1 > > + /sbin/dhclient -1 $1 > > > > then there wouldn't be dhclient left running. > > I jumped the gun, -1 still keeps dhclient running in the background if > there wasn't failure. > Correct patch is: > - /sbin/dhclient $1 > + /sbin/dhclient -1 $1 \ > + && [ -f /var/run/dhclient.pid ] \ > + && kill $(cat /var/run/dhclient.pid) > > Address is already set when dhclient returns, so we can kill it > immediately. -- Arthur CLEMENT Linagora Paris From apevec at redhat.com Thu Jul 15 13:28:20 2010 From: apevec at redhat.com (Alan Pevec) Date: Thu, 15 Jul 2010 15:28:20 +0200 Subject: [Ovirt-devel] [PATCH ovirt-node] configure_ovirt_management_nic: dhclient cleanup In-Reply-To: <201007151430.01760.aclement@linagora.com> References: <201007151430.01760.aclement@linagora.com> Message-ID: <1279200500-26304-1-git-send-email-apevec@redhat.com> kill dhclient immediatelly after getting the address to avoid conflict with network restart later when configuration is applied Signed-off-by: Alan Pevec --- scripts/ovirt-early | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/scripts/ovirt-early b/scripts/ovirt-early index 4e114b5..6dc8bee 100755 --- a/scripts/ovirt-early +++ b/scripts/ovirt-early @@ -42,7 +42,9 @@ configure_ovirt_management_nic() { if ! network_up ; then log "Using interface $DEVICE" # setup temporary interface to retrieve configuration - /sbin/dhclient $1 + /sbin/dhclient -1 $1 \ + && [ -f /var/run/dhclient.pid ] \ + && kill $(cat /var/run/dhclient.pid) fi if [ $? -eq 0 ]; then # from network-scripts/ifup-post -- 1.7.1.1 From aclement at linagora.com Thu Jul 15 13:49:18 2010 From: aclement at linagora.com (Arthur =?iso-8859-1?q?Cl=E9ment?=) Date: Thu, 15 Jul 2010 15:49:18 +0200 Subject: [Ovirt-devel] [PATCH ovirt-node] configure_ovirt_management_nic: dhclient cleanup In-Reply-To: <1279200500-26304-1-git-send-email-apevec@redhat.com> References: <201007151430.01760.aclement@linagora.com> <1279200500-26304-1-git-send-email-apevec@redhat.com> Message-ID: <201007151549.19008.aclement@linagora.com> ACK On jeudi 15 juillet 2010 15:28:20 Alan Pevec wrote: > kill dhclient immediatelly after getting the address to avoid > conflict with network restart later when configuration is applied > > Signed-off-by: Alan Pevec > --- > scripts/ovirt-early | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/scripts/ovirt-early b/scripts/ovirt-early > index 4e114b5..6dc8bee 100755 > --- a/scripts/ovirt-early > +++ b/scripts/ovirt-early > @@ -42,7 +42,9 @@ configure_ovirt_management_nic() { > if ! network_up ; then > log "Using interface $DEVICE" > # setup temporary interface to retrieve configuration > - /sbin/dhclient $1 > + /sbin/dhclient -1 $1 \ > + && [ -f /var/run/dhclient.pid ] \ > + && kill $(cat /var/run/dhclient.pid) > fi > if [ $? -eq 0 ]; then > # from network-scripts/ifup-post -- Arthur CLEMENT Linagora Paris From aclement at linagora.com Mon Jul 19 14:11:25 2010 From: aclement at linagora.com (Arthur =?iso-8859-15?q?Cl=E9ment?=) Date: Mon, 19 Jul 2010 16:11:25 +0200 Subject: [Ovirt-devel] [PATCH] gettext initiation problem Thanks to Thibault Deloffre In-Reply-To: <201007131630.04327.pmialon@linagora.com> References: <1278319914-32586-1-git-send-email-aclement@linagora.com> <201007051055.23407.aclement@linagora.com> <201007131630.04327.pmialon@linagora.com> Message-ID: <201007191611.25387.aclement@linagora.com> Pushed On mardi 13 juillet 2010 16:30:03 Pierre-Gilles Mialon wrote: > Le lundi 5 juillet 2010 10:55:23 Arthur Cl?ment, vous avez ?crit : > > This patch solve the problem of the empty forms (add storage, network...) > > > > On lundi 05 juillet 2010 10:51:54 Arthur Cl?ment wrote: > > > From: root > > > > > > > > > Signed-off-by: Arthur Cl??ment > > > --- > > > > > > src/app/controllers/application_controller.rb | 3 ++- > > > 1 files changed, 2 insertions(+), 1 deletions(-) > > > > > > diff --git a/src/app/controllers/application_controller.rb > > > b/src/app/controllers/application_controller.rb index 4c4666e..c7f8431 > > > 100644 > > > --- a/src/app/controllers/application_controller.rb > > > +++ b/src/app/controllers/application_controller.rb > > > @@ -20,12 +20,13 @@ > > > > > > # Filters added to this controller apply to all controllers in the > > > > > > application. # Likewise, all the methods added will be available for > > > all controllers. > > > > > > +require 'gettext_rails' > > > > > > class ApplicationController < ActionController::Base > > > > > > # FIXME: once all controller classes include this, remove here > > > include ApplicationService > > > > > > -# init_gettext "ovirt" > > > + init_gettext "ovirt" > > > > > > layout :choose_layout > > > > > > before_filter :is_logged_in, :get_help_section > > ACK -- Arthur CLEMENT Linagora Paris From aclement at linagora.com Tue Jul 20 14:57:19 2010 From: aclement at linagora.com (Arthur Clement) Date: Tue, 20 Jul 2010 16:57:19 +0200 Subject: [Ovirt-devel] [PATCH] Remove obsolete packages (nash and rhpl) Message-ID: <1279637839-29339-1-git-send-email-aclement@linagora.com> Signed-off-by: Arthur Clement --- recipe/common-pkgs.ks | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/recipe/common-pkgs.ks b/recipe/common-pkgs.ks index 7578335..f5785ce 100644 --- a/recipe/common-pkgs.ks +++ b/recipe/common-pkgs.ks @@ -49,7 +49,6 @@ newt-python -newt -kudzu -libselinux-python --rhpl -kbd -usermode -fedora-logos @@ -63,7 +62,6 @@ generic-logos -less -which -parted --nash -tar -libuser -mtools -- 1.7.1 From aclement at linagora.com Tue Jul 20 15:53:09 2010 From: aclement at linagora.com (Arthur Clement) Date: Tue, 20 Jul 2010 17:53:09 +0200 Subject: [Ovirt-devel] [PATCH] Solve update problems Thanks to Thibault Deloffre Message-ID: <1279641189-2977-1-git-send-email-aclement@linagora.com> Patch in production for six months Signed-off-by: Arthur Clement --- src/host-collect/host-collect.rb | 79 ++++++++++++++++++++++---------------- 1 files changed, 46 insertions(+), 33 deletions(-) diff --git a/src/host-collect/host-collect.rb b/src/host-collect/host-collect.rb index 1694191..b3abca8 100755 --- a/src/host-collect/host-collect.rb +++ b/src/host-collect/host-collect.rb @@ -1,7 +1,7 @@ #!/usr/bin/ruby # -# Copyright (C) 2008 Red Hat, Inc. -# Written by Ian Main +#1;2000;0c Copyright (C) 2008 Red Hat, Inc. +#1;2000;0c Written by Ian Main # # 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 @@ -55,14 +55,17 @@ if do_daemon daemonize end -f = UNIXSocket.new("/var/lib/collectd/unixsock") database_connect loop do + f = UNIXSocket.new("/var/lib/collectd/unixsock") + f.write("LISTVAL\n") + puts("****** SOCKET asked ******") count = f.gets + puts("****** SOCKET return #{count} ******") count = count.to_i vals = [] @@ -71,39 +74,49 @@ loop do vals.push(value) count = count - 1 end - - for val in vals do - timestamp, keystring = val.split(" ") - - hostname,plugin,type = keystring.split("/") - - if plugin == "load" and type == "load" - f.write("GETVAL #{keystring}\n") - valuestring = f.gets - - values = valuestring.split("=") - if values.length != 4 - puts("GACK! Should have 4 values for load") - next - end - short = values[1].to_f - med = values[2].to_f - long = values[3].to_f - - # You only see this in non-daemon mode.. - puts("hostname: #{hostname} --> short: #{short}, med: #{med}, long: #{long}") - - # We have our values now, just need to update the db. - host = Host.find(:first, :conditions => [ "hostname = ?", hostname]) - if host == nil - puts("GACK! No such host in database: #{hostname}") - else - host.load_average = med - host.save + + if (vals.length > 0) + for val in vals do + timestamp, keystring = val.split(" ") + + hostname,plugin,type = keystring.split("/") + + if plugin == "load" and type == "load" + puts("KEYSTRING -> #{keystring}") + f.write("GETVAL #{keystring}\n") + valuestring = f.gets + 3.times { + valuestring += f.gets + } + + puts(" ------------------- VALUESTRING:: #{valuestring}") + values = valuestring.split("=") + if values.length != 4 + puts("GACK! Should have 4 values for load") + next + end + short = values[1].to_f + med = values[2].to_f + long = values[3].to_f + + # You only see this in non-daemon mode.. + puts("hostname: #{hostname} --> short: #{short}, med: #{med}, long: #{long}") + + # We have our values now, just need to update the db. + host = Host.find(:first, :conditions => [ "hostname = ?", hostname]) + if host == nil + puts("GACK! No such host in database: #{hostname}") + else + host.load_average = short + host.save + + end end end end - + + puts("****** SLEEP ******") + f.close sleep sleeptime end -- 1.7.1 From aclement at linagora.com Wed Jul 21 09:27:14 2010 From: aclement at linagora.com (Arthur Clement) Date: Wed, 21 Jul 2010 11:27:14 +0200 Subject: [Ovirt-devel] [PATCH] Get timestamp at check_heartbeat to avoid time lag Message-ID: <1279704434-17237-1-git-send-email-aclement@linagora.com> Avoid time lag and disconnection after several checks Signed-off-by: Arthur Clement --- src/host-browser/host-register.rb | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/host-browser/host-register.rb b/src/host-browser/host-register.rb index e49f08e..693a6f2 100755 --- a/src/host-browser/host-register.rb +++ b/src/host-browser/host-register.rb @@ -178,6 +178,7 @@ class HostRegister < Qmf::ConsoleHandler def agent_disconnected(agent) synchronize do debugputs "Marking objects for agent #{agent.key} inactive" + @logger.info "Marking objects for agent #{agent.key} inactive" @cached_hosts.keys.each do |objkey| if @cached_hosts[objkey][:agent_key] == agent.key cached_host = @cached_hosts[objkey] @@ -435,10 +436,10 @@ class HostRegister < Qmf::ConsoleHandler while true sleep(5) synchronize do - # Get seconds from the epoch - t = Time.new.to_i @heartbeats.keys.each do | key | + # Get seconds from the epoch + t = Time.new.to_i agent, timestamp = @heartbeats[key] # Heartbeats from qpid are in microseconds, we just need seconds.. @@ -447,7 +448,7 @@ class HostRegister < Qmf::ConsoleHandler if delta > 30 # No heartbeat for 30 seconds.. deal with dead/disconnected agent. - debugputs "Agent #{key} timed out!" + @logger.info "Agent #{key} timed out! Check NTP || with delta #{delta} = t #{t} - s #{s}" @heartbeats.delete(key) agent_disconnected(agent) -- 1.7.1 From aclement at linagora.com Wed Jul 21 09:54:51 2010 From: aclement at linagora.com (Arthur Clement) Date: Wed, 21 Jul 2010 11:54:51 +0200 Subject: [Ovirt-devel] [PATCH] Add support for tagged VLAN Message-ID: <1279706091-20184-1-git-send-email-aclement@linagora.com> VLAN are supported with this patch from Patrick Guiran Setup instructions coming soon (https://fedorahosted.org/ovirt/wiki/VLANSetup) Signed-off-by: Arthur Clement --- src/lib/managed_node_configuration.rb | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/src/lib/managed_node_configuration.rb b/src/lib/managed_node_configuration.rb index fac653b..47360c0 100644 --- a/src/lib/managed_node_configuration.rb +++ b/src/lib/managed_node_configuration.rb @@ -95,6 +95,21 @@ class ManagedNodeConfiguration nic.netmask, nic.broadcast, nic.gateway) add_nic(result, nic.mac, iface_name) + + # process the vlan tagging + + nic.network.usages.map do |usage| + usage.networks.map do |net| + if net.type == "Vlan" + eth_vlan_name = "#{nic.interface_name}.#{net.number}" + add_bridge(result, 'none', eth_vlan_name, + nic.boot_protocol, nic.ip_address, + nic.netmask, nic.broadcast, + nic.gateway) + add_vlan(result, eth_vlan_name) + end + end # end of : usage.networks.map do |net| + end # end of : nic.network.usages.map do |usage| end end end @@ -121,4 +136,9 @@ class ManagedNodeConfiguration def self.add_slave(result, mac, iface_name, master) result.puts "ifcfg=#{mac}|#{iface_name}|MASTER=#{master}|SLAVE=yes|ONBOOT=yes" end + + def self.add_vlan(result, iface_name) + result.puts "ifcfg=none|#{iface_name}|BRIDGE=br#{iface_name}|ONBOOT=yes|VLAN=yes" + end + end -- 1.7.1 From aclement at linagora.com Wed Jul 21 15:27:25 2010 From: aclement at linagora.com (Arthur Clement) Date: Wed, 21 Jul 2010 17:27:25 +0200 Subject: [Ovirt-devel] [PATCH] Add vlan support in taskomatic Patch from Patrick Guiran Message-ID: <1279726045-21361-1-git-send-email-aclement@linagora.com> Signed-off-by: Arthur Clement --- src/task-omatic/taskomatic.rb | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb index 7de725d..1fb8132 100755 --- a/src/task-omatic/taskomatic.rb +++ b/src/task-omatic/taskomatic.rb @@ -376,20 +376,36 @@ class TaskOmatic # loop through each nic/network assigned to vm, # finding necessary host devices to bridge net_interfaces = [] + device_interface_name = nil db_vm.nics.each { |nic| device = net_device = nil if nic.network.class == PhysicalNetwork device = Nic.find(:first, :conditions => ["host_id = ? AND network_id = ?", db_host.id, nic.network_id ]) + device_interface_name = device.interface_name else device = Bonding.find(:first, :conditions => ["host_id = ? AND vlan_id = ?", db_host.id, nic.network_id ]) + # here we should check if in usage group associate to this lan + # we can find a lan that match ... + if device + device_interface_name = device.interface_name + else + # tag du vlan = nic.netwoerk.number + usage = nic.network.usages.first + db_host.nics.map do |n| + if n.network and n.network.usages.first == usage + device_interface_name = "#{n.interface_name}.#{nic.network.number}" + break + end + end + end end - unless device.nil? - net_device = "br" + device.interface_name + if device_interface_name + net_device = "br" + device_interface_name else net_device = "breth0" # FIXME remove this default at some point end -- 1.7.1 From matinata at br.ibm.com Wed Jul 21 18:27:59 2010 From: matinata at br.ibm.com (Ricardo Marin Matinata) Date: Wed, 21 Jul 2010 15:27:59 -0300 Subject: [Ovirt-devel] [PATCH] RFC: Advanced Storage Configuration Message-ID: <1279736879-14593-1-git-send-email-matinata@br.ibm.com> This patch introduces the concept of an "Advanced Storage Configuration", specifically for automated installs (although it could be hooked into manual install), while preserving the original style of specifying LVs. It accomplishes the following: * Add an optional AppVG * Offer new optional LVs - Data2,Swap2 - as part of the new AppVG * Allows the specification of multiple disks, per VG The new syntax for ovirt_init, which includes the original one, is: virt_init=HOSTVGDISK1[,HOSTVGDISK2...][;APPVGDISK1[,APPVGDISK2...]] where DISK=[usb|scsi[:serial#]|/dev/...] The new syntax for ovirt_vol, which includes the original one, is: ovirt_vol=size[,{Swap|Data|Config|Logging|Data2|Swap2}][:size...] or simply ovirt_vol=BOOT_MB:SWAP_MB:ROOT_MB:CONFIG_MB:LOGGING_MB:DATA_MB:SWAP2_MB:DATA2_MB Signed-off-by: Ricardo Marin Matinata --- recipe/common-post.ks | 1 + scripts/ovirt-config-storage | 316 +++++++++++++++++++++++++++++++++--------- scripts/ovirt-early | 205 +++++++++++++++++++++++----- scripts/ovirt-functions | 17 +++ 4 files changed, 442 insertions(+), 97 deletions(-) diff --git a/recipe/common-post.ks b/recipe/common-post.ks index fed5b6b..c79e186 100644 --- a/recipe/common-post.ks +++ b/recipe/common-post.ks @@ -217,6 +217,7 @@ sed -i 's at NOT_OVIRT_FIRSTBOOT@$(if cat /proc/cmdline|grep -qv ovirt_firstboot; t mkdir -p /boot mkdir -p /config mkdir -p /data +mkdir -p /data2 mkdir -p /liveos echo "/dev/HostVG/Config /config ext3 defaults,noauto,noatime 0 0" >> /etc/fstab diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage index 513a240..e3bb57b 100755 --- a/scripts/ovirt-config-storage +++ b/scripts/ovirt-config-storage @@ -30,6 +30,8 @@ default_config_size=5 default_logging_size=2048 # -1 indicates data partition should use remaining disk default_data_size=-1 +default_swap2_size=0 +default_data2_size=0 boot_min_size=50 root_min_size=256 config_min_size=5 @@ -123,6 +125,10 @@ check_partition_sizes() if [ "$DATA_SIZE" = -1 ]; then min_data_size=5 fi + local min_data2_size="$DATA2_SIZE" + if [ "$DATA_SIZE2" = -1 ]; then + min_data_size=5 + fi printf "\n" if [ "$OVIRT_ISCSI_ENABLED" = "y" ]; then @@ -131,7 +137,27 @@ check_partition_sizes() BOOT_NEED_SIZE="$BOOT_SIZE" else get_drive_size "$ROOTDRIVE" ROOTDRIVESPACE - get_drive_size "$HOSTVGDRIVE" HOSTVGDRIVESPACE + for drv in $HOSTVGDRIVE; do + get_drive_size "$drv" DRIVESPACE + if [ -n "${HOSTVGDRIVESPACE}" ]; then + HOSTVGDRIVESPACE=$(echo "scale=0;" \ + "$HOSTVGDRIVESPACE + $DRIVESPACE" | bc -l) + else + HOSTVGDRIVESPACE=$DRIVESPACE + fi + done + if [ -n "${APPVGDRIVE}" ]; then + for drv in $APPVGDRIVE; do + get_drive_size "$drv" DRIVESPACE + if [ -n "${APPVGDRIVESPACE}" ]; then + APPVGDRIVESPACE=$(echo "scale=0;" \ + "$APPVGDRIVESPACE + $DRIVESPACE" | bc -l) + else + APPVGDRIVESPACE=$DRIVESPACE + fi + done + APPVG_NEED_SIZE=$(echo "scale=0; $SWAP2_SIZE + $min_data2_size" | bc -l) + fi ROOT_NEED_SIZE=$(echo "scale=0; $ROOT_SIZE * 2"| bc -l) HOSTVG_NEED_SIZE=$(echo "scale=0;" \ "$SWAP_SIZE + $CONFIG_SIZE + $LOGGING_SIZE + $min_data_size" | bc -l) @@ -141,6 +167,13 @@ check_partition_sizes() ROOT_NEED_SIZE=$(echo "scale=0; $ROOT_SIZE * 2 + $HOSTVG_NEED_SIZE"| bc -l) else drive_list="ROOT HOSTVG" + eval $(printf $HOSTVGDRIVE |awk '{ print "DRIVE="$1; }') + if [ "$ROOTDRIVE" = "$DRIVE" ]; then + HOSTVGDRIVESPACE=$(echo "scale=0; $HOSTVGDRIVESPACE - $ROOT_NEED_SIZE"| bc -l) + fi + fi + if [ -n "${APPVGDRIVE}" ]; then + drive_list="${drive_list} APPVG" fi fi @@ -489,22 +522,33 @@ EOF return ${is_negative-0} } -#Check for an existing HostVG on any device on the system. -# Return 0 if there is a HostVG found, unless only one found is on $1 +#Check for an existing VG on any device on the system. +# Return 0 if there is a VG found, unless the only one found is on $1 # Return 1 if no HostVG found or only found on $1 # XXX # from check_partition_sizes(): # if [ "$OVIRT_ISCSI_ENABLED" != "y" ]; then check_existing_hostvg() { - local install_dev="$1" + local install_dev= + local dev= + for dev in $1; do + if [ -n "${install_dev}" ]; then + install_dev="${install_dev}+|${dev}" + else + install_dev="${dev}" + fi + done local devices_var=$2 + local vgname= + { [ -n $3 ] && vgname="$3"; } || vgname="HostVG" + if [ -z "$install_dev" ]; then devices="$(pvs --separator="${TAB}" -o pv_name,vg_name --noheadings | \ - grep "HostVG" | cut -f1)" + grep "${vgname}" | cut -f1)" else devices="$(pvs --separator="${TAB}" -o pv_name,vg_name --noheadings | \ - grep -v "${install_dev}" | grep "HostVG" | cut -f1)" + egrep -v "${install_dev}" | grep "${vgname}" | cut -f1)" fi rc=1 if [ -n "$devices" ]; then @@ -531,15 +575,29 @@ check_existing_hostvg() # - remove LVM volumes and groups wipe_lvm_on_disk() { - local dev=${1-"$HOSTVGDRIVE"} + local devs=${1-"$HOSTVGDRIVE"} + local query1= + local query2= unmount_logging - local part_delim="p" - if [[ "$dev" =~ "/dev/sd" ]]; then - part_delim="" - fi - for vg in $(pvs -o vg_uuid --noheadings "$dev" "$dev${dev_delim}[0-9]"* 2>/dev/null|sort -u); do + for d in $devs; do + local part_delim="p" + if [[ "$d" =~ "/dev/sd" ]]; then + part_delim="" + fi + if [ -n "${query1}" ]; then + query1="${query1} ${d} ${d}${part_delim}[0-9]*" + else + query1="${d} ${d}${part_delim}[0-9]*" + fi + if [ -n "${query2}" ]; then + query2="${query2}+|${d}${part_delim}[0-9]+|${d}" + else + query2="${d}${part_delim}[0-9]+|${d}" + fi + done + for vg in $(pvs -o vg_uuid --noheadings "$query1" 2>/dev/null|sort -u); do if pvs -o pv_name,vg_uuid --noheadings | \ - grep "$vg" | egrep -v -q "${dev}${part_delim}[0-9]+|${dev} " 2>/dev/null; then + grep "$vg" | egrep -v -q "${query2} " 2>/dev/null; then log "The volume group \"$vg\" spans multiple disks." log "This operation cannot complete. Please manually" log "cleanup the storage using standard disk tools." @@ -569,48 +627,52 @@ reread_partitions() create_hostvg() { - log "Creating LVM partition" - - if [ "$ROOTDRIVE" = "$HOSTVGDRIVE" ]; then - parted "$HOSTVGDRIVE" -s "mkpart primary ext2 ${RootBackup_end}M -1" - hostvgpart="3" - elif [ "$BOOTDRIVE" = "$HOSTVGDRIVE" ]; then - parted "$HOSTVGDRIVE" -s "mkpart primary ext2 ${boot_size_si} -1" - hostvgpart="2" - # FIXME : set for gtpsync/parted compat for now - ROOTDRIVE=$BOOTDRIVE - else - parted "$HOSTVGDRIVE" -s "mkpart primary ext2 0M -1" - hostvgpart="1" - fi - log "Toggling LVM on" - parted "$HOSTVGDRIVE" -s "set $hostvgpart lvm on" - parted "$ROOTDRIVE" -s "print" - udevadm settle 2> /dev/null || udevsettle - reread_partitions "$HOSTVGDRIVE" + log "Creating LVM partition(s) for HostVG" + local drv= + for drv in $HOSTVGDRIVE; do + if [ "$ROOTDRIVE" = "$drv" ]; then + parted "$drv" -s "mkpart primary ext2 ${RootBackup_end}M -1" + hostvgpart="3" + elif [ "$BOOTDRIVE" = "$drv" ]; then + parted "$drv" -s "mkpart primary ext2 ${boot_size_si} -1" + hostvgpart="2" + # FIXME : set for gtpsync/parted compat for now + ROOTDRIVE=$BOOTDRIVE + else + parted "$drv" -s "mkpart primary ext2 0M -1" + hostvgpart="1" + fi + log "Toggling LVM on" + parted "$drv" -s "set $hostvgpart lvm on" + parted "$ROOTDRIVE" -s "print" + udevadm settle 2> /dev/null || udevsettle + reread_partitions "$drv" + + # sync GPT to the legacy MBR partitions + if [ "${OVIRT_INSTALL_ROOT}" = "y" -a ${hostvgpart} -gt 1 ]; then + if [ "gpt" = "$LABEL_TYPE" ]; then + log "Running gptsync to create legacy mbr" + gptsync "$ROOTDRIVE" + fi + fi - # sync GPT to the legacy MBR partitions - if [ "${OVIRT_INSTALL_ROOT}" = "y" ]; then - if [ "gpt" = "$LABEL_TYPE" ]; then - log "Running gptsync to create legacy mbr" - gptsync "$ROOTDRIVE" + partpv="${drv}${hostvgpart}" + if [ ! -e "$partpv" ]; then + # e.g. /dev/cciss/c0d0p2 + partpv="${drv}p${hostvgpart}" fi - fi + log "Creating physical volume" + if [ ! -e "$partpv" ]; then + log "$partpv is not available!" + exit 1 + fi + dd if=/dev/zero of="${partpv}" bs=1024k count=1 + pvcreate -ff -y "${partpv}" + physical_vols="${physical_vols} ${partpv}" + done - partpv="${HOSTVGDRIVE}${hostvgpart}" - if [ ! -e "$partpv" ]; then - # e.g. /dev/cciss/c0d0p2 - partpv="${HOSTVGDRIVE}p${hostvgpart}" - fi - log "Creating physical volume" - if [ ! -e "$partpv" ]; then - log "$partpv is not available!" - exit 1 - fi - dd if=/dev/zero of="${partpv}" bs=1024k count=1 - pvcreate -ff -y "${partpv}" log "Creating volume group" - vgcreate /dev/HostVG "${partpv}" + vgcreate /dev/HostVG "${physical_vols}" if [ "$SWAP_SIZE" -gt 0 ]; then log "Creating swap partition" @@ -665,9 +727,75 @@ create_hostvg() log "Mounting data partition" mount_data fi - log "Completed!" + log "Completed HostVG!" + +} + +create_appvg() +{ + log "Creating LVM partition(s) for AppVG" + local drv= + for drv in $APPVGDRIVE; do + wipe_partitions "$drv" + reread_partitions "$drv" + log "Labeling Drive: $drv" + parted "$drv" -s "mklabel ${LABEL_TYPE}" + parted "$drv" -s "mkpart primary ext2 0M -1" + appvgpart="1" + log "Toggling LVM on" + parted "$drv" -s "set $appvgpart lvm on" + parted "$drv" -s "print" + udevadm settle 2> /dev/null || udevsettle + reread_partitions "$drv" + + partpv="${drv}${appvgpart}" + if [ ! -e "$partpv" ]; then + # e.g. /dev/cciss/c0d0p2 + partpv="${drv}p${appvgpart}" + fi + log "Creating physical volume" + if [ ! -e "$partpv" ]; then + log "$partpv is not available!" + exit 1 + fi + dd if=/dev/zero of="${partpv}" bs=1024k count=1 + pvcreate -ff -y "${partpv}" + physical_vols="${physical_vols} ${partpv}" + done + + log "Creating volume group" + vgcreate /dev/AppVG "${physical_vols}" + + if [ "$SWAP2_SIZE" -gt 0 ]; then + log "Creating swap2 partition" + lvcreate --name Swap2 --size ${SWAP2_SIZE}M /dev/AppVG + mkswap -L "SWAP2" /dev/AppVG/Swap2 + echo "/dev/AppVG/Swap2 swap swap defaults 0 0" >> /etc/fstab + fi + + local use_data=1 + if [ "$DATA2_SIZE" -eq -1 ]; then + log "Creating data2 partition with remaining free space" + lvcreate --name Data2 -l 100%FREE /dev/AppVG + use_data=0 + elif [ "$DATA2_SIZE" -gt 0 ]; then + log "Creating data2 partition" + lvcreate --name Data2 --size ${DATA2_SIZE}M /dev/AppVG + use_data=0 + fi + + if [ "$use_data" = 0 ]; then + mke2fs -j /dev/AppVG/Data2 -L "DATA" + tune2fs -c 0 -i 0 /dev/AppVG/Data2 + echo "/dev/AppVG/Data2 /data2 ext3 defaults,noatime 0 0" >> /etc/fstab + fi + + if [ "$use_data" = 0 ]; then + log "Mounting data2 partition" + mount_data2 + fi + log "Completed AppVG!" - stop_log } perform_partitioning() @@ -688,6 +816,7 @@ perform_partitioning() log "Removing old LVM partitions" wipe_lvm_on_disk "$HOSTVGDRIVE" + [ -n ${APPVGDRIVE} ] && wipe_lvm_on_disk "$APPVGDRIVE" wipe_lvm_on_disk "$ROOTDRIVE" # begin critical section @@ -746,11 +875,17 @@ perform_partitioning() tune2fs -c 0 -i 0 "${partrootbackup}" fi - if [ "$ROOTDRIVE" != "$HOSTVGDRIVE" ]; then - log "Labeling Drive: $HOSTVGDRIVE" - parted "$HOSTVGDRIVE" -s "mklabel ${LABEL_TYPE}" - fi + for drv in $HOSTVGDRIVE; do + if [ "$ROOTDRIVE" != "$drv" ]; then + wipe_partitions "$drv" + reread_partitions "$drv" + log "Labeling Drive: $drv" + parted "$drv" -s "mklabel ${LABEL_TYPE}" + fi + done create_hostvg + [ -n ${APPVGDRIVE} ] && create_appvg + stop_log } do_confirm() @@ -900,6 +1035,19 @@ fi done } +cross_check_host_app() +{ +for hdrv in $HOSTVGDRIVE; do + for adrv in $APPVGDRIVE; do + if [ "${hdrv}" = "${adrv}" ]; then + # Skip disk partitioning, AppVGs overlaps with HostVGs + return 1 + fi + done +done +return 0 +} + MEM_SIZE_MB=$(awk '/MemTotal:/ { print $2 }' /proc/meminfo) case $MEM_SIZE_MB in ''|*[^0-9]*) die failed to get system memory size;; @@ -931,16 +1079,48 @@ ROOT_SIZE=${OVIRT_VOL_ROOT_SIZE:-$default_root_size} CONFIG_SIZE=${OVIRT_VOL_CONFIG_SIZE:-$default_config_size} LOGGING_SIZE=${OVIRT_VOL_LOGGING_SIZE:-$default_logging_size} DATA_SIZE=${OVIRT_VOL_DATA_SIZE:-$default_data_size} +SWAP2_SIZE=${OVIRT_VOL_SWAP2_SIZE:-$default_swap2_size} +DATA2_SIZE=${OVIRT_VOL_DATA2_SIZE:-$default_data2_size} if [ -n "$OVIRT_INIT" ]; then # if present, use the drive selected with 'ovirt_init' boot parameter # setting these the same until kernel cmdline argument implemented - DRIVE="$(translate_multipath_device "$OVIRT_INIT")" - ROOTDRIVE="$DRIVE" - HOSTVGDRIVE="$DRIVE" + eval $(printf $OVIRT_INIT |awk '{ print "DRIVE="$1; }') + ROOTDRIVE="$(translate_multipath_device "$DRIVE")" + for drv in $OVIRT_INIT; do + DRIVE="$(translate_multipath_device "$drv")" + if [ -n "$HOSTVGDRIVE" ]; then + HOSTVGDRIVE="$HOSTVGDRIVE $DRIVE" + else + HOSTVGDRIVE="$DRIVE" + fi + done + # Is this really needed ?? get_drive_size "$ROOTDRIVE" ROOTDRIVESPACE fi +if [ -n "$OVIRT_INITAPP" ]; then + if [ ${SWAP2_SIZE} -ne 0 -o ${DATA2_SIZE} -ne 0 ]; then + for drv in $OVIRT_INITAPP; do + DRIVE="$(translate_multipath_device "$drv")" + if [ -n "$APPVGDRIVE" ]; then + APPVGDRIVE="$APPVGDRIVE $DRIVE" + else + APPVGDRIVE="$DRIVE" + fi + done + cross_check_host_app || { + log "Skip disk partitioning, AppVGs disks overlaps with HostVGs"; + exit 1; + } + fi +else + { [ ${SWAP2_SIZE} -ne 0 ] || [ $DATA2_SIZE -ne 0 ]; } && { + log "Missing device parameter for AppVG: unable to partition any disk"; + exit 2; + } +fi + # if the node is Fedora then use GPT, otherwise use MBR if [ -f /etc/fedora-release ]; then LABEL_TYPE="gpt" @@ -951,11 +1131,21 @@ fi if [ "$1" = "AUTO" ]; then log "Beginning automatic disk partitioning." if [ -n "$OVIRT_INIT" ]; then - # do not format if HostVG exists on selected disk... - check_existing_hostvg "$HOSTVGDRIVE" + # do not format if HostVG/AppVG exists on selected disk(s)... + # CHECK: is check_existing_hostvg really doing the above ? + # Rather it seems to allow going through with the + # overwrite, if the VG is restricted to the specified + # disk(s), as opposed to the stated above, which expects + # halting if the VG simply exists in the spefified disk(s) + check_existing_hostvg "$HOSTVGDRIVE" devs "HostVG" existingHostVG=$? + existingAppVG=1 + if [ -n "$APPVGDRIVE" ]; then + check_existing_hostvg "$APPVGDRIVE" devs "AppVG" + existingAppVG=$? + fi # ... unless overridden by ovirt_firstboot parameter - if is_firstboot || [ $existingHostVG -ne 0 ]; then + if is_firstboot || [ $existingHostVG -ne 0 -a $existingAppVG -ne 0 ]; then if check_partition_sizes; then log "Partitioning hard disk..." perform_partitioning diff --git a/scripts/ovirt-early b/scripts/ovirt-early index 6dc8bee..23198b1 100755 --- a/scripts/ovirt-early +++ b/scripts/ovirt-early @@ -205,8 +205,10 @@ start_ovirt_early () { # BOOTIF=eth* e.g. BOOTIF=eth0 - use given interface bootif= - # ovirt_init=[usb|scsi[:serial#]|/dev/...] - # local installation target disk + # ovirt_init=HOSTVGDISK1[,HOSTVGDISK2...][;APPVGDISK1[,APPVGDISK2...]] + # where DISK=[usb|scsi[:serial#]|/dev/...] + # local installation target disks + # Allow specification of multiple disks per VG # usb|scsi - select disk type, as reported by udev ID_BUS # serial# - select exact disk using serial number, as reported by # udev ID_SERIAL @@ -215,9 +217,13 @@ start_ovirt_early () { # (for cases when HAL doesn't handle it) # w/o value - grab the first disk (/dev/?da) init= + initapp= - # ovirt_vol=BOOT_MB:SWAP_MB:ROOT_MB:CONFIG_MB:LOGGING_MB:DATA_MB + # ovirt_vol=BOOT_MB:SWAP_MB:ROOT_MB:CONFIG_MB:LOGGING_MB:DATA_MB:SWAP2_MB:DATA2_MB + # or + # ovirt_vol=size[,{Swap|Data|Config|Logging|Data2|Swap2}][:size...] # local partition sizes in MB + # LVs ending in 2 go to AppVG, all the others fall into HostVG vol_boot_size= vol_swap_size= vol_root_size= @@ -228,6 +234,11 @@ start_ovirt_early () { # or a specific positive number in MB vol_data_size= + # swap2 and data2 will be placed into AppVG, 0 disables, data2 + # can be -1 or a positive number in MB for each + vol_swap2_size= + vol_data2_size= + # ovirt_upgrade # install/update oVirt Node image on the local installation target disk upgrade= @@ -320,46 +331,172 @@ start_ovirt_early () { esac ;; ovirt_init*) - i=${i#ovirt_init} - if [ -n "$i" ]; then - # resolve to disk device - case "$i" in - =scsi*) - bus=scsi - i=${i#=scsi} - serial=${i#:} - ;; - =usb*) - bus=usb - i=${i#=usb} - serial=${i#:} - ;; - =/dev/*) - bus= - serial= - i=${i#=} - init=$(ls -1 "$i" 2>/dev/null | head -n1) - ;; - *) - bus= - serial= - init= - ;; - esac - if [ -n "$bus" ]; then - init=$(find_disk $bus $serial) - fi + i=${i#ovirt_init=} + eval $(printf $i|awk -F\; '{ print "hostvgdisks="$1; print "appvgdisks="$2; }') + # Look into HostVG disks + if [ -n "$hostvgdisks" ]; then + oldIFS="$IFS" + IFS=, + init= + for d in $hostvgdisks; do + # resolve to disk device + case "$d" in + scsi*) + bus=scsi + d=${d#=scsi} + serial=${d#:} + ;; + usb*) + bus=usb + d=${d#=usb} + serial=${d#:} + ;; + /dev/*) + bus= + serial= + d=${d#=} + if [ -n "$init" ]; then + init="$init $(ls -1 "$d" 2>/dev/null | head -n1)" + else + init=$(ls -1 "$d" 2>/dev/null | head -n1) + fi + ;; + *) + bus= + serial= + ;; + esac + if [ -n "$bus" ]; then + if [ -n "$init" ]; then + init="$init $(IFS="$oldIFS" find_disk $bus $serial)" + else + init=$(IFS="$oldIFS" find_disk $bus $serial) + fi + fi + done + IFS="$oldIFS" else # 'ovirt_init' without value: grab first disk init=$(ls -1 /dev/?da 2>/dev/null |head -n1) fi + # Look into AppVG disks + if [ -n "$appvgdisks" ]; then + oldIFS="$IFS" + IFS=, + bus= + serial= + for d in $appvgdisks; do + # resolve to disk device + case "$d" in + scsi*) + bus=scsi + d=${d#=scsi} + serial=${d#:} + ;; + usb*) + bus=usb + d=${d#=usb} + serial=${d#:} + ;; + /dev/*) + bus= + serial= + d=${d#=} + if [ -n "$initapp" ]; then + initapp="$initapp $(ls -1 "$d" 2>/dev/null | head -n1)" + else + initapp=$(ls -1 "$d" 2>/dev/null | head -n1) + fi + ;; + *) + bus= + serial= + ;; + esac + if [ -n "$bus" ]; then + if [ -n "$initapp" ]; then + initapp="$initapp $(IFS="$oldIFS" find_disk $bus $serial)" + else + initapp=$(IFS="$oldIFS" find_disk $bus $serial) + fi + fi + done + IFS="$oldIFS" + fi if [ -z "$init" ]; then log "Selected disk $i is not valid." fi ;; ovirt_vol=*) i=${i#ovirt_vol=} - eval $(printf $i|awk -F: '{print "vol_boot_size="$1; print "vol_swap_size="$2; print "vol_root_size="$3; print "vol_config_size="$4; print "vol_logging_size="$5; print "vol_data_size="$6;}') + eval $(printf $i|awk -F: '{ print "lv1="$1; print "lv2="$2; print "lv3="$3; print "lv4="$4; print "lv5="$5; print "lv6="$6; print "lv7="$7; print "lv8="$8; }') + # Reads each provided LV size and assign them + for p in 1 2 3 4 5 6 7 8; do + var=lv$p + size= + lv= + if [ -n "${!var}" ]; then + eval $(printf ${!var}|awk -F, '{ print "size="$1; print "lv="$2; }') + if [ -n "${size}" ]. then + case "${lv}" in + Boot) + vol_boot_size=$size + ;; + Swap) + vol_swap_size=$size + ;; + Root) + vol_root_size=$size + ;; + Config) + vol_config_size=$size + ;; + Logging) + vol_logging_size=$size + ;; + Data) + vol_data_size=$size + ;; + Swap2) + vol_swap2_size=$size + ;; + Data2) + vol_data2_size=$size + ;; + *) + ## This is here to preserve old styled syntax (in order) + ## BOOT_MB:SWAP_MB:ROOT_MB:CONFIG_MB:LOGGING_MB:DATA_MB:SWAP2_MB:DATA2_MB + case "$p" in + 1) + vol_boot_size=$size + ;; + 2) + vol_swap_size=$size + ;; + 3) + vol_root_size=$size + ;; + 4) + vol_config_size=$size + ;; + 5) + vol_logging_size=$size + ;; + 6) + vol_data_size=$size + ;; + 7) + vol_swap2_size=$size + ;; + 8) + vol_data2_size=$size + ;; + esac + ;; + esac + fi + fi + done ;; ovirt_upgrade* |ovirt_local_boot*) upgrade=1 @@ -455,7 +592,7 @@ start_ovirt_early () { ip_gateway=$gateway fi # save boot parameters as defaults for ovirt-config-* - params="bootif init vol_boot_size vol_swap_size vol_root_size vol_config_size vol_logging_size vol_data_size upgrade standalone overcommit ip_address ip_netmask ip_gateway ipv6 dns ntp vlan ssh_pwauth syslog_server syslog_port collectd_server collectd_port bootparams hostname firstboot runtime_mode" + params="bootif init initapp vol_boot_size vol_swap_size vol_root_size vol_config_size vol_logging_size vol_data_size vol_swap2_size vol_data2_size upgrade standalone overcommit ip_address ip_netmask ip_gateway ipv6 dns ntp vlan ssh_pwauth syslog_server syslog_port collectd_server collectd_port bootparams hostname firstboot runtime_mode" # mount /config unless firstboot is forced if [ "$firstboot" != "1" ]; then mount_config diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index 7b95ea8..5c574f7 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -430,6 +430,23 @@ mount_data() { fi } +mount_data2() { + if grep -q " /data2 ext3" /proc/mounts; then + return 0 + fi + + if [ -e /dev/AppVG/Data2 ] ; then + mkdir -p /data2 + mount /data2 + + return 0 + else + # /data2 is not available + printf "\nThe data2 partion has not been created. Please create it at the main menu.\n" + return 1 + fi +} + # augtool wrapper # workaround for bind-mounted files # see https://fedorahosted.org/augeas/ticket/32 -- 1.6.6.1 From matinata at br.ibm.com Wed Jul 21 22:11:08 2010 From: matinata at br.ibm.com (Ricardo Marin Matinata) Date: Wed, 21 Jul 2010 19:11:08 -0300 Subject: [Ovirt-devel] [PATCH] RFC: Encrypted swap support Message-ID: <1279750268-27174-1-git-send-email-matinata@br.ibm.com> (depends on Advance Storage Configuration patch) This patch adds the option of requesting, at install time, that swap LVs be encrypted. The modifications include: * Introduction of the ovirt_swap_encrypt install parameter * Inclusion of all required packages * Inclusion of required kernel modules * Introduction of /etc/ovirt-crypttab to hold encrypted swap configuration (Couldn't use /etc/crypttab since it happens in rc.sysinit, before persistence is available * Modification of ovirt-early so it automatically brings up encrypted swap, if available It works as follows: ovirt_swap_encrypt={Swap|Swap2},cypher1[:cypher2...][;{Swap|Swap2},...] the default cypher is set to aes-cbc-essiv:sha256 Signed-off-by: Ricardo Marin Matinata --- recipe/common-blacklist.ks | 4 +- recipe/common-pkgs.ks | 1 + recipe/common-post.ks | 12 +++++++++++ scripts/ovirt-config-storage | 19 ++++++++++++++--- scripts/ovirt-early | 37 ++++++++++++++++++++++++++++++++++- scripts/ovirt-functions | 44 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 110 insertions(+), 7 deletions(-) diff --git a/recipe/common-blacklist.ks b/recipe/common-blacklist.ks index 7c08c39..4fb980e 100644 --- a/recipe/common-blacklist.ks +++ b/recipe/common-blacklist.ks @@ -15,7 +15,7 @@ RPMS="$RPMS mkinitrd isomd5sum dmraid checkpolicy" # Remove additional RPMs forcefully RPMS="$RPMS gamin pm-utils kbd usermode vbetool ConsoleKit hdparm \ efibootmgr linux-atm-libs fedora-release-notes \ - cryptsetup-luks pciutils mtools syslinux \ + pciutils mtools syslinux \ wireless-tools radeontool libicu gnupg2 \ fedora-logos" @@ -57,7 +57,7 @@ driver_mods="drivers/auxdisplay drivers/net/appletalk \ drivers/net/hamradio drivers/net/pcmcia drivers/net/tokenring \ drivers/net/wireless drivers/net/irda drivers/atm drivers/usb/atm \ drivers/acpi drivers/char/drm drivers/char/mwave \ - drivers/char/ipmp drivers/char/pcmcia drivers/crypto \ + drivers/char/ipmp drivers/char/pcmcia \ drivers/firmware drivers/memstick drivers/mmc drivers/mfs \ drivers/parport drivers/video drivers/watchdog drivers/net/ppp* \ drivers/usb/serial drivers/usb/misc drivers/usb/class \ diff --git a/recipe/common-pkgs.ks b/recipe/common-pkgs.ks index 7578335..126e26f 100644 --- a/recipe/common-pkgs.ks +++ b/recipe/common-pkgs.ks @@ -78,3 +78,4 @@ device-mapper-multipath kpartx dracut-network patch +cryptsetup-luks diff --git a/recipe/common-post.ks b/recipe/common-post.ks index c79e186..4fae515 100644 --- a/recipe/common-post.ks +++ b/recipe/common-post.ks @@ -221,3 +221,15 @@ mkdir -p /data2 mkdir -p /liveos echo "/dev/HostVG/Config /config ext3 defaults,noauto,noatime 0 0" >> /etc/fstab +# load modules required by crypto swap +cat > /etc/sysconfig/modules/swap-crypt.modules </dev/null 2>&1 +modprobe dm_mod >/dev/null 2>&1 +modprobe dm_crypt >/dev/null 2>&1 +modprobe cryptoloop >/dev/null 2>&1 +modprobe cbc >/dev/null 2>&1 +modprobe sha256 >/dev/null 2>&1 + +EOF diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage index e3bb57b..c984265 100755 --- a/scripts/ovirt-config-storage +++ b/scripts/ovirt-config-storage @@ -677,8 +677,12 @@ create_hostvg() if [ "$SWAP_SIZE" -gt 0 ]; then log "Creating swap partition" lvcreate --name Swap --size ${SWAP_SIZE}M /dev/HostVG - mkswap -L "SWAP" /dev/HostVG/Swap - echo "/dev/HostVG/Swap swap swap defaults 0 0" >> /etc/fstab + if [ -n ${OVIRT_CRYPT_SWAP} ]; then + echo "SWAP /dev/HostVG/Swap /dev/mapper/ovirt-crypt-swap ${OVIRT_CRYPT_SWAP}" >> /etc/ovirt-crypttab + else + mkswap -L "SWAP" /dev/HostVG/Swap + echo "/dev/HostVG/Swap swap swap defaults 0 0" >> /etc/fstab + fi fi if [ "$CONFIG_SIZE" -gt 0 ]; then log "Creating config partition" @@ -769,8 +773,12 @@ create_appvg() if [ "$SWAP2_SIZE" -gt 0 ]; then log "Creating swap2 partition" lvcreate --name Swap2 --size ${SWAP2_SIZE}M /dev/AppVG - mkswap -L "SWAP2" /dev/AppVG/Swap2 - echo "/dev/AppVG/Swap2 swap swap defaults 0 0" >> /etc/fstab + if [ -n ${OVIRT_CRYPT_SWAP2} ]; then + echo "SWAP2 /dev/AppVG/Swap2 /dev/mapper/ovirt-crypt-swap2 ${OVIRT_CRYPT_SWAP2}" >> /etc/ovirt-crypttab + else + mkswap -L "SWAP2" /dev/AppVG/Swap2 + echo "/dev/AppVG/Swap2 swap swap defaults 0 0" >> /etc/fstab + fi fi local use_data=1 @@ -885,6 +893,9 @@ perform_partitioning() done create_hostvg [ -n ${APPVGDRIVE} ] && create_appvg + if [ -n ${OVIRT_CRYPT_SWAP2} -o -n ${OVIRT_CRYPT_SWAP} ]; then + ovirt_store_config /etc/ovirt-crypttab + fi stop_log } diff --git a/scripts/ovirt-early b/scripts/ovirt-early index 23198b1..5c8793d 100755 --- a/scripts/ovirt-early +++ b/scripts/ovirt-early @@ -239,6 +239,12 @@ start_ovirt_early () { vol_swap2_size= vol_data2_size= + # ovirt_swap_encrypt={Swap|Swap2},cypher1[:cypher2...][;{Swap|Swap2}...] + # request swap encryption + # the default cypher is set to aes-cbc-essiv:sha256 + crypt_swap= + crypt_swap2= + # ovirt_upgrade # install/update oVirt Node image on the local installation target disk upgrade= @@ -572,6 +578,32 @@ start_ovirt_early () { BOOT_IMAGE=* | initrd=* | check | linux | liveimg | \ root=* | rootfstype=* | rootflags=* | ro) ;; + ovirt_swap_encrypt=*) + i=${i#ovirt_swap_encrypt=} + eval $(printf $i|awk -F\; '{ print "swap1="$1; print "swap2="$2; }') + for p in 1 2; do + var=swap$p + swapdev= + swapcyph= + local default_cypher="aes-cbc-essiv:sha256" + if [ -n ${!var} ]; then + eval $(printf ${!var} |awk -F, '{ print "swapdev="$1; print "swapcyph="$2; }') + if [ "${swapdev}" = "Swap" ]; then + if [ -n ${swapcyph} ]; then + crypt_swap=${swapcyph} + else + crypt_swap=${default_cypher} + fi + elif [ "${swapdev}" = "Swap2" ]; then + if [ -n ${swapcyph} ]; then + crypt_swap2=${swapcyph} + else + crypt_swap2=${default_cypher} + fi + fi + fi + done + ;; *) bootparams="$bootparams $i" ;; @@ -592,7 +624,7 @@ start_ovirt_early () { ip_gateway=$gateway fi # save boot parameters as defaults for ovirt-config-* - params="bootif init initapp vol_boot_size vol_swap_size vol_root_size vol_config_size vol_logging_size vol_data_size vol_swap2_size vol_data2_size upgrade standalone overcommit ip_address ip_netmask ip_gateway ipv6 dns ntp vlan ssh_pwauth syslog_server syslog_port collectd_server collectd_port bootparams hostname firstboot runtime_mode" + params="bootif init initapp vol_boot_size vol_swap_size vol_root_size vol_config_size vol_logging_size vol_data_size vol_swap2_size vol_data2_size crypt_swap crypt_swap2 upgrade standalone overcommit ip_address ip_netmask ip_gateway ipv6 dns ntp vlan ssh_pwauth syslog_server syslog_port collectd_server collectd_port bootparams hostname firstboot runtime_mode" # mount /config unless firstboot is forced if [ "$firstboot" != "1" ]; then mount_config @@ -610,6 +642,9 @@ start_ovirt_early () { done augtool $tmpaug . $OVIRT_DEFAULTS + if [ "$firstboot" != "1" -a -f /etc/ovirt-crypttab ]; then + mount_crypt_swap + fi if [ -f /etc/sysconfig/network ]; then . /etc/sysconfig/network if [ -n "$HOSTNAME" ]; then diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index 5c574f7..06611b6 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -447,6 +447,50 @@ mount_data2() { fi } +mount_crypt_swap() { + crypttab="/etc/ovirt-crypttab" + rc=1 + { [ -z "${crypttab}" ] || [ ! -f "${crypttab}" ] || [ ! $(cat "${crypttab}") ]; } +&& return ${rc} + rc=0 + + while read label dev mapp cyph; do + if [ -n ${label} -a -n ${dev} -a -n ${mapp} -a -n ${cyph} ]; then + if grep -q "${dev}" /proc/swaps; then + swapoff ${dev} >/dev/null 2>&1 + rc=$? + [ ${rc} -ne 0 ] && { + log "swapoff failed for Un-encrypted ${dev}"; + continue; + } + fi + if [ ! -b ${mapp} ]; then + /sbin/cryptsetup -d /dev/urandom -c ${cyph} create ${mapp} ${dev} > /dev/null 2>&1 + rc=$? + [ ${rc} -ne 0 ] && { + log "Creation of encrypted swap for ${dev} failed"; + continue; + } + fi + mkswap -L ${label} ${mapp} >/dev/null 2>&1 + rc=$? + [ ${rc} -ne 0 ] && { + log "Creation of swap for ${mapp} failed"; + continue; + } + swapon ${mapp} > /dev/null 2>&1 + [ ${rc} -ne 0 ] && { + log "Activation of swap for ${mapp} failed"; + continue; + } + else + continue + fi + done < ${cypttab} + + return ${rc} +} + # augtool wrapper # workaround for bind-mounted files # see https://fedorahosted.org/augeas/ticket/32 -- 1.6.6.1 From nicolas.ochem at alcatel-lucent.com Fri Jul 30 15:06:12 2010 From: nicolas.ochem at alcatel-lucent.com (Nicolas Ochem) Date: Fri, 30 Jul 2010 17:06:12 +0200 Subject: [Ovirt-devel] [PATCH 1/2] Monkey-patch mongrel to fix rails 2.3.5 incompatibility Message-ID: <4C52EA64.8040700@alcatel-lucent.com> Signed-off-by: Nicolas Ochem --- src/config/initializers/mongrel_patch.rb | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) create mode 100644 src/config/initializers/mongrel_patch.rb diff --git a/src/config/initializers/mongrel_patch.rb b/src/config/initializers/mongrel_patch.rb new file mode 100644 index 0000000..ae2bcf4 --- /dev/null +++ b/src/config/initializers/mongrel_patch.rb @@ -0,0 +1,11 @@ +# monkey patch to make mongrel compatible with rails 2.3.5 +# fixes faulty redirection issue. +# TODO : ditch mongrel and switch to passenger instead. +class Mongrel::CGIWrapper + def header_with_rails_fix(options = 'text/html') + @head['cookie'] = options.delete('cookie').flatten.map { |v| v.sub(/^\n/,'') } if options.class != String and options['cookie'] + header_without_rails_fix(options) + end + alias_method_chain(:header, :rails_fix) +end if (Rails.version == '2.3.5' or Rails.version == '2.3.8') and Gem.available?('mongrel', Gem::Requirement.new('~>1.1.5')) and self.class.const_defined?(:Mongrel) + -- 1.7.2 From nicolas.ochem at gmail.com Fri Jul 30 15:44:07 2010 From: nicolas.ochem at gmail.com (nicolas.ochem at gmail.com) Date: Fri, 30 Jul 2010 15:44:07 +0000 Subject: [Ovirt-devel] [PATCH 1/2] Monkey-patch mongrel to fix rails 2.3.5 incompatibility Message-ID: <1280504647-1415-1-git-send-email-nicolas.ochem@alcatel-lucent.com> From: Nicolas Ochem Signed-off-by: Nicolas Ochem --- src/config/initializers/mongrel_patch.rb | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) create mode 100644 src/config/initializers/mongrel_patch.rb diff --git a/src/config/initializers/mongrel_patch.rb b/src/config/initializers/mongrel_patch.rb new file mode 100644 index 0000000..ae2bcf4 --- /dev/null +++ b/src/config/initializers/mongrel_patch.rb @@ -0,0 +1,11 @@ +# monkey patch to make mongrel compatible with rails 2.3.5 +# fixes faulty redirection issue. +# TODO : ditch mongrel and switch to passenger instead. +class Mongrel::CGIWrapper + def header_with_rails_fix(options = 'text/html') + @head['cookie'] = options.delete('cookie').flatten.map { |v| v.sub(/^\n/,'') } if options.class != String and options['cookie'] + header_without_rails_fix(options) + end + alias_method_chain(:header, :rails_fix) +end if (Rails.version == '2.3.5' or Rails.version == '2.3.8') and Gem.available?('mongrel', Gem::Requirement.new('~>1.1.5')) and self.class.const_defined?(:Mongrel) + -- 1.7.2 From nicolas.ochem at gmail.com Fri Jul 30 15:48:04 2010 From: nicolas.ochem at gmail.com (nicolas.ochem at gmail.com) Date: Fri, 30 Jul 2010 15:48:04 +0000 Subject: [Ovirt-devel] [PATCH 2/2] Added "runtime_mode=ovirt" as boot parameter for ovirt node from cobbler otherwise it does not communicate with ovirt-server. Message-ID: <1280504884-1477-1-git-send-email-nicolas.ochem@alcatel-lucent.com> From: Nicolas Ochem Signed-off-by: Nicolas Ochem --- installer/modules/ovirt/files/cobbler-import | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/installer/modules/ovirt/files/cobbler-import b/installer/modules/ovirt/files/cobbler-import index e6a6764..6de3110 100755 --- a/installer/modules/ovirt/files/cobbler-import +++ b/installer/modules/ovirt/files/cobbler-import @@ -46,7 +46,7 @@ node_dir=/usr/share/ovirt-node-image cobbler distro add --name="oVirt-Node-$node_arch" --arch=$node_arch \ --initrd=$node_dir/tftpboot/initrd0.img --kernel=$node_dir/tftpboot/vmlinuz0 \ - --kopts="rootflags=loop root=live:/ovirt-node-image.iso rootfstype=iso9660 ro console=tty0 console=ttyS0,115200n8" + --kopts="rootflags=loop root=live:/ovirt-node-image.iso runtime_mode=ovirt rootfstype=iso9660 ro console=tty0 console=ttyS0,115200n8" cobbler profile add --name=oVirt-Node-$node_arch --distro=oVirt-Node-$node_arch cobbler system add --netboot-enabled=1 --profile=oVirt-Node-$node_arch \ -- 1.7.2 From nicolas.ochem at alcatel-lucent.com Fri Jul 30 16:10:33 2010 From: nicolas.ochem at alcatel-lucent.com (Nicolas Ochem) Date: Fri, 30 Jul 2010 18:10:33 +0200 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <20100707174109.GA3202@mcpierce-laptop.redhat.com> References: <4C2DA287.7010100@redfish.com.au> <20100706143452.GK10500@mcpierce-desktop.usersys.redhat.com> <4C344AC2.1080302@redfish.com.au> <201007071501.37584.aclement@linagora.com> <20100707174109.GA3202@mcpierce-laptop.redhat.com> Message-ID: <4C52F979.7050502@alcatel-lucent.com> I built and installed everything from next repo in fedora 13 minimal following the build instructions in the website. Here are the problems I encountered : - to build the image, you need to add the local repository to recipe/repos.ks - the instructions to build the server rpm are missing from the website - ace -d install ovirt has one error : package ovirt-node-image-pxe not found - I had to make the pxe images manually and add them to cobbler - mongrel issue ( fixed patch 30/07/2010) - the node boots in standalone mode instead of ovirt (fixed patch 30/07/2010) - ovirt_agent.rb is broken (the daemon runs but initialization fails) I did not encounter the bug with host_register and matahari (with the latest version of matahari in the fedora 13 repo : 0.0.5-1) 2 questions : - since ovirt-node-image is deprecated, is there still a way to build ovirt-node-image and ovirt-node-image-pxe RPMs? It is useful to have everything, including PXE, configured just by doing ace install ovirt. - what is the purpose of ovirt_agent daemon ? I found that it is not working but it does not impact anything AFAIK. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpierce at redhat.com Fri Jul 30 16:14:39 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Fri, 30 Jul 2010 12:14:39 -0400 Subject: [Ovirt-devel] Build fails due to missing ovirt-node-recipe.ks In-Reply-To: <4C52F8A7.2020109@alcatel-lucent.com> References: <4C2DA287.7010100@redfish.com.au> <20100706143452.GK10500@mcpierce-desktop.usersys.redhat.com> <4C344AC2.1080302@redfish.com.au> <201007071501.37584.aclement@linagora.com> <20100707174109.GA3202@mcpierce-laptop.redhat.com> <4C52F8A7.2020109@alcatel-lucent.com> Message-ID: <20100730161439.GG14014@mcpierce-laptop.redhat.com> (cc'ing ovirt-devel) On Fri, Jul 30, 2010 at 06:07:03PM +0200, Nicolas Ochem wrote: > I built and installed everything from next repo in fedora 13 minimal > following the build instructions in the website. > Here are the problems I encountered : > > - to build the image, you need to add the local repository to > recipe/repos.ks > - the instructions to build the server rpm are missing from the website > - ace -d install ovirt has one error : package ovirt-node-image-pxe not > found > - I had to make the pxe images manually and add them to cobbler > - mongrel issue ( fixed patch 30/07/2010) > - the node boots in standalone mode instead of ovirt (fixed patch > 30/07/2010) > - ovirt_agent.rb is broken (the daemon runs but initialization fails) > > I did not encounter the bug with host_register and matahari (with the > latest version of matahari in the fedora 13 repo : 0.0.5-1) > > 2 questions : > > - since ovirt-node-image is deprecated, is there still a way to build > ovirt-node-image and ovirt-node-image-pxe RPMs? It is useful to have > everything, including PXE, configured just by doing ace install ovirt. You shouldn't need to RPMs any more. The RPMs were just a means for delivering the ISO to the host system from a yum repository, which is no longer needed. > - what is the purpose of ovirt_agent daemon ? I found that it is not > working but it does not impact anything AFAIK. ovirt-agent is a daemon which creates a few QMF agents that communicate hardware details back to the ovirt server when it comes up. When the node comes up and asks for its configuration details, the details sent down are based on whatever hardware was reported by ovirt-agent. If the hardware hasn't changed, then you won't see any impact. But if you bring up a new node and the agent fails then you won't be able to deploy VMs to that node since it's hardware capabilities will be unknown. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: