Bug 1402496

Summary: Balloon: Stats don't work if balloon driver is disabled when blnsvr service starts
Product: Red Hat Enterprise Linux 7 Reporter: Ladi Prosek <lprosek>
Component: virtio-winAssignee: Ladi Prosek <lprosek>
virtio-win sub component: virtio-win-prewhql QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: unspecified CC: ailan, coli, juzhang, lijin, lmiksik, yuhuang
Version: 7.3   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: CDevice::Start does not wait for the thread to initialize Consequence: The balloon service does not correctly handle the case where the driver is not present or is disabled when the service starts. The start command succeeds, but stats won't start coming after the driver is enabled. Fix: Make Start wait for the thread to get to the point where it won't return unless explicitly told so.This way "m_hThread != NULL" is always in sync with "thread is running". Start() and Stop() being serialized guarantee the correctness here. Result: balloon stat come back normally after driver is enabled
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 12:55:38 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: 1401400    

Description Ladi Prosek 2016-12-07 16:33:18 UTC
Description of problem:
The balloon service does not correctly handle the case where the driver is not present or is disabled when the service starts. The start command succeeds, but stats won't start coming after the driver is enabled.

Version-Release number of selected component (if applicable):
virtio-win-1.9.0-3.el7

How reproducible:
100%

Steps to Reproduce:
1. blnsvr.exe -s
2. disable VirtIO Balloon Driver
3. blnsvr.exe -r
4. enable VirtIO Balloon Driver

Actual results:
Stats are not coming.

Expected results:
Stats start coming as soon as the driver is enabled.

Additional info:

Comment 2 lijin 2017-02-03 05:25:20 UTC
Reproduce this issue with virtio-win-1.9.0-3.el7;
Verify this issue with virtio-win-prewhql-0.1-131;

Steps same as comment#0.

with virtio-win-1.9.0-3.el7, balloon stats does NOT return values after step4:
{"return": {"stats": {"stat-swap-out": -1, "stat-available-memory": -1, "stat-free-memory": -1, "stat-minor-faults": -1, "stat-major-faults": -1, "stat-total-memory": -1, "stat-swap-in": -1}, "last-update": 1486098878}};

with virtio-win-prewhql-0.1-131,balloon stats comes back after step4:
{"return": {"stats": {"stat-swap-out": 45428736, "stat-available-memory": -1, "stat-free-memory": 2094915584, "stat-minor-faults": 12228586, "stat-major-faults": 115429, "stat-total-memory": 3220688896, "stat-swap-in": 2984939520}, "last-update": 1486098842}}

So this issue has been fixed,thanks.

Comment 5 errata-xmlrpc 2017-08-01 12:55:38 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://access.redhat.com/errata/RHBA-2017:2341