Bug 771344 - Build failed with long Name tag in tdl template for RHEVM
Summary: Build failed with long Name tag in tdl template for RHEVM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: rubygem-aeolus-cli
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: beta
Assignee: Ian McLeod
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-03 12:38 UTC by Martin Kočí
Modified: 2012-08-30 17:17 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-30 17:17:31 UTC


Attachments (Terms of Use)

Description Martin Kočí 2012-01-03 12:38:05 UTC
Description of problem:
When I tried target specific packages and repositories with template where is long Name tag I got
exception and build failed with this error log below. If i modify the Name tag to something like <name>TSPaR_RHEL</name> it passed.  
Error log: 
...truncated...
2012-01-03 05:29:39,103 DEBUG imgfac.builders.BaseBuilder.RHEL6_rhevm_Builder pid(12839) Message: Exception caught in ImageFactory
2012-01-03 05:29:39,108 DEBUG imgfac.builders.BaseBuilder.RHEL6_rhevm_Builder pid(12839) Message: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_rhevm_Builder.py", line 65, in build_image
    self.build_uploa    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: internal error Monitor path /var/lib/libvirt/qemu/Target_Specific_Packages_and_Repos_for_RHEL-ecea05aa-7408-453a-902a-05572fa33038.monitor too big for destination
2012-01-03 05:29:39,108 DEBUG imgfac.BuildJob.BuildJob pid(12839) Message: Builder (ecea05aa-7408-453a-902a-05572fa33038) changed status from BUILDING to FAILED
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: internal error Monitor path /var/lib/libvirt/qemu/Target_Specific_Packages_and_Repos_for_RHEL-ecea05aa-7408-453a-902a-05572fa33038.monitor too big for destination
d(build_id)
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_rhevm_Builder.py", line 112, in build_upload
    libvirt_xml = guest.install(self.app_config["timeout"])
  File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 1431, in install
    return self._do_install(timeout, force, 0)
  File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 1412, in _do_install
    dom = self.libvirt_conn.createXML(xml, 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2087, in createXML
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: internal error Monitor path /var/lib/libvirt/qemu/Target_Specific_Packages_and_Repos_for_RHEL-ecea05aa-7408-453a-902a-05572fa33038.monitor too big for destination

2012-01-03 05:29:39,108 DEBUG imgfac.BuildJob.BuildJob pid(12839) Message: Builder (ecea05aa-7408-453a-902a-05572fa33038) changed status from BUILDING to FAILED
Exception in thread ecea05aa-7408-453a-902a-05572fa33038.build_image():
Traceback (most recent call last):
  File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.6/site-packages/imgfac/builders/BaseBuilder.py", line 126, in __call__
    getattr(self, str().join(args))(**kwargs)
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_rhevm_Builder.py", line 65, in build_image
    self.build_upload(build_id)
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_rhevm_Builder.py", line 112, in build_upload
    libvirt_xml = guest.install(self.app_config["timeout"])
  File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 1431, in install
    return self._do_install(timeout, force, 0)
  File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 1412, in _do_install
    dom = self.libvirt_conn.createXML(xml, 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2087, in createXML
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: internal error Monitor path /var/lib/libvirt/qemu/Target_Specific_Packages_and_Repos_for_RHEL-ecea05aa-7408-453a-902a-05572fa33038.monitor too big for destination


Checking if there is any error in the log of image factory
Found FAILED or error message in log file:
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: internal error Monitor path /var/lib/libvirt/qemu/Target_Specific_Packages_and_Repos_for_RHEL-ecea05aa-7408-453a-902a-05572fa33038.monitor too big for destination
2012-01-03 05:29:39,108 DEBUG imgfac.BuildJob.BuildJob pid(12839) Message: Builder (ecea05aa-7408-453a-902a-05572fa33038) changed status from BUILDING to FAILED
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: internal error Monitor path /var/lib/libvirt/qemu/Target_Specific_Packages_and_Repos_for_RHEL-ecea05aa-7408-453a-902a-05572fa33038.monitor too big for destination

Version-Release number of selected component (if applicable):
I have tested that on RHEL6.2 and F15
oz-0.7.9-4.el6.noarch
aeolus-conductor-doc-0.8.0-0.20111222174045gitf1e6529.el6.noarch
rubygem-aeolus-image-0.2.0-1.el6.noarch
rubygem-rack-mount-0.7.1-3.aeolus.el6.noarch
rubygem-ZenTest-4.3.3-2.aeolus.el6.noarch
rubygem-aeolus-cli-0.2.0-3.el6.noarch
imagefactory-jeosconf-ec2-rhel-1.0.0rc1-1.el6.noarch
aeolus-conductor-0.8.0-0.20111222174045gitf1e6529.el6.noarch
aeolus-all-0.8.0-0.20111222174045gitf1e6529.el6.noarch
rubygem-arel-2.0.10-0.aeolus.el6.noarch
iwhd-1.1-2.el6.x86_64
imagefactory-jeosconf-ec2-fedora-1.0.0rc1-1.el6.noarch
aeolus-conductor-daemons-0.8.0-0.20111222174045gitf1e6529.el6.noarch
rubygem-imagefactory-console-0.5.0-4.20110824113238gitd9debef.el6.noarch
imagefactory-1.0.0rc1-1.el6.noarch
aeolus-configure-2.5.0-0.20111222093431gitd3ed726.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. Create /etc/imagefactory/target_content.xml (see https://www.aeolusproject.org/redmine/projects/image-factory/wiki/Documentation)
2. create template for rhvem as follow (for instance)
<template>
  <name>Target_Specific_Packages_and_Repos_for_RHEL</name>
  <description>Target Specific Packages and Repos for RHEL</description>
  <os>
    <name>RHEL-6</name>
    <version>1</version>
    <arch>x86_64</arch>
    <install type="url">
      <url>http://download.devel.redhat.com/nightly/latest-RHEL6.1/6/Server/x86_64/os/</url>
    </install>
    <rootpw>redhat</rootpw>
  </os>
  <packages>
    <package name="rhev-fedora-generic-package"/>
  </packages>
</template>
3. imagefactory --debug --target rhevm --template template.tdl 
  
Actual results:
Exception caught in ImageFactory, then BUILDING FAILED

Expected results:
No Exception/error, or get some message about long Name in template

Additional info:
Maybe it's libvirtError, but I think template input should be at least somehow sanitize for this purpose. 
for Further info you might find http://hudson.rhq.lab.eng.bos.redhat.com:8080/hudson/view/DEV-CloudForms/job/ImageFactory-KocaTesting2/160/console

Comment 1 Martin Kočí 2012-01-03 15:10:13 UTC
Actually it doesn't matter if you create /etc/imagefactory/target_content.xml. It gives you an exception even if you don't have this file. 
I have modified summary.

Comment 2 wes hayutin 2012-01-12 16:34:21 UTC
adding to ce-sprint

Comment 3 wes hayutin 2012-01-12 16:40:37 UTC
removing ce-sprint-next tracker

Comment 4 wes hayutin 2012-01-16 16:53:41 UTC
we should catch long names for the template..  with aeolus-image cli..

Comment 5 Martyn Taylor 2012-01-18 10:40:02 UTC
The template is defined in Oz, CLI simply validates against it.  This change needs to be made in Oz and reflected in aeolus-cli.  If indeed this is the way to go.  

There may be alternative to this approach by adding validation in conductor or possibly by handling this error where it is thrown (either Oz or factory).

I'll discuss this issue with relevant parties and update the BZ at a later date with the details.

Comment 6 Martyn Taylor 2012-01-19 15:38:48 UTC
Discussed this with imcleod and it seems that this error is thrown by libvirt when a working path + name is greater than 108 bytes (defined by UNIX domain socket).  /usr/include/sys/un.h

This really needs to be handled in Oz; for this reason I am going to assign this to imcleod who is lead on Oz project.

Comment 7 Ian McLeod 2012-02-01 18:40:07 UTC
This is fixed with the following commit:

https://github.com/aeolusproject/imagefactory/commit/6f69913d9d0feaacb3013de25f463fb036ffcf8f

And is spun in brew as part of 1.0.0rc3.

Switching to ON_QA

Comment 8 Martin Kočí 2012-02-02 15:52:13 UTC
Test passed with 
rpm -qa | grep 'aeolus\|imagefactory-\|oz-\|iwhd'
oz-0.9.0-0.20120127190146git043d582.el6.noarch
aeolus-conductor-doc-0.9.0-0.20120118181603git71cd8bc.el6.noarch
aeolus-all-0.9.0-0.20120118181603git71cd8bc.el6.noarch
iwhd-1.2-3.el6.x86_64
rubygem-imagefactory-console-0.5.0-4.20110824113238gitd9debef.el6.noarch
aeolus-conductor-daemons-0.9.0-0.20120118181603git71cd8bc.el6.noarch
imagefactory-jeosconf-ec2-fedora-1.0.0rc3_5_g1041f75-1.el6.noarch
rubygem-arel-2.0.10-0.aeolus.el6.noarch
rubygem-rack-mount-0.7.1-3.aeolus.el6.noarch
rubygem-ZenTest-4.3.3-2.aeolus.el6.noarch
rubygem-aeolus-image-0.4.0-0.20120118121635git0d31a37.el6.noarch
rubygem-aeolus-cli-0.4.0-0.20120118121626git6fddd65.el6.noarch
aeolus-configure-2.6.0-0.20120118121620gita996371.el6.noarch
imagefactory-jeosconf-ec2-rhel-1.0.0rc3_5_g1041f75-1.el6.noarch
aeolus-conductor-0.9.0-0.20120118181603git71cd8bc.el6.noarch
imagefactory-1.0.0rc3_5_g1041f75-1.el6.noarch

For further info see
http://hudson.rhq.lab.eng.bos.redhat.com:8080/hudson/view/DEV-CloudForms/job/ImageFactory-KocaTesting2/255/console

moving bug to VERIFIED.


Note You need to log in before you can comment on or make changes to this bug.