Bug 1222951

Summary: RHOS SmartState Analysis may result in leftover EvmSnapshot images
Product: Red Hat CloudForms Management Engine Reporter: Thom Carlin <tcarlin>
Component: SmartState AnalysisAssignee: Rich Oliveri <roliveri>
Status: CLOSED WONTFIX QA Contact: Satyajit Bulage <sbulage>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5.0CC: eminguez, jfrey, jhardy, obarenbo
Target Milestone: GA   
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: openstack:vm:smartstate:snapshot
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-21 13:06:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thom Carlin 2015-05-19 13:31:18 UTC
Description of problem:

When RHOS instance SmartState analysis fails, the EvmSnapshot image may be left behind.

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

5.4

How reproducible:

Frequent

Steps to Reproduce:
1. Run SmartState analysis on instance in RHOS environment
2. (SmartState Analysis fails)
3.

Actual results:

EvmSnapshot image is left

Expected results:

SmartState analysis should cleanup after itself, removing all temporary artifacts (including EvmSnapshot images)

Additional info:

Since this has already been reported by a customer, a KCS article may be warranted.

Comment 2 Thom Carlin 2015-05-19 13:34:16 UTC
Initial workaround [thanks to jkrocil!):

1. SSH into the openstack provider
2. Source the correct environment
  # source ~/keystonerc_admin
3. List EvmSnapshot images
  # glance image-list --name EvmSnapshot
4. Remove those images (grepping for UUIDs)
  # glance image-list --name EvmSnapshot | grep -o
'[0-9a-fA-F]\{8\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{12\}'
| xargs glance image-delete
5. Check that delete was successful and confirm that our other images
are still present
  # glance image-list --name EvmSnapshot

Please note appropriate caution in case others are running SmartState analysis during this period!

Comment 4 Rich Oliveri 2017-08-02 18:03:05 UTC
In most cases, snapshots will be cleaned up in the event of failure.
In some cases, SSA may fail before we're aware the snapshot has been created.

In openstack, snapshots are independent objects (images) with no direct link to the images from which they were created. This makes it more difficult to detect residual snapshots left over from SSA.

Since we can't clean up these snapshots as part of the SSA process, We'll need to implement an asynchronous mechanism to detect and clean up these artifacts after the fact. This could and should be generalized to support other types of objects as well - a general purpose cleanup mechanism.

Comment 5 Chris Pelland 2017-08-21 13:06:35 UTC
This bug has been open for more than a year and is assigned to an older release of CloudForms. 

If you would like to keep this Bugzilla open and if the issue is still present in the latest version of the product, please file a new Bugzilla which will be added and assigned to the latest release of CloudForms.

Comment 6 Chris Pelland 2017-08-21 13:09:06 UTC
This bug has been open for more than a year and is assigned to an older release of CloudForms. 

If you would like to keep this Bugzilla open and if the issue is still present in the latest version of the product, please file a new Bugzilla which will be added and assigned to the latest release of CloudForms.