Bug 722935 - Libvirtd , iwhd and ImageFactory needs to be restarted before every successful build of vmware
Summary: Libvirtd , iwhd and ImageFactory needs to be restarted before every successfu...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: imagefactory
Version: 0.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
Assignee: Mike Orazi
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-18 14:33 UTC by Shveta
Modified: 2011-12-08 13:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-20 18:08:53 UTC


Attachments (Terms of Use)

Description Shveta 2011-07-18 14:33:39 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.aeolus-image build --target ec2,vmware --template template2.tpl 

Target Image: a7cce64e-bc2b-42a9-9f92-d6371ffab843
Image: 917d0be5-b3dc-4a3a-90d3-926e7ad421b8
Build: 4804f593-d9be-4228-b74d-42d02ca52a0d
Status: COMPLETED
Percent Complete: 100

Target Image: a404936f-a175-48dc-8ea1-77ca2524936c
Image: 917d0be5-b3dc-4a3a-90d3-926e7ad421b8
Build: 4804f593-d9be-4228-b74d-42d02ca52a0d
Status: New
Percent Complete: 0

2. build fails when tried second time or third time
3. three services iwhd, libvirtd and imagefactory needs to be restarted 
for a successful build.
  
Actual results:


Expected results:


Additional info:


2011-07-18 19:53:39,700 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(30401) Message: Created Image Warehouse instance http://localhost:9090 - buckets(target_images, templates, icicles, provider_images)
2011-07-18 19:53:39,701 ERROR imagefactory.qmfagent.ImageFactoryAgent.ImageFactoryAgent pid(30401) Message: "Problem encountered trying to reach image warehouse. Please check that iwhd is running and reachable.\nException text: 'NoneType' object has no attribute 'makefile'"
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/imagefactory/qmfagent/ImageFactoryAgent.py", line 74, in method
    result = getattr(target_obj, methodName)(**args)
  File "/usr/lib/python2.6/site-packages/imagefactory/qmfagent/ImageFactory.py", line 122, in build_image
    return BuildDispatcher().build_image_for_targets(image, build, template, targets, BuildAdaptor, self.agent)
  File "/usr/lib/python2.6/site-packages/imagefactory/BuildDispatcher.py", line 51, in build_image_for_targets
    image_id = self._ensure_image_with_template(image_id, template)
  File "/usr/lib/python2.6/site-packages/imagefactory/BuildDispatcher.py", line 96, in _ensure_image_with_template
    return self._ensure_image(image_id, image_desc)
  File "/usr/lib/python2.6/site-packages/imagefactory/BuildDispatcher.py", line 102, in _ensure_image
    return self.warehouse.store_image(None, image_desc)
  File "/usr/lib/python2.6/site-packages/imagefactory/ImageWarehouse.py", line 171, in store_image
    object_url = self.__url_for_id_of_type(image_id, object_type="image")
  File "/usr/lib/python2.6/site-packages/imagefactory/ImageWarehouse.py", line 100, in __url_for_id_of_type
    self.create_bucket_at_url("%s/%s" % (self.url, bucket))
  File "/usr/lib/python2.6/site-packages/imagefactory/ImageWarehouse.py", line 87, in create_bucket_at_url
    response_headers, response = self._http_request(url, 'PUT')
  File "/usr/lib/python2.6/site-packages/imagefactory/ImageWarehouse.py", line 75, in _http_request
    raise WarehouseError("Problem encountered trying to reach image warehouse. Please check that iwhd is running and reachable.\nException text: %s" % (e, ))
WarehouseError: "Problem encountered trying to reach image warehouse. Please check that iwhd is running and reachable.\nException text: 'NoneType' object has no attribute 'makefile'"
2011-07-18 19:54:33,087 WARNING root pid(30401) Message: caught signal SIGTERM, stopping...
2011-07-18 19:54:37,529 INFO root pid(30840) Message: Launched as daemon...
2011-07-18 19:54:38,233 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(30840) Message: Created Image Warehouse instance http://localhost:9090 - buckets(target_images, templates, icicles, provider_images)
2011-07-18 19:54:38,234 INFO imagefactory.qmfagent.ImageFactoryAgent.ImageFactoryAgent pid(30840) Message: image_factory has qmf/qpid address: redhat.com:imagefactory:0846f99d-38df-43ec-9360-2df51304f5b7:image_factory


Even after restarting iwhd , build fails unless you restart libvirtd.

Comment 1 wes hayutin 2011-07-18 14:51:52 UTC
moving to on_qa for recreates on other boxes before we hand this off to dev.

Comment 2 wes hayutin 2011-07-18 16:12:50 UTC
[root@dell-pem600-01 ~]# ruby  /root/checkServices.rb 

Checking aeolus-conductor ...
 Success: (pid  24422) is running...
 

Checking condor ...
 Success: condor_master (pid  24203) is running...

Checking conductor-dbomatic ...
 Success: dbomatic (pid  24368) is running...

Checking conductor-delayed_job ...
 Success: delayed_job (pid  24396) is running...

Checking deltacloud-ec2-us-east-1 ...
 Success: deltacloudd (pid  24481) is running...

Checking deltacloud-ec2-us-west-1 ...
 Success: deltacloudd (pid  24537) is running...

Checking deltacloud-mock ...
 Success: deltacloudd (pid  24509) is running...

Checking httpd ...
 Success: httpd (pid  24321) is running...

