Closed saksham-oracle closed 1 year ago
Can someone review this? I have made the suggested changes.
Made changes for the failed checks too:
lib/vdsm/virt/vmstats.py:134:80: E501 line too long (81 > 79 characters)
stats['cpuUser'] = 0.00 if stats['cpuUser'] < 0 else stats['cpuUser']
Removed the trailing spaces that caused the test failure last time.
Great, looks good now and CI passes. The last thing to do is to add a proper header line to the commit message. See other commits in Vdsm repository how the first lines of commit messages look like, something like "virt: Fix negative cpuUsed in getAllVmStats" could fit here.
Thanks, made the change.
Ah, I meant the header line of the commit message, not of the PR.
Made the change to commit message.
/ost
/ci
Hm, CI is not in a very good mood today: shaky tests, OST failing, ... @michalskrivanek what can we do about it?
el8stream doesn't work due to ansible 2.14 currently. try el9stream
/ost basic-suite-master el9stream
/ost
/ost basic-suite-master el9stream
/ost basic-suite-master el9stream
/ost basic-suite-master el9stream
Thank you for the contribution!
When calling the command 'vdsm-client Host getAllVmStats', sometimes value of cpuUser was coming negative.
Fix:
The cpuUser value was coming negative due to less accuracy of user_time and system_time values (upto 2 decimal) as compared to cpu_time values (upto 9 decimal) returned by libvirt. Fixed the issue by adding the check in vmstats.py for negative cpuUser values and setting them to 0.
Signed-off-by: Saksham Srivastava saksham.sa.srivastava@oracle.com