Bug 816170 - "undefined method `environment' for nil:NilClass" when accessing a deleted image
"undefined method `environment' for nil:NilClass" when accessing a deleted image
Product: CloudForms Cloud Engine
Classification: Red Hat
Component: aeolus-conductor (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Tzu-Mainn Chen
Depends On:
  Show dependency treegraph
Reported: 2012-04-25 08:10 EDT by Shveta
Modified: 2012-12-04 10:07 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Attempts to view a deleted image resulted in an incorrect error message: 'undefined method `environment' for nil:NilClass' This fix checks if the image exist before displaying it. If the image does not exist, Cloud Engine redirects to the image page and displays the following error: "The Image you tried to access cannot be found. It may have been deleted."
Story Points: ---
Clone Of:
Last Closed: 2012-12-04 10:07:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
err (178.19 KB, image/png)
2012-04-25 08:10 EDT, Shveta
no flags Details

  None (edit)
Description Shveta 2012-04-25 08:10:12 EDT
Created attachment 580144 [details]

Description of problem:

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

How reproducible:

Steps to Reproduce:
1. Scenario is less likely to occur but here is what i did , i built an image for ec2 
aeolus-image build --target ec2 --template fedora15.tpl -E shv_dev_cloud
Image        Build         Target Image     Target     Status       
------------------------------------     ----------------------------  
e3814aec-8ece-11e1-9f9b-00215e20316a     a0964350-a36f-49fd-a46c-5d4b7cf61d73     c083a7af-5317-4d21-a012-ace06761c7f5     ec2        BUILDING 

2. I could see the image under Clouds-- > Images 
3. Now from cli i deleted that image 
aeolus-image delete --image e3814aec-8ece-11e1-9f9b-00215e20316a
Image: e3814aec-8ece-11e1-9f9b-00215e20316a Deleted Successfully

4. In Ui since the page is not refreshed the image is still there , clicked on that image and i get "undefined method `environment' for nil:NilClass"
Actual results:

Expected results:

Additional info:

rpm -qa|grep aeolus
Comment 1 wes hayutin 2012-04-25 12:45:40 EDT
I think Angus may have a few related bugs to this.. putting in need info for Angus.
Comment 4 Tzu-Mainn Chen 2012-08-16 15:14:58 EDT
Would it be possible to add the stack trace?
Comment 5 Tzu-Mainn Chen 2012-08-17 06:55:58 EDT
Nevermind, patch should be forthcoming.
Comment 6 Tzu-Mainn Chen 2012-08-17 07:19:58 EDT
Patch created:

Comment 7 Matt Wagner 2012-08-29 16:18:41 EDT
Patch ACKed and pushed to master and 1.1.

On 1.1:
commit d9a4ef70ba7600333b25e5444fd8733ca15dd862
Author: Tzu-Mainn Chen <tzumainn@redhat.com>
Date:   Fri Aug 17 07:17:11 2012 -0400

    BZ 816170 check if image can be found at the beginning of 'show'
    Signed-off-by: Matt Wagner <matt.wagner@redhat.com>
    (cherry picked from commit d4bb95e7eea2cdbecaf71b86c32b3615be4e803b)
Comment 8 Steve Linabery 2012-09-07 17:53:13 EDT
in build aeolus-conductor-0.13.3-1.el6cf
Comment 10 Aziza Karol 2012-09-21 06:37:27 EDT
"The Image you tried to access cannot be found. It may have been deleted" when tryin to access the deleted image.

rpm -qa | grep aeolus
Comment 12 errata-xmlrpc 2012-12-04 10:07:10 EST
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.


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