Fedora Account System
Red Hat Associate
Red Hat Customer
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:
Can you attach on of those temp files so I can see what's being generated?
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.
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(-)
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(-)
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(-)
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.
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