Bug 800862 - [RFE] Like "Push failed attempts" Build failed attempts should also be shown in UI [NEEDINFO]
[RFE] Like "Push failed attempts" Build failed attempts should also be shown ...
Product: CloudForms Cloud Engine
Classification: Red Hat
Component: rubygem-aeolus-image (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Angus Thomas
: FutureFeature, Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-03-07 07:19 EST by Shveta
Modified: 2016-09-20 01:03 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
ifarkas: needinfo? (ssachdev)

Attachments (Terms of Use)
build_failed (239.34 KB, image/png)
2012-03-07 07:19 EST, Shveta
no flags Details
image build failed (167.60 KB, image/png)
2012-03-09 05:46 EST, Imre Farkas
no flags Details
build failure (226.37 KB, image/png)
2012-03-12 04:08 EDT, Rehana
no flags Details

  None (edit)
Description Shveta 2012-03-07 07:19:41 EST
Created attachment 568275 [details]

Description of problem:

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

How reproducible:

Steps to Reproduce:
1. When a push fails , it shows , 2 failed push attempts or so
2. When Build fails , UI shows "Build" again .It should also show " 1 Build attempt failed"
3. In my case i built for RHEV , it failed bcos of reason 
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_rhevm_Builder.py", line 66, in build_image
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_rhevm_Builder.py", line 113, in build_upload
    libvirt_xml = guest.install(self.app_config["timeout"])
  File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 1460, in install
    return self._do_install(timeout, force, 0)
  File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 1442, in _do_install
    self._wait_for_install_finish(dom, timeout)
  File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 550, in _wait_for_install_finish
    raise oz.OzException.OzException(exc_str)
OzException: No disk activity in 300 seconds, failing.  Check screenshot at /factory-build-19b2017b-f422-4f8d-9abe-1842166c9f40-1331121160.6.png for more detail

When i go to UI , it shows "Build" button , it will be more user friendly if it shows " 1 Build attempt" failed
Actual results:

Expected results:

Additional info:

rpm -qa|grep aeolus
Comment 1 Dave Johnson 2012-03-07 12:29:44 EST
There is code there for this but it is not working...

The original bug for this feedback is bug 781482, which was reopened for a
later release more feedback is need than what we are currently providing.

Re-reading its comment13 (bug 781482), I also mentioned that build failures do
not seem to be working.

Leaving this open to address that failure.
Comment 2 Imre Farkas 2012-03-08 04:51:09 EST
Created a similar setup and ImageFactory reported build failure correctly so as Conductor. Could you please check imagefactory api if you can see the failed build?
Comment 3 wes hayutin 2012-03-08 12:00:01 EST
Imre, can you post a screenshot please?
Comment 4 Imre Farkas 2012-03-09 05:46:54 EST
Created attachment 568878 [details]
image build failed

Sure. I am also including the ImageFactory API response:

{"_type": "builders", "href": "https://localhost:8075/imagefactory/builders", "builders": [{"status": "FAILED", "_type": "builder", "completed": 0, "provider_account_identifier": null, "image_id": "29e0b4e4-69d3-11e1-85b4-f0def18fbac2", "href": "https://localhost:8075/imagefactory/builders/74a934a4-8ed6-41f4-91d8-850a6ddfbde7", "operation": "build", "id": "74a934a4-8ed6-41f4-91d8-850a6ddfbde7", "build_id": "9c499e3c-ddef-43f9-943e-74f4c2d13218", "target": "rhevm", "provider": null, "target_image_id": null}]}
Comment 5 Rehana 2012-03-12 04:07:47 EDT

I tried this scenario today, when image build failed with below error

2012-03-12 03:13:44,720 DEBUG imgfac.builders.BaseBuilder.RHEL6_vsphere_Builder thread(c3b1ac18) Message: Exception caught in ImageFactory
2012-03-12 03:13:44,721 DEBUG imgfac.builders.BaseBuilder.RHEL6_vsphere_Builder thread(c3b1ac18) Message: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_vsphere_Builder.py", line 49, in build_image
  File "/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_vsphere_Builder.py", line 111, in build_upload
    libvirt_xml = self.guest.install(self.app_config["timeout"])
  File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 1460, in install
    return self._do_install(timeout, force, 0)
  File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 1441, 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 process exited while connecting to monitor: open /dev/kvm: Permission denied
failed to initialize KVM: Operation not permitted 

In conductor it was not showing any message.(PFA)

[root@intel-d3c4702-01 ~]# rpm -qa | grep aeolus
Comment 6 Rehana 2012-03-12 04:08:25 EDT
Created attachment 569296 [details]
build failure
Comment 7 Dave Johnson 2012-05-07 10:56:16 EDT
I have seen this error in the ui but comment 6 differs.

Can we re-check this with both the command line and ui and see if this is completely fixed?
Comment 8 Dave Johnson 2012-05-09 09:06:47 EDT
So questioning if some failures do indeed get through without getting counted as a failed attempt.  Tried to build some window images which failed immediately and those errors were not captured in a failed error count... reopening

7d5f703017d'}) for http://localhost:9090/templates/3f8a0dae-6e96-4896-b36e-f7d5f703017d
2012-05-09 09:02:49,298 ERROR imgfac.rest.imagefactory thread(worker 22) Message: No module named Windows_rhevm_Builder
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/imgfac/rest/imagefactory.py", line 118, in build_image
    jobs = BuildDispatcher().build_image_for_targets(image_id, build_id, template, targets.split(','))
  File "/usr/lib/python2.6/site-packages/imgfac/BuildDispatcher.py", line 61, in build_image_for_targets
    job = job_cls(template, target, image_id, build_id, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/imgfac/BuildJob.py", line 60, in __init__
    self._builder = self._get_builder()
  File "/usr/lib/python2.6/site-packages/imgfac/BuildJob.py", line 141, in _get_builder
ImportError: No module named Windows_rhevm_Builder
2012-05-09 09:02:49,447 DEBUG paste.httpserver.ThreadPool
Comment 9 Imre Farkas 2012-05-09 09:21:49 EDT
As mentioned in Comment 2, the displayed failure count are based on what ImageFactory reports. Could you please check ImageFactory API if you can see the failed build?
Comment 10 Dave Johnson 2012-05-09 10:28:11 EDT
Okay, so I checked the imagefactory api and those window building issues where not there so there is no way for the conductor ui to pick them up.  Throwing this over to imagefactory side for comment.

Basically seeing that some builds fail so early in the process, they do not get a failed status that can bubble up to the conductor ui.
Comment 11 Steve Loranz 2012-05-14 13:57:33 EDT
Building windows images is not yet supported.  Are you seeing incorrect behavior with supported image types (RHEL and Fedora)?

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