Bug 1213533 - SCVMM insight gathering via WinRM producing excessive temporary files on Windows OS
Summary: SCVMM insight gathering via WinRM producing excessive temporary files on Wind...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.3.0
Hardware: All
OS: Windows
medium
low
Target Milestone: GA
: 5.4.0
Assignee: Daniel Berger
QA Contact: Milan Falešník
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-20 17:40 UTC by ncatling
Modified: 2015-06-16 12:59 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-16 12:59:04 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Description ncatling 2015-04-20 17:40:39 UTC
Description of problem:
SCVMM insight gathering via WinRM producing excessive temporary files on Windows OS

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

How reproducible:
Discover relationship and power states for large SCVMM provider (example 50+ Hypervisors and 800+ VMs) every 15 minutes (default configuration).

Steps to Reproduce:
1. Add SCVMM provider
2. Discover relationship and power states
3. Leave 15 minute discovery enabled

Actual results:
Windows SCVMM host C:\users\<USER>\AppData\Local\Temp contains approximately 40-50 10MB-15MB files on a daily basis.

Expected results:
Temporary files actively removed.

Additional info:

Comment 2 Daniel Berger 2015-04-28 16:46:39 UTC
Can you attach on of those temp files so I can see what's being generated?

Comment 4 Bronagh Sorota 2015-05-04 15:00:40 UTC
Hi Dan,

At around line 75 in the file:
vmdb/app/models/ems_refresh/parsers/ps_scripts/get_inventory.ps1

we create a temporary file with a random filename and write to it the SCVMM inventory we asked for. The problem is that this file is not deleted when it is closed. I believe there is a flag that can be passed into the GetTempFileName() methods to delete the file when closed.

Comment 5 CFME Bot 2015-05-04 21:00:55 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/b024728fea571a4f44999d2afceaa3d9c8feddae

commit b024728fea571a4f44999d2afceaa3d9c8feddae
Author:     Daniel Berger <dberger>
AuthorDate: Mon May 4 09:35:13 2015 -0600
Commit:     Daniel Berger <dberger>
CommitDate: Mon May 4 09:35:13 2015 -0600

    Delete temp file when finished.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1213533

 vmdb/app/models/ems_refresh/parsers/ps_scripts/get_inventory.ps1 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comment 6 CFME Bot 2015-05-04 21:00:59 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/7bf710e00d1e96c60d4de0b9fe88e37d92a58d52

commit 7bf710e00d1e96c60d4de0b9fe88e37d92a58d52
Author:     Daniel Berger <dberger>
AuthorDate: Mon May 4 12:31:38 2015 -0600
Commit:     Daniel Berger <dberger>
CommitDate: Mon May 4 12:31:38 2015 -0600

    Properly delete temp file after closing.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1213533

 vmdb/app/models/ems_refresh/parsers/ps_scripts/get_inventory.ps1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 7 CFME Bot 2015-05-04 21:01:03 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/7775c889a6b443cfe5d409d8691747b80840360d

commit 7775c889a6b443cfe5d409d8691747b80840360d
Author:     Daniel Berger <dberger>
AuthorDate: Mon May 4 13:41:02 2015 -0600
Commit:     Daniel Berger <dberger>
CommitDate: Mon May 4 13:41:02 2015 -0600

    Removed the misleading $file.close call, which didn't actually do anything.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1213533

 vmdb/app/models/ems_refresh/parsers/ps_scripts/get_inventory.ps1 | 1 -
 1 file changed, 1 deletion(-)

Comment 8 Milan Falešník 2015-05-12 12:10:06 UTC
Verified in 5.4.0.0.26. I see the temporary file being created when Refresh action issued, then the file grows from 0 B to ~1 MB, then it is deleted again and after a while, the refresh finishes in CFME.

Comment 11 errata-xmlrpc 2015-06-16 12:59:04 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.

https://rhn.redhat.com/errata/RHBA-2015-1100.html


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