Bug 783590

Summary: factory: RuntimeError: mount_options: /dev/vda2 on /boot: mount: unknown filesystem type 'LVM2_member'
Product: [Retired] CloudForms Cloud Engine Reporter: wes hayutin <whayutin>
Component: imagefactoryAssignee: Ian McLeod <imcleod>
Status: CLOSED ERRATA QA Contact: Martin Kočí <mkoci>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: akarol, brad, dajohnso, deltacloud-maint, dgao, imcleod, ssachdev, whayutin
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-15 20:21:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
factory log none

Description wes hayutin 2012-01-20 23:14:55 UTC
Created attachment 556624 [details]
factory log

Description of problem:

012-01-20 18:01:00,347 INFO oz.Guest.FedoraGuest pid(13807) Message: Cleaning up after install
2012-01-20 18:01:00,367 DEBUG imgfac.builders.BaseBuilder.Fedora_vsphere_Builder pid(13807) Message: Generated disk image (/var/lib/imagefactory/images/base-image-5cb0cb19-80ba-466b-85fa-8306d72c1d1f.dsk)
2012-01-20 18:01:00,367 DEBUG imgfac.builders.BaseBuilder.Fedora_vsphere_Builder pid(13807) Message: Doing further Factory specific modification of Oz image
2012-01-20 18:01:00,367 DEBUG imgfac.builders.BaseBuilder.Fedora_vsphere_Builder pid(13807) Message: init guestfs
2012-01-20 18:01:00,367 DEBUG imgfac.builders.BaseBuilder.Fedora_vsphere_Builder pid(13807) Message: add input image
2012-01-20 18:01:00,367 DEBUG imgfac.builders.BaseBuilder.Fedora_vsphere_Builder pid(13807) Message: launch guestfs
2012-01-20 18:01:02,763 DEBUG imgfac.builders.BaseBuilder.Fedora_vsphere_Builder pid(13807) Message: Exception caught in ImageFactory
2012-01-20 18:01:02,778 DEBUG imgfac.builders.BaseBuilder.Fedora_vsphere_Builder pid(13807) Message: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_vsphere_Builder.py", line 49, in build_image
    self.build_upload(build_id)
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_vsphere_Builder.py", line 132, in build_upload
    self.modify_oz_filesystem()
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_vsphere_Builder.py", line 175, in modify_oz_filesystem
    g.mount_options("", "/dev/sda2", "/boot")
  File "/usr/lib/python2.6/site-packages/guestfs.py", line 2085, in mount_options
    return libguestfsmod.mount_options (self._o, options, device, mountpoint)
RuntimeError: mount_options: /dev/vda2 on /boot: mount: unknown filesystem type 'LVM2_member'

2012-01-20 18:01:02,778 DEBUG imgfac.BuildJob.BuildJob pid(13807) Message: Builder (5cb0cb19-80ba-466b-85fa-8306d72c1d1f) changed status from BUILDING to FAILED
2012-01-20 18:01:02,780 DEBUG imgfac.BuildJob.BuildJob pid(13807) Message: 5cb0cb19-80ba-466b-85fa-8306d72c1d1f for vsphere about to exit local queue...


template used.. 
<template>
  <name>Fedora 15 Basic Audrey Client</name>
  <os>
    <name>Fedora</name>
    <version>15</version>
    <arch>x86_64</arch>
    <install type='url'>
      <url>http://archive.linux.duke.edu/pub/fedora/linux/releases/15/Fedora/x86_64/os/</url>
    </install>
    <rootpw>asdf</rootpw>
  </os>
  <repositories>
    <repository name="aeolus">
      <url>http://repos.fedorapeople.org/repos/aeolus/conductor/testing/fedora-15/x86_64/</url>
    </repository>
  </repositories>
  <packages>
    <package name="aeolus-audrey-agent"/>
  </packages>
  <description>A Fedora 15 Template for Audrey Client</description>
</template>


[root@qeblade31 ~]# rpm -qa | grep factory
imagefactory-1.0.0rc2.1_6_gbaae779-1.el6.noarch
rubygem-imagefactory-console-0.4.0-1.el6.noarch
imagefactory-jeosconf-ec2-rhel-1.0.0rc2.1_6_gbaae779-1.el6.noarch
imagefactory-jeosconf-ec2-fedora-1.0.0rc2.1_6_gbaae779-1.el6.noarch

Comment 1 Ian McLeod 2012-01-23 14:56:27 UTC
Sigh.

Well, this is a side effect of fixing F16.  The conditional that should be using sda2 as /boot for F16 and above is somehow broken.  I cannot immediately see what is wrong.  Will figure it out.

Comment 2 Ian McLeod 2012-01-23 15:08:06 UTC
Was comparing an int with a string.  Whoops.  Fixed here:

https://github.com/aeolusproject/imagefactory/commit/2f4851fff6d2eb6eedc1bc1ea273bd1376228e46

Comment 3 Martin Kočí 2012-01-26 17:47:46 UTC
Test passed with 
#rpm -qa|grep 'aeolus\|imagefactory-\|oz-\|iwhd'
aeolus-conductor-0.9.0-0.20120118181603git71cd8bc.el6.noarch
imagefactory-jeosconf-ec2-rhel-1.0.0rc2_17_g6a682b6-1.el6.noarch
rubygem-imagefactory-console-0.5.0-4.20110824113238gitd9debef.el6.noarch
aeolus-conductor-doc-0.9.0-0.20120118181603git71cd8bc.el6.noarch
iwhd-1.2-3.el6.x86_64
imagefactory-jeosconf-ec2-fedora-1.0.0rc2_17_g6a682b6-1.el6.noarch
rubygem-arel-2.0.10-0.aeolus.el6.noarch
rubygem-aeolus-image-0.4.0-0.20120118121635git0d31a37.el6.noarch
rubygem-aeolus-cli-0.4.0-0.20120118121626git6fddd65.el6.noarch
oz-0.8.0-2.el6.noarch
aeolus-all-0.9.0-0.20120118181603git71cd8bc.el6.noarch
imagefactory-1.0.0rc2_17_g6a682b6-1.el6.noarch
aeolus-conductor-daemons-0.9.0-0.20120118181603git71cd8bc.el6.noarch
aeolus-configure-2.6.0-0.20120118121620gita996371.el6.noarch

However I'm slightly confused with the version of Fedora. In the description (in the template) of the bug is Fedora 15, but in the fix are lines like:
"if (self.tdlobj.distro == 'Fedora') and (int(self.tdlobj.update) >= 16):"
which is for fedora version 16 and higher. As well as in the comment 1. 

So how this particular issue can be fixed if it hasn't been worked for version 15 of Fedora ? Is there a bad example of the template in the description ?

(I will try to build Fedora 16 too)

Comment 4 Ian McLeod 2012-01-26 18:13:08 UTC
Martin,

Initially, F16 was broken.  This was reported as a separate bug.

My fix for the F16 bug caused a regression that broke everything _but_ F16.  That regression is what caused this bug.

The commit noted above corrects the regression.

The problem was that I was comparing a string with an integer:

15 >= 16 is False

However,

"15" >= 16 is True

Comment 5 Martin Kočí 2012-01-27 08:32:20 UTC
aah OK..understand..
thanks
btw as expected F16 build passed too. Moving bug to VERIFIED.

Comment 7 errata-xmlrpc 2012-05-15 20:21:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-0588.html