Bug 1249928

Summary: virt-who does not log out of vcenter
Product: Red Hat Enterprise Linux 6 Reporter: Chris Roberts <chrobert>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED ERRATA QA Contact: gaoshang <sgao>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: axel.thimm, hsun, ovasik, rbalakri, salmy, shihliu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-who-0.16-8.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-10 23:55:52 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: 1172231, 1272873    
Attachments:
Description Flags
before_start.jpeg
none
after_start.jpeg none

Description Chris Roberts 2015-08-04 07:39:00 UTC
Description of problem:
There is a lot of user sessions within vsphere. We are provisioning VMs with kickstart (Satellite 6.0.8).  In our experience, the provisioning does not completely succeed if a VM does not have a proper entitlements hence the regular updates. If the entitlements are not properly assigned to a VM through the mapping of ESX/VDC-Licence<->VM, the required channels are not available to install puppet.

Version-Release number of selected component (if applicable):
virt-who-0.12,
virt-who-0.13



Actual results:
multiple virt-who session running


Expected results:
one virt-who session per user session.

Additional info:
ESXi 5.5.0 Build 2068190, 
  VCenter 5.5 build 2442329,
  Satellite 6.0.8

Comment 2 Radek Novacek 2015-12-17 12:30:03 UTC
Fixed by rebase to virt-who-0.16-1.el6.

Comment 4 Liushihui 2016-03-30 05:51:20 UTC
Reopen it on virt-who-0.16-7.el6.noarch since UserSession can't decrease to previous number when virt-who is stopped. Therefore, reopen it.

Checked version:
virt-who-0.16-7.el6.noarch 
subscription-manager-1.16.8-7.el6.x86_64 
python-rhsm-1.16.6-1.el6.x86_64

Checked process:
1. Register system to satellite
2. Open https://[vcenterip]/mob/?moid=SessionManager, it will show nine usersession, please see before_start.jpeg in attachment.
sessionList["5214164e-91e3-ab38-82a7-a128d2232d76"]	UserSession
sessionList["521e2188-1256-0d99-b24b-4e5bd0c3c5cc"]	UserSession
sessionList["523d6d9d-2606-7ca2-9eaa-57a398df7477"]	UserSession
sessionList["52b932ea-3882-25ed-b06a-c588db4fb0dd"]	UserSession
sessionList["52d46dc6-4fe8-84ae-3d2c-1a453dc0afeb"]	UserSession
sessionList["52e10221-fb7b-81a4-668d-f69a83b63b2d"]	UserSession
sessionList["52e724a0-569c-dea1-1d8b-0270d4225ab9"]	UserSession
sessionList["52f26848-0354-2f9f-621c-a037dd2d68b0"]	UserSession
sessionList["52fcfcc2-d887-89d5-a5b6-5230425f8058"]	UserSession
3. Configure virt-who run at esx mode and restart virt-who service.
4. Open https://[vcenterip]/mob/?moid=SessionManager, it will show ten usersession.please see after_start.jpeg in attachment.
sessionList["5214164e-91e3-ab38-82a7-a128d2232d76"]	UserSession
======================This is the new session=====================
sessionList["521b7b63-3061-0a15-24c9-e3e1de6a0dd2"]	UserSession
===================================================================
sessionList["521e2188-1256-0d99-b24b-4e5bd0c3c5cc"]	UserSession
sessionList["523d6d9d-2606-7ca2-9eaa-57a398df7477"]	UserSession
sessionList["52b932ea-3882-25ed-b06a-c588db4fb0dd"]	UserSession
sessionList["52d46dc6-4fe8-84ae-3d2c-1a453dc0afeb"]	UserSession
sessionList["52e10221-fb7b-81a4-668d-f69a83b63b2d"]	UserSession
sessionList["52e724a0-569c-dea1-1d8b-0270d4225ab9"]	UserSession
sessionList["52f26848-0354-2f9f-621c-a037dd2d68b0"]	UserSession
sessionList["52fcfcc2-d887-89d5-a5b6-5230425f8058"]	UserSession
5. Stop virt-who service, then open https://[vcenterip]/mob/?moid=SessionManager, it still show ten UserSession as before.
[root@dell-pesc440-01 virt-who.d]# service virt-who stop
Stopping virt-who: [  OK  ]
[root@dell-pesc440-01 virt-who.d]# service virt-who status
virt-who is stopped
[root@dell-pesc440-01 virt-who.d]# ps -ef|grep virt-who
root     10210  3919  0 01:48 pts/1    00:00:00 grep virt-who


Result:
UserSession isn't decrease to previous number(9) after stop virt-who service

Comment 5 Liushihui 2016-03-30 05:52:21 UTC
Created attachment 1141551 [details]
before_start.jpeg

Comment 6 Liushihui 2016-03-30 05:52:44 UTC
Created attachment 1141552 [details]
after_start.jpeg

Comment 7 Radek Novacek 2016-03-31 11:47:08 UTC
The fix for this issue is already applied upstream:

https://github.com/virt-who/virt-who/commit/2980cfae728fbcb3193c38c52a4efb2a9054197a

It's fairly simple fix, proposing for blocker.

Comment 8 Radek Novacek 2016-03-31 14:39:42 UTC
Fixed in virt-who-0.16-8.el6.

Comment 9 Eko 2016-04-11 07:30:48 UTC
Verified, the id will be removed from UserSession list after after stop virt-who service.

Comment 11 errata-xmlrpc 2016-05-10 23:55:52 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/RHEA-2016-0859.html