Block I/O Values are coming 0 from zun stats

The Bulk stats are coming 0 in case we are fetching from zun
However, docker sdk is giving the stats properly in a different
field

Closes-Bug: #2013046
Change-Id: Ia55262f33222f5ca2f041be0b34b96840a47b727
This commit is contained in:
Malleswari Varanasi 2023-04-06 08:33:50 -07:00
parent 0288a45178
commit 4aba8e9a5b
1 changed files with 2 additions and 2 deletions

View File

@ -989,9 +989,9 @@ class DockerDriver(driver.BaseDriver, driver.ContainerDriver,
io_read = 0
io_write = 0
for item in (blk_stats or []):
if 'Read' == item['op']:
if item['op'].lower() == 'read':
io_read = io_read + item['value']
if 'Write' == item['op']:
if item['op'].lower() == 'write':
io_write = io_write + item['value']
# Note(hongbin): CNI network won't have this key