Checking imagefactory ...
 Success: imagefactory (pid  24721) is running...

Checking iwhd ...
 Success: iwhd (pid  24673) is running...

Checking libvirtd ...
 Success: libvirtd (pid  7624) is running...

Checking mongod ...
 Success: mongod (pid 24660) is running...

Checking ntpd ...
 Success: ntpd (pid  24246) is running...

Checking postgresql ...
 Success: postmaster (pid  7920) is running...

Checking qpidd ...
 Success: qpidd (pid  24570) is running...


Checking condor_q ...
 Success: -- Submitter: dell-pem600-01.rhts.eng.bos.redhat.com : <10.16.65.232:50154> : dell-pem600-01.rhts.eng.bos.redhat.com
 ID      OWNER            SUBMITTED     RUN_TIME ST PRI SIZE CMD               

0 jobs; 0 idle, 0 running, 0 held

Checking condor_status ...
 Success: 
[root@dell-pem600-01 ~]# aeolus-image build --target vmware --template /root/fedora.tpl 

Target Image: e66a598d-bf69-4ea8-a95c-8ce00001ca72
Image: ac3a1308-53a3-46db-93dc-f10ab273b343
Build: 919cb101-c2cf-4e56-b81a-4fcc92c3166a
Status: BUILDING
Percent Complete: 0

2011-07-18 11:43:03,588 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(24721) Message: Getting metadata (['latest_build']) from http://localhost:9090/images/ac3a1308-53a3-46db-93dc-f10ab273b343
2011-07-18 11:43:03,589 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(24721) Message: Setting metadata ({'latest_unpushed': '919cb101-c2cf-4e56-b81a-4fcc92c3166a'}) for http://localhost:9090/images/ac3a1308-53a3-46db-93dc-f10ab273b343
2011-07-18 11:43:03,590 DEBUG imagefactory.BuildJob.BuildAdaptor pid(24721) Message: Raising event with agent handler (<ImageFactoryAgent(Thread-1, initial)>), changed status from BUILDING to COMPLETED





[root@dell-pem600-01 ~]# vi /root/fedora.tpl 
[root@dell-pem600-01 ~]# aeolus-image build --target vmware --template /root/fedora.tpl 

Target Image: f0c8ae0a-a5be-4a48-8588-8a934d8f0360
Image: 565265e1-ef91-4e6a-9d2b-4aad0a8234a1
Build: bd69d3a4-3daf-4e83-9cab-dc16829b2d7d
Status: New
Percent Complete: 0
[root@dell-pem600-01 ~]# ruby  /root/checkServices.rb 

Checking aeolus-conductor ...
 Success: (pid  24422) is running...


Checking condor ...
 Success: condor_master (pid  24203) is running...

Checking conductor-dbomatic ...
 Success: dbomatic (pid  24368) is running...

Checking conductor-delayed_job ...
 Success: delayed_job (pid  24396) is running...

Checking deltacloud-ec2-us-east-1 ...
 Success: deltacloudd (pid  24481) is running...

Checking deltacloud-ec2-us-west-1 ...
 Success: deltacloudd (pid  24537) is running...

Checking deltacloud-mock ...
 Success: deltacloudd (pid  24509) is running...

Checking httpd ...
 Success: httpd (pid  24321) is running...

Checking imagefactory ...
 Success: imagefactory (pid  24721) is running...

Checking iwhd ...
 Success: iwhd (pid  24673) is running...

Checking libvirtd ...
 Success: libvirtd (pid  7624) is running...

Checking mongod ...
 Success: mongod (pid 24660) is running...

Checking ntpd ...
 Success: ntpd (pid  24246) is running...

Checking postgresql ...
 Success: postmaster (pid  7920) is running...

Checking qpidd ...
 Success: qpidd (pid  24570) is running...

Checking condor_q ...
 Success: -- Submitter: dell-pem600-01.rhts.eng.bos.redhat.com : <10.16.65.232:50154> : dell-pem600-01.rhts.eng.bos.redhat.com
 ID      OWNER            SUBMITTED     RUN_TIME ST PRI SIZE CMD               

0 jobs; 0 idle, 0 running, 0 held

Checking condor_status ...
 Success: 



2011-07-18 12:08:58,265 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(24721) Message: Getting metadata (['latest_build']) from http://localhost:9090/images/565265e1-ef91-4e6a-9d2b-4aad0a8234a1
2011-07-18 12:08:58,266 DEBUG imagefactory.ImageWarehouse.ImageWarehouse pid(24721) Message: Setting metadata ({'latest_unpushed': 'bd69d3a4-3daf-4e83-9cab-dc16829b2d7d'}) for http://localhost:9090/images/565265e1-ef91-4e6a-9d2b-4aad0a8234a1
2011-07-18 12:08:58,267 DEBUG imagefactory.BuildJob.BuildAdaptor pid(24721) Message: Raising event with agent handler (<ImageFactoryAgent(Thread-1, initial)>), changed status from BUILDING to COMPLETED

Comment 3 wes hayutin 2011-07-18 16:17:30 UTC
I was unable to recreate any issue w/ building several vmware images consecutively.  Shveta are there any recreate steps I may be missing?

Comment 4 Dave Johnson 2011-07-20 18:08:53 UTC
Unable to reproduce, closing this for now and we can reopen if it re-surfaces.

Comment 5 wes hayutin 2011-12-08 13:49:40 UTC
perm close


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