Discussion:
[pve-devel] [PATCH container] fix #2014: don't check if unpriv for blkio
Oguz Bektas
2018-12-07 10:34:42 UTC
Permalink
Signed-off-by: Oguz Bektas <***@proxmox.com>
---
src/PVE/LXC.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 787d34f..ab15ec0 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -254,7 +254,7 @@ sub vmstatus {
}

if (-d '/sys/fs/cgroup/blkio') {
- my $blkio_bytes = read_cgroup_value('blkio', $vmid, $unpriv, 'blkio.throttle.io_service_bytes', 1);
+ my $blkio_bytes = read_cgroup_value('blkio', $vmid, 0, 'blkio.throttle.io_service_bytes', 1); # don't check if unpriv
my @bytes = split(/\n/, $blkio_bytes);
foreach my $byte (@bytes) {
if (my ($key, $value) = $byte =~ /(Read|Write)\s+(\d+)/) {
--
2.11.0
Loading...