Bug 816170 - "undefined method `environment' for nil:NilClass" when accessing a deleted image
Summary: "undefined method `environment' for nil:NilClass" when accessing a deleted image
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-conductor
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
Assignee: Tzu-Mainn Chen
QA Contact: Rehana
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-25 12:10 UTC by Shveta
Modified: 2012-12-04 15:07 UTC (History)
7 users (show)

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."
Clone Of:
Environment:
Last Closed: 2012-12-04 15:07:10 UTC
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:1516 0 normal SHIPPED_LIVE CloudForms Cloud Engine 1.1 update 2012-12-04 19:51:45 UTC

Description Shveta 2012-04-25 12:10:12 UTC
Created attachment 580144 [details]
err

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
aeolus-configure-2.5.3-1.el6.noarch
aeolus-conductor-0.8.13-1.el6_2.noarch
aeolus-conductor-daemons-0.8.13-1.el6_2.noarch
aeolus-all-0.8.13-1.el6_2.noarch
aeolus-conductor-doc-0.8.13-1.el6_2.noarch
rubygem-aeolus-image-0.3.0-12.el6.noarch
rubygem-aeolus-cli-0.3.1-1.el6.noarch

Comment 1 wes hayutin 2012-04-25 16:45:40 UTC
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 19:14:58 UTC
Would it be possible to add the stack trace?

Comment 5 Tzu-Mainn Chen 2012-08-17 10:55:58 UTC
Nevermind, patch should be forthcoming.

Comment 6 Tzu-Mainn Chen 2012-08-17 11:19:58 UTC
Patch created:

http://lists.fedorahosted.org/pipermail/aeolus-devel/2012-August/012158.html

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

On 1.1:
commit d9a4ef70ba7600333b25e5444fd8733ca15dd862
Author: Tzu-Mainn Chen <tzumainn>
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>
    (cherry picked from commit d4bb95e7eea2cdbecaf71b86c32b3615be4e803b)

Comment 8 Steve Linabery 2012-09-07 21:53:13 UTC
in build aeolus-conductor-0.13.3-1.el6cf

Comment 10 Aziza Karol 2012-09-21 10:37:27 UTC
"The Image you tried to access cannot be found. It may have been deleted" when tryin to access the deleted image.

verified:
rpm -qa | grep aeolus
aeolus-conductor-daemons-0.13.8-1.el6cf.noarch
rubygem-aeolus-cli-0.7.1-1.el6cf.noarch
aeolus-configure-2.8.6-1.el6cf.noarch
rubygem-aeolus-image-0.3.0-12.el6.noarch
aeolus-conductor-0.13.8-1.el6cf.noarch
aeolus-conductor-doc-0.13.8-1.el6cf.noarch
aeolus-all-0.13.8-1.el6cf.noarch

Comment 12 errata-xmlrpc 2012-12-04 15:07:10 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-1516.html


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