Bug 1429124

Summary: The cleanup process is never started because of bugs in the code
Product: Red Hat CloudForms Management Engine Reporter: Martin Povolny <mpovolny>
Component: ProvidersAssignee: Martin Povolny <mpovolny>
Status: CLOSED CURRENTRELEASE QA Contact: Kedar Kulkarni <kkulkarn>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: dajo, jfrey, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1431164 (view as bug list) Environment:
Last Closed: 2017-06-12 17:24:54 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:
Bug Depends On:    
Bug Blocks: 1431164    

Description Martin Povolny 2017-03-04 18:26:27 UTC
Description of problem:

The remote console proxy cleanup process is never started because of some bugs in the code


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


How reproducible:
always

Steps to Reproduce:
1. open consoles in a proxy setup
2. watch the system_consoles table grow

Actual results:

Opening consoles to the same VM creates more and more records in the system_consoles table.

select port from system_consoles 
where host_name = '123.123.123.123' group by port having count(port)>1;
 port 
------
 6052

Expected results:

No VM should have more than one record.

Additional info:

Comment 2 Martin Povolny 2017-03-04 18:27:19 UTC
Merged upstream PR:

https://github.com/ManageIQ/manageiq/pull/13659

Comment 8 Kedar Kulkarni 2017-05-25 16:07:51 UTC
I was successfully able to create the environment and produce the scenario to validate it. Reproduction steps are given below for future reference. 

Steps: 
- Took 2 CFME Appliances
- Configured both to use same VMDB 
- Enabled Web Socket and UI Role on one appliance, turning off all other roles that were Turned On by default
- Disabled Web Socket and UI role on other appliance leaving other roles as they were by default
- Added VMware as provider 
- Opened HTML5 VNC console for one of the VMware VMs and then checked the vmdb with select query by SSHing the appliance and running psql

Outcome: 
I never saw any duplicate entries in the system_consoles table when I opened multiple VM Consoles for any given VM.