Re: [pve-devel] balloon bug in qemu 2.1 ?
maybe this commit http://git.qemu.org/?p=qemu.git;a=commit;h=91ba21208839643603e7f7fa5864723c3f371ebe http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg05176.html virtio-balloon: fix virtio-balloon child refcount in transports diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 40652a7..62f84c4 100644 (file) --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1325,7 +1325,7 @@ static void virtio_balloon_pci_instance_init(Object *obj) VirtIOBalloonPCI *dev = VIRTIO_BALLOON_PCI(obj); object_initialize(dev-vdev, sizeof(dev-vdev), TYPE_VIRTIO_BALLOON); object_property_add_child(obj, virtio-backend, OBJECT(dev-vdev), NULL); - +object_unref(OBJECT(dev-vdev)); object_property_add(obj, guest-stats, guest statistics, balloon_pci_stats_get_all, NULL, NULL, dev, NULL); It's has been applied in qemu 2.1.3 , I'll do test with qemu 2.1.2. - Mail original - De: aderumier aderum...@odiso.com À: datanom.net m...@datanom.net Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 18:14:53 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Thanks Michael That's seem to confirm that the problem come from the -machine option. I'm currently digging inside qemu code to find what does it change. - Mail original - De: datanom.net m...@datanom.net À: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 17:30:00 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? On Thu, 5 Mar 2015 16:44:05 +0100 (CET) Alexandre DERUMIER aderum...@odiso.com wrote: Note that balloon itself is working # info balloon balloon: actual=1024 max_mem=1024 # balloon 512 # info balloon balloon: actual=512 max_mem=1024 Before migration: # info version 2.1.3 # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=75 mem_swapped_in=165457920 mem_swapped_out=401846272 major_page_faults=29400 minor_page_faults=231808189 last_update=1425572879 After migration # info balloon balloon: actual=1024 max_mem=1024 You you stop and start then VM balloon works again. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: May you have many handsome and obedient sons. ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH_V3] Bug Fix 602
now zfs will wait 5 sec if error msg is dataset is busy Signed-off-by: Wolfgang Link w.l...@proxmox.com --- PVE/Storage/ZFSPoolPlugin.pm | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm index 5cbd1b2..999e43e 100644 --- a/PVE/Storage/ZFSPoolPlugin.pm +++ b/PVE/Storage/ZFSPoolPlugin.pm @@ -166,7 +166,7 @@ sub zfs_request { $msg .= $line\n; }; -run_command($cmd, outfunc = $output, timeout = $timeout); +run_command($cmd, errmsg = ERROR, outfunc = $output, timeout = $timeout); return $msg; } @@ -291,7 +291,26 @@ sub zfs_create_zvol { sub zfs_delete_zvol { my ($class, $scfg, $zvol) = @_; -$class-zfs_request($scfg, undef, 'destroy', '-r', $scfg-{pool}/$zvol); +my $ret; +eval {$ret = $class-zfs_request($scfg, undef, 'destroy', '-r', $scfg-{pool}/$zvol);}; +$ret = $@ if $@; + +if ($ret =~ m/^ERROR:(.*)/) { + + if ($ret =~ m/.*: dataset is busy.*/){ + + for(my $i = 0; $ret $i 5; $i++){ + sleep(1); + + eval {$ret = $class-zfs_request($scfg, undef, 'destroy', '-r', $scfg-{pool}/$zvol);}; + $ret = $@ if $@; + } + + die $ret if $ret; + } else { + die $ret; + } +} } sub zfs_list_zvol { -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] qemu-server : balloon: use qom-get for guest balloon statistics V2
changelog: qom values return are stat-free-memory stats-total-memory, not free_mem total_mem ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH] balloon: use qom-get for guest balloon statistics V2
Signed-off-by: Alexandre Derumier aderum...@odiso.com --- PVE/QemuServer.pm | 30 -- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index bb7a7f3..01f671d 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2486,22 +2486,37 @@ sub vmstatus { my $qmpclient = PVE::QMPClient-new(); +my $balloon_guest_stats_cb = sub { + my ($vmid, $resp) = @_; + + my $info = $resp-{'return'}; + my $d = $res-{$vmid}; + + if (defined($info-{stat-total-memory}) defined($info-{stat-free-memory})) { + $d-{mem} = $info-{stat-total-memory} - $info-{stat-free-memory}; + $d-{freemem} = $info-{stat-free-memory}; + } + +}; + my $ballooncb = sub { my ($vmid, $resp) = @_; my $info = $resp-{'return'}; - return if !$info-{max_mem}; + return if !$info-{actual}; my $d = $res-{$vmid}; # use memory assigned to VM - $d-{maxmem} = $info-{max_mem}; $d-{balloon} = $info-{actual}; - if (defined($info-{total_mem}) defined($info-{free_mem})) { - $d-{mem} = $info-{total_mem} - $info-{free_mem}; - $d-{freemem} = $info-{free_mem}; - } + #this can be remove if we remove the pve-qemu-kvm balloon patch + $d-{maxmem} = $info-{max_mem} if $info-{max_mem}; + + + $qmpclient-queue_cmd($vmid, $balloon_guest_stats_cb, 'qom-get', + path = machine/peripheral/balloon0, + property = guest-stats); }; @@ -2524,6 +2539,9 @@ sub vmstatus { $qmpclient-queue_cmd($vmid, $blockstatscb, 'query-blockstats'); # this fails if ballon driver is not loaded, so this must be # the last commnand (following command are aborted if this fails). + # maybe is it fixed by + #http://git.qemu.org/?p=qemu.git;a=commit;h=38dbd48b247ebe05bdc6ef52ccdc60cc21274877 + $qmpclient-queue_cmd($vmid, $ballooncb, 'query-balloon'); my $status = 'unknown'; -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
only max_mem is missing from orignal qmp query-balloon or qom-get. No sure we need to keep a patch just for this. We can use vmid.conf value. (with pending, now we also have true value) This can be retrieve too with qom : stat-total-memory so,only actual balloon value need to an extra qmp query. - Mail original - De: aderumier aderum...@odiso.com À: dietmar diet...@proxmox.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 06:53:46 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? just send a patch. the actual value is return by original query-balloon. only max_mem is missing from orignal qmp query-balloon or qom-get. No sure we need to keep a patch just for this. We can use vmid.conf value. (with pending, now we also have true value) - Mail original - De: dietmar diet...@proxmox.com À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 06:32:22 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? As far I remember, we have make the virtio-balloon-fix-query.patch patch, because at this time, it was impossible to use qom guest-stats to retrieve all values in 1 call (And we wanted to avoid to call 5-6 times qom guest-stats) yes, we use that inside QemuServer::vmstatus, so that needs to be fast because we call it frequently. Now,it seem that we can get all values directly. (excluding actual-max_mem). Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
On Thu, 5 Mar 2015 16:44:05 +0100 (CET) Alexandre DERUMIER aderum...@odiso.com wrote: Note that balloon itself is working # info balloon balloon: actual=1024 max_mem=1024 # balloon 512 # info balloon balloon: actual=512 max_mem=1024 Before migration: # info version 2.1.3 # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=75 mem_swapped_in=165457920 mem_swapped_out=401846272 major_page_faults=29400 minor_page_faults=231808189 last_update=1425572879 After migration # info balloon balloon: actual=1024 max_mem=1024 You you stop and start then VM balloon works again. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: May you have many handsome and obedient sons. pgpF8a3d_d6YY.pgp Description: OpenPGP digital signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATCH] qmp drive_add : remove backslashes from $drive string
Ok,I think we can do it like this. I think that only qemu command line need this, but I'll do tests to be sure. I have checked, it's not so easy. I think we should keep the addslashes in rbdplugin if you have a storage.cfg with monhost with spaces and ports monhost 10.5.0.11:6789; 10.5.0.12:6789; 10.5.0.13:6789 you need to addslashes the : in drive string, but only for mon_host like this: -drive file=rbd:poolceph1/vm-101-disk-1:mon_host=10.5.0.11\:6789; 10.5.0.12\:6789; 10.5.0.13\:6789:id=admin:auth_supported=cephx:keyring=/etc/pve/priv/ceph/cephzimbra.keyring,if=none,id=drive-virtio0,cache=writeback,aio=native,detect-zeroes=on So, rbdplugin seem to be the right place. (in addslashes(), we can remove the ; caracter, only : need to be escape) To get it work with drive_add (with spaces and port), we need to double addslashes my $drive = print_drive_full($storecfg, $vmid, $device); $drive =~ s/\\//g; my $ret = vm_human_monitor_command($vmid, drive_add auto \$drive\); drive_add auto file=rbd:poolceph1/vm-101-disk-8:mon_host=10.5.0.11\\:6789; 10.5.0.12\\:6789; 10.5.0.13\\:6789:id=admin:auth_supported=cephx:keyring=/etc/pve/priv/ceph/cephzimbra.keyring,if=none,id=drive-virtio2,aio=native,cache=none,detect-zeroes=on - Mail original - De: aderumier aderum...@odiso.com À: Stefan Priebe s.pri...@profihost.ag Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Mercredi 4 Mars 2015 17:25:01 Objet: Re: [pve-devel] [PATCH] qmp drive_add : remove backslashes from $drive string But then the part where the qemu command is generated should add the not the rbdplugin. Ok,I think we can do it like this. I think that only qemu command line need this, but I'll do tests to be sure. - Mail original - De: Stefan Priebe s.pri...@profihost.ag À: pve-devel pve-devel@pve.proxmox.com Envoyé: Mardi 3 Mars 2015 08:34:02 Objet: Re: [pve-devel] [PATCH] qmp drive_add : remove backslashes from $drive string Am 03.03.2015 um 08:32 schrieb Alexandre DERUMIER: Oh, ok,I remember now. It's when you defined ceph monitors with ports 10.5.0.11:6789;10.5.0.12:6789;10.5.0.13:6789 you need to addslashes : character, because qemu think it's a separator. But then the part where the qemu command is generated should add the \ not the rbdplugin. Stefan kvm: -drive file=rbd:poolceph1/vm-101-disk-1:mon_host=10.5.0.11:6789;10.5.0.12:6789;10.5.0.13:6789:id=admin:auth_supported=cephx:keyring=/etc/pve/priv/ceph/cephzimbra.keyring,if=none,id=drive-virtio0,cache=writeback,aio=native,detect-zeroes=on: could not open disk image rbd:poolceph1/vm-101-disk-1:mon_host=10.5.0.11:6789;10.5.0.12:6789;10.5.0.13:6789:id=admin:auth_supported=cephx:keyring=/etc/pve/priv/ceph/cephzimbra.keyring: invalid conf option 6789;10.5.0.12:6789;10.5.0.13:6789:id start failed: command '/usr/bin/kvm -id 101 -chardev 'socket,id=qmp,path=/var/run/qemu-server/101.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -vnc unix:/var/run/qemu-server/101.vnc,x509,password -pidfile /var/run/qemu-server/101.pid -daemonize -smbios 'type=1,uuid=3fb4b1fc-f67f-40f1-a85d-f0b71e943564' -name testjessie -smp '4,sockets=1,cores=4,maxcpus=4' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000' -vga cirrus -cpu kvm64,+lahf_lm,+x2apic,+sep -m 2048 -k fr -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:70dd55e9be7e' -drive 'file=/var/lib/vz/images/101/vm-101-disk-1.raw,if=none,id=drive-virtio1,format=raw,aio=native,cache=none,detect-zeroes=on' -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb' -drive 'file=/var/lib/vz/template/iso/debian-jessie-DI-rc1-amd64-CD-1.iso,if=none,id=drive-ide2,media=cdrom,aio=native' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -drive 'file=rbd:poolceph1/vm-101-disk-1:mon_host=10.5.0.11:6789;10.5.0.12:6789;10.5.0.13:6789:id=adm in:auth_supported=cephx:keyring=/etc/pve/priv/ceph/cephzimbra.keyring,if=none,id=drive-virtio0,cache=writeback,aio=native,detect-zeroes=on' -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=101' -netdev 'type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=96:53:C6:C0:9E:D7,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300'' failed: exit code 1 - Mail original - De: aderumier aderum...@odiso.com À: dietmar diet...@proxmox.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Mardi 3 Mars 2015 08:22:12 Objet: Re: [pve-devel] [PATCH] qmp drive_add : remove backslashes from $drive string I am starting to wonder where those \; comes from. Its form PVE::Storage::RBDPlugin::addslashes(). It's me who have done this. But I
Re: [pve-devel] Host freeze exaclty after 00:00h
Hi Detlef, I have seen problems similar to this previously, but only on test clusters. What version of packages? My diagnose was that there was some process gone crazy that affected all the node. I don't think I had CTs there. Did you have VMs running? On 05/03/15 07:55, Detlef Bracker wrote: Dear, I will inform, can been a problem in proxmox, the host freeze from 00:00h (why exactly at 00:00h) until reboot with this problems on host: htop - blank page and q or CTRL+C withour resolution - I must connect via new ssh windoww ps -ef - stops in the list and hangs + CTRL-C without resolution - I must connect via new ssh windoww atop - blank page and q or CTRL+C without resolution - I must connect via new ssh windoww df - hangs and + CTRL+C withour resolution - I must connect via new ssh windoww Proxmox-Statistics after 00:00 h - without graphs Containers all in grey in the GUI without Hostname in the list ok, I start then a shutdown - script for all running containers one container need longer time - and was killing automaticly then much containers down normal one container with 100 % in GUI hangs and shutdown and not shutdown/stop possible (not from GUI/not from console) - only with hard method rm /vz/lock/104.lck vzctl chkpnt 104 --kill all other after this container then shutdown normal Load-AVG absolute hight but no containers runs / and no VMs reboot of Host - signals, but not shutdown ps -ef hangs, but now shows me much prozesses from old day (Host-Prozesses) - posible frozen - I must connect via new ssh windoww reboot -d -n -f then reboot the host and after restarting the host, all runs fine, but now I search the problem! ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel -- Zuzendari Teknikoa / Director Técnico Binovo IT Human Project, S.L. Telf. 943575997 943493611 Astigarraga bidea 2, planta 6 dcha., ofi. 3-2; 20180 Oiartzun (Gipuzkoa) www.binovo.es ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] Host freeze exaclty after 00:00h
Oh, I means I have found from where this was comming! I had before on one container a hacker and I have down this container (blocking customer) and I have forgot to set the onboot=no and yesterday I have restart the host, but this is interessting - and 999 is only a clone from 280 for analysis and this was start yesterday too (bad, why the onboot=no was not set)! Their must been something in the containers that can overload the host, but in cron I have never found and for the 280 the nettraffic was blocked via firewall completly. oom-killer - so interessting for root@ns315405:/var/log$ grep 'oom-killer' syslog.1 Mar 4 22:57:01 ns315405 kernel: 309960 (rrdtool) invoked oom-killer in ub 280 generation 0 gfp 0x200d2 Mar 4 22:57:01 ns315405 kernel: oom-killer in ub 280 generation 0 ends: task died Mar 4 22:57:01 ns315405 kernel: 310006 (mysqld) invoked oom-killer in ub 280 generation 1 gfp 0x200d2 Mar 4 22:57:01 ns315405 kernel: oom-killer in ub 280 generation 1 ends: task died Mar 4 23:20:17 ns315405 kernel: 660490 (rrdtool) invoked oom-killer in ub 280 generation 2 gfp 0x200d2 Mar 4 23:20:17 ns315405 kernel: oom-killer in ub 280 generation 2 ends: task died Mar 4 23:22:26 ns315405 kernel: 754772 (setuidgid) invoked oom-killer in ub 999 generation 0 gfp 0x200d2 Mar 4 23:22:26 ns315405 kernel: oom-killer in ub 999 generation 0 ends: task died Mar 4 23:24:09 ns315405 kernel: 824151 (run) invoked oom-killer in ub 999 generation 1 gfp 0x200d2 Mar 4 23:24:09 ns315405 kernel: oom-killer in ub 999 generation 1 ends: task died Mar 4 23:31:12 ns315405 kernel: 250036 (bash) invoked oom-killer in ub 280 generation 3 gfp 0x200d2 Mar 4 23:31:12 ns315405 kernel: oom-killer in ub 280 generation 3 ends: task died Mar 4 23:37:11 ns315405 kernel: 529499 (vzctl) invoked oom-killer in ub 280 generation 4 gfp 0x8000d0 Mar 4 23:37:11 ns315405 kernel: oom-killer in ub 280 generation 4 ends: task died Mar 4 23:37:41 ns315405 kernel: 549149 (bash) invoked oom-killer in ub 280 generation 5 gfp 0x200d2 Mar 4 23:37:41 ns315405 kernel: oom-killer in ub 280 generation 5 ends: task died Mar 4 23:47:32 ns315405 kernel: 945094 (bash) invoked oom-killer in ub 999 generation 3 gfp 0x200d2 Mar 4 23:47:32 ns315405 kernel: oom-killer in ub 999 generation 3 ends: task died Mar 4 23:54:21 ns315405 kernel: 59703 (rrdtool) invoked oom-killer in ub 999 generation 4 gfp 0x200d2 Mar 4 23:54:21 ns315405 kernel: oom-killer in ub 999 generation 4 ends: task died Mar 4 23:55:01 ns315405 kernel: 72463 (rrdtool) invoked oom-killer in ub 999 generation 5 gfp 0x200d2 Mar 4 23:55:01 ns315405 kernel: oom-killer in ub 999 generation 5 ends: task died Mar 5 00:00:01 ns315405 kernel: 116102 (sgrep) invoked oom-killer in ub 280 generation 12 gfp 0x200d2 Mar 5 00:00:01 ns315405 kernel: oom-killer in ub 280 generation 12 ends: task died Mar 5 00:00:01 ns315405 kernel: 116667 (sh) invoked oom-killer in ub 999 generation 8 gfp 0x200d2 Mar 5 00:00:01 ns315405 kernel: oom-killer in ub 999 generation 8 ends: task died Mar 5 00:00:01 ns315405 kernel: 116838 (ps) invoked oom-killer in ub 999 generation 9 gfp 0x200d2 Mar 5 00:00:01 ns315405 kernel: oom-killer in ub 999 generation 9 ends: task died root@ns315405:/var/log$ signature.asc Description: OpenPGP digital signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
Thanks Michael That's seem to confirm that the problem come from the -machine option. I'm currently digging inside qemu code to find what does it change. - Mail original - De: datanom.net m...@datanom.net À: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 17:30:00 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? On Thu, 5 Mar 2015 16:44:05 +0100 (CET) Alexandre DERUMIER aderum...@odiso.com wrote: Note that balloon itself is working # info balloon balloon: actual=1024 max_mem=1024 # balloon 512 # info balloon balloon: actual=512 max_mem=1024 Before migration: # info version 2.1.3 # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=75 mem_swapped_in=165457920 mem_swapped_out=401846272 major_page_faults=29400 minor_page_faults=231808189 last_update=1425572879 After migration # info balloon balloon: actual=1024 max_mem=1024 You you stop and start then VM balloon works again. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: May you have many handsome and obedient sons. ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
Note that balloon itself is working # info balloon balloon: actual=1024 max_mem=1024 # balloon 512 # info balloon balloon: actual=512 max_mem=1024 - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 16:17:49 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? ok,I speak too fast. It's not related to this patch. on current pve-qemu-kvm 2.1. balloon is working fine # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=941 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=120 minor_page_faults=215272 last_update=1425568324 But if the vm (qemu 2.1) is started with -machine type=pc-i440fx-2.1 or -machine type=pc-i440fx-2.0 (this is the case when you do a live migration) It's not working # info balloon balloon: actual=1024 max_mem=1024 @Andrew, are your vm where you see the info balloon bug, have been migrated from old proxmox (without stop/start ?) can you check in ssh if the kvm process have -machine type in the command line ? - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 16:05:03 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? I need to do more tests, but it seem that this commit (applied on qemu 2.2 but not on qemu 2.1) http://git.qemu.org/?p=qemu.git;a=commit;h=22644cd2c60151a964d9505f4c5f7baf845f20d8 fix the problem with qemu 2.1. (I have tested with the patch, balloon works fine, I need to test without the patch to compare) - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:41:51 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? in proxmox virtio-balloon-fix-query.patch, we have hw/virtio/virtio-balloon.c + + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } + + info-last_update = dev-stats_last_update; + info-has_last_update = true; + + info-mem_swapped_in = dev-stats[VIRTIO_BALLOON_S_SWAP_IN]; + info-has_mem_swapped_in = info-mem_swapped_in = 0 ? true : false; + + info-mem_swapped_out = dev-stats[VIRTIO_BALLOON_S_SWAP_OUT]; + info-has_mem_swapped_out = info-mem_swapped_out = 0 ? true : false; + + info-major_page_faults = dev-stats[VIRTIO_BALLOON_S_MAJFLT]; + info-has_major_page_faults = info-major_page_faults = 0 ? true : false; + + info-minor_page_faults = dev-stats[VIRTIO_BALLOON_S_MINFLT]; + info-has_minor_page_faults = info-minor_page_faults = 0 ? true : false; + so, that mean that in qemu 2.1 + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } one of this 3 funtions is not working - Mail original - De: Andrew Thrift and...@networklabs.co.nz À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:17:58 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Hi Alexandre, This may be the cause of the crashes we have been experiencing. We reported them here: http://forum.proxmox.com/threads/21276-Kernel-Oops-Panic-on-3-10-5-and-3-10-7-Kernels These only started happening since we moved to qemu-2.1.x and we get the same output: # info balloon balloon: actual=16384 max_mem=16384 and have noticed VM's with only 1-2GB usage in the guest reporting almost the entire amount of ram used to the host, even though we have the latest balloon driver loaded and the blnsvr.exe service running. On Thu, Mar 5, 2015 at 11:33 PM, Alexandre DERUMIER aderum...@odiso.com wrote: Hi, I have see a bug report here: http://forum.proxmox.com/threads/2-RAM-Problem-since-Upgrade-to-3-4?p=108367posted=1#post108367 about balloon. on my qemu 2.2 #info balloon balloon: actual=1024 max_mem=2048 total_mem=985 free_mem=895 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=301 minor_page_faults=61411 last_update=1425550707 same vm with qemu 2.2 + -machine type=pc-i440fx-2.1 #info balloon balloon: actual=1024 max_mem=2048 (Don't have true qemu 2.1 for test currently) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___
[pve-devel] balloon bug in qemu 2.1 ?
Hi, I have see a bug report here: http://forum.proxmox.com/threads/2-RAM-Problem-since-Upgrade-to-3-4?p=108367posted=1#post108367 about balloon. on my qemu 2.2 #info balloon balloon: actual=1024 max_mem=2048 total_mem=985 free_mem=895 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=301 minor_page_faults=61411 last_update=1425550707 same vm with qemu 2.2 + -machine type=pc-i440fx-2.1 #info balloon balloon: actual=1024 max_mem=2048 (Don't have true qemu 2.1 for test currently) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
ok,I speak too fast. It's not related to this patch. on current pve-qemu-kvm 2.1. balloon is working fine # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=941 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=120 minor_page_faults=215272 last_update=1425568324 But if the vm (qemu 2.1) is started with -machine type=pc-i440fx-2.1 or -machine type=pc-i440fx-2.0 (this is the case when you do a live migration) It's not working # info balloon balloon: actual=1024 max_mem=1024 @Andrew, are your vm where you see the info balloon bug, have been migrated from old proxmox (without stop/start ?) can you check in ssh if the kvm process have -machine type in the command line ? - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 16:05:03 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? I need to do more tests, but it seem that this commit (applied on qemu 2.2 but not on qemu 2.1) http://git.qemu.org/?p=qemu.git;a=commit;h=22644cd2c60151a964d9505f4c5f7baf845f20d8 fix the problem with qemu 2.1. (I have tested with the patch, balloon works fine, I need to test without the patch to compare) - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:41:51 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? in proxmox virtio-balloon-fix-query.patch, we have hw/virtio/virtio-balloon.c + + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } + + info-last_update = dev-stats_last_update; + info-has_last_update = true; + + info-mem_swapped_in = dev-stats[VIRTIO_BALLOON_S_SWAP_IN]; + info-has_mem_swapped_in = info-mem_swapped_in = 0 ? true : false; + + info-mem_swapped_out = dev-stats[VIRTIO_BALLOON_S_SWAP_OUT]; + info-has_mem_swapped_out = info-mem_swapped_out = 0 ? true : false; + + info-major_page_faults = dev-stats[VIRTIO_BALLOON_S_MAJFLT]; + info-has_major_page_faults = info-major_page_faults = 0 ? true : false; + + info-minor_page_faults = dev-stats[VIRTIO_BALLOON_S_MINFLT]; + info-has_minor_page_faults = info-minor_page_faults = 0 ? true : false; + so, that mean that in qemu 2.1 + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } one of this 3 funtions is not working - Mail original - De: Andrew Thrift and...@networklabs.co.nz À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:17:58 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Hi Alexandre, This may be the cause of the crashes we have been experiencing. We reported them here: http://forum.proxmox.com/threads/21276-Kernel-Oops-Panic-on-3-10-5-and-3-10-7-Kernels These only started happening since we moved to qemu-2.1.x and we get the same output: # info balloon balloon: actual=16384 max_mem=16384 and have noticed VM's with only 1-2GB usage in the guest reporting almost the entire amount of ram used to the host, even though we have the latest balloon driver loaded and the blnsvr.exe service running. On Thu, Mar 5, 2015 at 11:33 PM, Alexandre DERUMIER aderum...@odiso.com wrote: Hi, I have see a bug report here: http://forum.proxmox.com/threads/2-RAM-Problem-since-Upgrade-to-3-4?p=108367posted=1#post108367 about balloon. on my qemu 2.2 #info balloon balloon: actual=1024 max_mem=2048 total_mem=985 free_mem=895 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=301 minor_page_faults=61411 last_update=1425550707 same vm with qemu 2.2 + -machine type=pc-i440fx-2.1 #info balloon balloon: actual=1024 max_mem=2048 (Don't have true qemu 2.1 for test currently) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATCH] drive_add : escape \ character
applied both patches, thanks! ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH] drive_add : escape \ character
storage.cfg --- rbd mystorage monhost 10.5.0.11:6789; 10.5.0.12:6789; 10.5.0.13:6789 drive_add auto file=rbd:poolceph1/vm-101-disk-8:mon_host=10.5.0.11\\:6789; 10.5.0.12\\:6789; 10.5.0.13\\:6789:id=admin:auth_supported=cephx:keyring=/etc/pve/priv/ceph/cephzimbra.keyring,if=none,id=drive-virtio2,aio=native,cache=none,detect-zeroes=on Signed-off-by: Alexandre Derumier aderum...@odiso.com --- PVE/QemuServer.pm |1 + 1 file changed, 1 insertion(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 6b4ad8b..bb7a7f3 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3394,6 +3394,7 @@ sub qemu_driveadd { my ($storecfg, $vmid, $device) = @_; my $drive = print_drive_full($storecfg, $vmid, $device); +$drive =~ s/\\//g; my $ret = vm_human_monitor_command($vmid, drive_add auto \$drive\); # If the command succeeds qemu prints: OK -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
Hi Alexandre, This may be the cause of the crashes we have been experiencing.We reported them here: http://forum.proxmox.com/threads/21276-Kernel-Oops-Panic-on-3-10-5-and-3-10-7-Kernels These only started happening since we moved to qemu-2.1.x and we get the same output: # info balloon balloon: actual=16384 max_mem=16384 and have noticed VM's with only 1-2GB usage in the guest reporting almost the entire amount of ram used to the host, even though we have the latest balloon driver loaded and the blnsvr.exe service running. On Thu, Mar 5, 2015 at 11:33 PM, Alexandre DERUMIER aderum...@odiso.com wrote: Hi, I have see a bug report here: http://forum.proxmox.com/threads/2-RAM-Problem-since-Upgrade-to-3-4?p=108367posted=1#post108367 about balloon. on my qemu 2.2 #info balloon balloon: actual=1024 max_mem=2048 total_mem=985 free_mem=895 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=301 minor_page_faults=61411 last_update=1425550707 same vm with qemu 2.2 + -machine type=pc-i440fx-2.1 #info balloon balloon: actual=1024 max_mem=2048 (Don't have true qemu 2.1 for test currently) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATVH_V2] Bug Fix 602
On 03/05/2015 02:13 PM, Dietmar Maurer wrote: $msg .= $line\n; }; -run_command($cmd, outfunc = $output, timeout = $timeout); +if ($method eq destroy) { + +eval {run_command($cmd, errmsg = 1, outfunc = $output, timeout = $timeout);}; + +if(my $err = $@) { +return ERROR $err; +} You can do exactly the same thing with: if ($method eq destroy) { run_command($cmd, errmsg = ERROR , outfunc = $output, timeout = $timeout); } I.e. there is no need for that additional 'eval'. Please test. Sure, you would need to catch the exceptions at the caller site. ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATVH_V2] Bug Fix 602
On 03/03/2015 01:17 PM, Wolfgang Link wrote: now zfs will wait 5 sec if error msg is dataset is busy Signed-off-by: Wolfgang Link w.l...@proxmox.com --- PVE/Storage/ZFSPoolPlugin.pm | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm index 5cbd1b2..0f666b0 100644 --- a/PVE/Storage/ZFSPoolPlugin.pm +++ b/PVE/Storage/ZFSPoolPlugin.pm @@ -166,7 +166,16 @@ sub zfs_request { $msg .= $line\n; }; -run_command($cmd, outfunc = $output, timeout = $timeout); +if ($method eq destroy) { + + eval {run_command($cmd, errmsg = 1, outfunc = $output, timeout = $timeout);}; + + if(my $err = $@) { + return ERROR $err; + } You can do exactly the same thing with: if ($method eq destroy) { run_command($cmd, errmsg = ERROR , outfunc = $output, timeout = $timeout); } I.e. there is no need for that additional 'eval'. Please test. +} else { + run_command($cmd, outfunc = $output, timeout = $timeout); +} I am also not sure why we cant use above code for all function? We just need to replace 'ERROR ' with something more descriptive: run_command($cmd, errmsg = zfs error: , outfunc = $output, timeout = $timeout); This assume that the zfs commands always return a useful error messages as last line on stderr. But I guess this is a valid assumption? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
I need to do more tests, but it seem that this commit (applied on qemu 2.2 but not on qemu 2.1) http://git.qemu.org/?p=qemu.git;a=commit;h=22644cd2c60151a964d9505f4c5f7baf845f20d8 fix the problem with qemu 2.1. (I have tested with the patch, balloon works fine, I need to test without the patch to compare) - Mail original - De: aderumier aderum...@odiso.com À: Andrew Thrift and...@networklabs.co.nz Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:41:51 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? in proxmox virtio-balloon-fix-query.patch, we have hw/virtio/virtio-balloon.c + + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } + + info-last_update = dev-stats_last_update; + info-has_last_update = true; + + info-mem_swapped_in = dev-stats[VIRTIO_BALLOON_S_SWAP_IN]; + info-has_mem_swapped_in = info-mem_swapped_in = 0 ? true : false; + + info-mem_swapped_out = dev-stats[VIRTIO_BALLOON_S_SWAP_OUT]; + info-has_mem_swapped_out = info-mem_swapped_out = 0 ? true : false; + + info-major_page_faults = dev-stats[VIRTIO_BALLOON_S_MAJFLT]; + info-has_major_page_faults = info-major_page_faults = 0 ? true : false; + + info-minor_page_faults = dev-stats[VIRTIO_BALLOON_S_MINFLT]; + info-has_minor_page_faults = info-minor_page_faults = 0 ? true : false; + so, that mean that in qemu 2.1 + if (!(balloon_stats_enabled(dev) balloon_stats_supported(dev) + dev-stats_last_update)) { + return; + } one of this 3 funtions is not working - Mail original - De: Andrew Thrift and...@networklabs.co.nz À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 15:17:58 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Hi Alexandre, This may be the cause of the crashes we have been experiencing. We reported them here: http://forum.proxmox.com/threads/21276-Kernel-Oops-Panic-on-3-10-5-and-3-10-7-Kernels These only started happening since we moved to qemu-2.1.x and we get the same output: # info balloon balloon: actual=16384 max_mem=16384 and have noticed VM's with only 1-2GB usage in the guest reporting almost the entire amount of ram used to the host, even though we have the latest balloon driver loaded and the blnsvr.exe service running. On Thu, Mar 5, 2015 at 11:33 PM, Alexandre DERUMIER aderum...@odiso.com wrote: Hi, I have see a bug report here: http://forum.proxmox.com/threads/2-RAM-Problem-since-Upgrade-to-3-4?p=108367posted=1#post108367 about balloon. on my qemu 2.2 #info balloon balloon: actual=1024 max_mem=2048 total_mem=985 free_mem=895 mem_swapped_in=0 mem_swapped_out=0 major_page_faults=301 minor_page_faults=61411 last_update=1425550707 same vm with qemu 2.2 + -machine type=pc-i440fx-2.1 #info balloon balloon: actual=1024 max_mem=2048 (Don't have true qemu 2.1 for test currently) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
As far I remember, we have make the virtio-balloon-fix-query.patch patch, because at this time, it was impossible to use qom guest-stats to retrieve all values in 1 call (And we wanted to avoid to call 5-6 times qom guest-stats) yes, we use that inside QemuServer::vmstatus, so that needs to be fast because we call it frequently. Now,it seem that we can get all values directly. (excluding actual-max_mem). Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] [PATCH_V3] Bug Fix 602
On 03/06/2015 05:57 AM, Dietmar Maurer wrote: So this regex will never match! oh, just saw that the colon is added inside run_command - so just ignore this. + + if ($ret =~ m/.*: dataset is busy.*/){ + + for(my $i = 0; $ret $i 5; $i++){ + sleep(1); + + eval {$ret = $class-zfs_request($scfg, undef, 'destroy', '-r', $scfg-{pool}/$zvol);}; Also, this is a code duplication, and can be avoided easily. + $ret = $@ if $@; + } + + die $ret if $ret; + } else { + die $ret; + } +} } sub zfs_list_zvol { -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH] balloon: use qom-get for guest balloon statistics
Signed-off-by: Alexandre Derumier aderum...@odiso.com --- PVE/QemuServer.pm | 30 -- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index bb7a7f3..2bb907c 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2486,22 +2486,37 @@ sub vmstatus { my $qmpclient = PVE::QMPClient-new(); +my $balloon_guest_stats_cb = sub { + my ($vmid, $resp) = @_; + + my $info = $resp-{'return'}; + my $d = $res-{$vmid}; + + if (defined($info-{total_mem}) defined($info-{free_mem})) { + $d-{mem} = $info-{total_mem} - $info-{free_mem}; + $d-{freemem} = $info-{free_mem}; + } + +}; + my $ballooncb = sub { my ($vmid, $resp) = @_; my $info = $resp-{'return'}; - return if !$info-{max_mem}; + return if !$info-{actual}; my $d = $res-{$vmid}; # use memory assigned to VM - $d-{maxmem} = $info-{max_mem}; $d-{balloon} = $info-{actual}; - if (defined($info-{total_mem}) defined($info-{free_mem})) { - $d-{mem} = $info-{total_mem} - $info-{free_mem}; - $d-{freemem} = $info-{free_mem}; - } + #this can be remove if we remove the pve-qemu-kvm balloon patch + $d-{maxmem} = $info-{max_mem} if $info-{max_mem}; + + + $qmpclient-queue_cmd($vmid, $balloon_guest_stats_cb, 'qom-get', + path = machine/peripheral/balloon0, + property = guest-stats); }; @@ -2524,6 +2539,9 @@ sub vmstatus { $qmpclient-queue_cmd($vmid, $blockstatscb, 'query-blockstats'); # this fails if ballon driver is not loaded, so this must be # the last commnand (following command are aborted if this fails). + # maybe is it fixed by + #http://git.qemu.org/?p=qemu.git;a=commit;h=38dbd48b247ebe05bdc6ef52ccdc60cc21274877 + $qmpclient-queue_cmd($vmid, $ballooncb, 'query-balloon'); my $status = 'unknown'; -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] qemu-server: balloon: use qom-get for guest balloon statistics
This patch use qom-get to retrieve guest balloon statisctics, instead to use the proxmox query-balloon patch, which seem to not work anymore when the vm is started with -machine option. I don't have tested it too much, so help is welcome for testing ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? just send a patch. the actual value is return by original query-balloon. only max_mem is missing from orignal qmp query-balloon or qom-get. No sure we need to keep a patch just for this. We can use vmid.conf value. (with pending, now we also have true value) - Mail original - De: dietmar diet...@proxmox.com À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 06:32:22 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? As far I remember, we have make the virtio-balloon-fix-query.patch patch, because at this time, it was impossible to use qom guest-stats to retrieve all values in 1 call (And we wanted to avoid to call 5-6 times qom guest-stats) yes, we use that inside QemuServer::vmstatus, so that needs to be fast because we call it frequently. Now,it seem that we can get all values directly. (excluding actual-max_mem). Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
This can be retrieve too with qom : stat-total-memory so,only actual balloon value need to an extra qmp query. Oops, sorry, this is wrong. qom stat-total-memory = qmp actual I need to rebase my patch for a v3 - Mail original - De: aderumier aderum...@odiso.com À: dietmar diet...@proxmox.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 07:50:44 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? only max_mem is missing from orignal qmp query-balloon or qom-get. No sure we need to keep a patch just for this. We can use vmid.conf value. (with pending, now we also have true value) This can be retrieve too with qom : stat-total-memory so,only actual balloon value need to an extra qmp query. - Mail original - De: aderumier aderum...@odiso.com À: dietmar diet...@proxmox.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 06:53:46 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? just send a patch. the actual value is return by original query-balloon. only max_mem is missing from orignal qmp query-balloon or qom-get. No sure we need to keep a patch just for this. We can use vmid.conf value. (with pending, now we also have true value) - Mail original - De: dietmar diet...@proxmox.com À: aderumier aderum...@odiso.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 06:32:22 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? As far I remember, we have make the virtio-balloon-fix-query.patch patch, because at this time, it was impossible to use qom guest-stats to retrieve all values in 1 call (And we wanted to avoid to call 5-6 times qom guest-stats) yes, we use that inside QemuServer::vmstatus, so that needs to be fast because we call it frequently. Now,it seem that we can get all values directly. (excluding actual-max_mem). Maybe it's time to remove this patch, and use qemu qom implementation ? Would be great, but current code needs 'actual, max_mem'? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH_V4] Bug Fix 602
now zfs will wait 5 sec if error msg is dataset is busy Signed-off-by: Wolfgang Link w.l...@proxmox.com --- PVE/Storage/ZFSPoolPlugin.pm | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm index 5cbd1b2..d8721a4 100644 --- a/PVE/Storage/ZFSPoolPlugin.pm +++ b/PVE/Storage/ZFSPoolPlugin.pm @@ -166,7 +166,7 @@ sub zfs_request { $msg .= $line\n; }; -run_command($cmd, outfunc = $output, timeout = $timeout); +run_command($cmd, errmsg = ERROR, outfunc = $output, timeout = $timeout); return $msg; } @@ -291,7 +291,21 @@ sub zfs_create_zvol { sub zfs_delete_zvol { my ($class, $scfg, $zvol) = @_; -$class-zfs_request($scfg, undef, 'destroy', '-r', $scfg-{pool}/$zvol); +my $ret = ; + +for(my $i = 0; $ret $i 6; $i++){ + + eval {$ret = $class-zfs_request($scfg, undef, 'destroy', '-r', $scfg-{pool}/$zvol);}; + if ($ret = $@) { + if ($ret =~ m/^ERROR:(.*): dataset is busy.*/) { + sleep(1); + } else { + die $ret; + } + } +} + +die $ret if $ret; } sub zfs_list_zvol { -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH] balloon: use qom-get for guest balloon statistics V3
Signed-off-by: Alexandre Derumier aderum...@odiso.com --- PVE/QemuServer.pm | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index bb7a7f3..c884854 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2490,17 +2490,12 @@ sub vmstatus { my ($vmid, $resp) = @_; my $info = $resp-{'return'}; - return if !$info-{max_mem}; - my $d = $res-{$vmid}; - # use memory assigned to VM - $d-{maxmem} = $info-{max_mem}; - $d-{balloon} = $info-{actual}; - - if (defined($info-{total_mem}) defined($info-{free_mem})) { - $d-{mem} = $info-{total_mem} - $info-{free_mem}; - $d-{freemem} = $info-{free_mem}; + if (defined($info-{stat-total-memory}) defined($info-{stat-free-memory})) { + $d-{balloon} = $info-{stat-total-memory}; + $d-{freemem} = $info-{stat-free-memory}; + $d-{mem} = $d-{maxmem} - $d-{freemem}; } }; @@ -2524,7 +2519,13 @@ sub vmstatus { $qmpclient-queue_cmd($vmid, $blockstatscb, 'query-blockstats'); # this fails if ballon driver is not loaded, so this must be # the last commnand (following command are aborted if this fails). - $qmpclient-queue_cmd($vmid, $ballooncb, 'query-balloon'); + # maybe is it fixed by + #http://git.qemu.org/?p=qemu.git;a=commit;h=38dbd48b247ebe05bdc6ef52ccdc60cc21274877 + + $qmpclient-queue_cmd($vmid, $ballooncb, 'qom-get', + path = machine/peripheral/balloon0, + property = guest-stats); + my $status = 'unknown'; if (!defined($status = $resp-{'return'}-{status})) { -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] qemu-server : balloon: use qom-get for guest balloon statistics V3
changelog: only use qom-get, no need to call qmp query-balloon query-ballon actual = qom-get stat-total-memory query-ballon maxmem = config memory value (with pending, the value is accurate now) (I'll try to autoballoning today) ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
[pve-devel] [PATCH] balloon: use qom-get for guest balloon statistics V4
changelog: qom-get return values are $info-{stats}-{stat-total-memory}; $info-{stats}-{stat-free-memory}; and not $info-{stat-total-memory}; $info-{stat-free-memory}; Signed-off-by: Alexandre Derumier aderum...@odiso.com --- PVE/QemuServer.pm | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index bb7a7f3..714a7c9 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2490,17 +2490,12 @@ sub vmstatus { my ($vmid, $resp) = @_; my $info = $resp-{'return'}; - return if !$info-{max_mem}; - my $d = $res-{$vmid}; - # use memory assigned to VM - $d-{maxmem} = $info-{max_mem}; - $d-{balloon} = $info-{actual}; - - if (defined($info-{total_mem}) defined($info-{free_mem})) { - $d-{mem} = $info-{total_mem} - $info-{free_mem}; - $d-{freemem} = $info-{free_mem}; + if (defined($info-{stats}-{stat-total-memory}) defined($info-{stats}-{stat-free-memory})) { + $d-{balloon} = $info-{stats}-{stat-total-memory}; + $d-{freemem} = $info-{stats}-{stat-free-memory}; + $d-{mem} = $d-{maxmem} - $d-{freemem}; } }; @@ -2524,7 +2519,13 @@ sub vmstatus { $qmpclient-queue_cmd($vmid, $blockstatscb, 'query-blockstats'); # this fails if ballon driver is not loaded, so this must be # the last commnand (following command are aborted if this fails). - $qmpclient-queue_cmd($vmid, $ballooncb, 'query-balloon'); + # maybe is it fixed by + #http://git.qemu.org/?p=qemu.git;a=commit;h=38dbd48b247ebe05bdc6ef52ccdc60cc21274877 + + $qmpclient-queue_cmd($vmid, $ballooncb, 'qom-get', + path = machine/peripheral/balloon0, + property = guest-stats); + my $status = 'unknown'; if (!defined($status = $resp-{'return'}-{status})) { -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
Seem to be a proxmox bug finally (or maybe proxmox use a path not used anymore by qemu), using qom balloon guest-stats (with the guest is started with -machine ..) my $stats = vm_mon_cmd_nocheck($vmid, 'qom-get', path = machine/peripheral/balloon0, property = guest-stats); $VAR1 = { 'last-update' = 1425614800, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0,'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044,'stat-swap-out' = 0 } }; $VAR1 = { 'last-update' = 1425614814, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0,'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044,'stat-swap-out' = 0 } }; $VAR1 = { 'last-update' = 1425614840, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0,'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044,'stat-swap-out' = 0 } }; $VAR1 = { 'last-update' = 1425614932, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0,'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044,'stat-swap-out' = 0 } }; # info balloon balloon: actual=4096 max_mem=4096 # info balloon balloon: actual=4096 max_mem=4096 # info balloon balloon: actual=4096 max_mem=4096 - Mail original - De: aderumier aderum...@odiso.com À: datanom.net m...@datanom.net Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 20:15:15 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? maybe this commit http://git.qemu.org/?p=qemu.git;a=commit;h=91ba21208839643603e7f7fa5864723c3f371ebe http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg05176.html virtio-balloon: fix virtio-balloon child refcount in transports diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 40652a7..62f84c4 100644 (file) --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1325,7 +1325,7 @@ static void virtio_balloon_pci_instance_init(Object *obj) VirtIOBalloonPCI *dev = VIRTIO_BALLOON_PCI(obj); object_initialize(dev-vdev, sizeof(dev-vdev), TYPE_VIRTIO_BALLOON); object_property_add_child(obj, virtio-backend, OBJECT(dev-vdev), NULL); - + object_unref(OBJECT(dev-vdev)); object_property_add(obj, guest-stats, guest statistics, balloon_pci_stats_get_all, NULL, NULL, dev, NULL); It's has been applied in qemu 2.1.3 , I'll do test with qemu 2.1.2. - Mail original - De: aderumier aderum...@odiso.com À: datanom.net m...@datanom.net Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 18:14:53 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Thanks Michael That's seem to confirm that the problem come from the -machine option. I'm currently digging inside qemu code to find what does it change. - Mail original - De: datanom.net m...@datanom.net À: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 17:30:00 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? On Thu, 5 Mar 2015 16:44:05 +0100 (CET) Alexandre DERUMIER aderum...@odiso.com wrote: Note that balloon itself is working # info balloon balloon: actual=1024 max_mem=1024 # balloon 512 # info balloon balloon: actual=512 max_mem=1024 Before migration: # info version 2.1.3 # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=75 mem_swapped_in=165457920 mem_swapped_out=401846272 major_page_faults=29400 minor_page_faults=231808189 last_update=1425572879 After migration # info balloon balloon: actual=1024 max_mem=1024 You you stop and start then VM balloon works again. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: May you have many handsome and obedient sons. ___ pve-devel mailing
Re: [pve-devel] balloon bug in qemu 2.1 ?
@Dietmar: As far I remember, we have make the virtio-balloon-fix-query.patch patch, because at this time, it was impossible to use qom guest-stats to retrieve all values in 1 call (And we wanted to avoid to call 5-6 times qom guest-stats) Now,it seem that we can get all values directly. (excluding actual-max_mem). Maybe it's time to remove this patch, and use qemu qom implementation ? - Mail original - De: aderumier aderum...@odiso.com À: datanom.net m...@datanom.net, dietmar diet...@proxmox.com Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Vendredi 6 Mars 2015 05:26:58 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Seem to be a proxmox bug finally (or maybe proxmox use a path not used anymore by qemu), using qom balloon guest-stats (with the guest is started with -machine ..) my $stats = vm_mon_cmd_nocheck($vmid, 'qom-get', path = machine/peripheral/balloon0, property = guest-stats); $VAR1 = { 'last-update' = 1425614800, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0, 'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044, 'stat-swap-out' = 0 } }; $VAR1 = { 'last-update' = 1425614814, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0, 'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044, 'stat-swap-out' = 0 } }; $VAR1 = { 'last-update' = 1425614840, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0, 'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044, 'stat-swap-out' = 0 } }; $VAR1 = { 'last-update' = 1425614932, 'stats' = { 'stat-free-memory' = 993222656, 'stat-swap-in' = 0, 'stat-total-memory' = 1051348992, 'stat-major-faults' = 210, 'stat-minor-faults' = 516044, 'stat-swap-out' = 0 } }; # info balloon balloon: actual=4096 max_mem=4096 # info balloon balloon: actual=4096 max_mem=4096 # info balloon balloon: actual=4096 max_mem=4096 - Mail original - De: aderumier aderum...@odiso.com À: datanom.net m...@datanom.net Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 20:15:15 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? maybe this commit http://git.qemu.org/?p=qemu.git;a=commit;h=91ba21208839643603e7f7fa5864723c3f371ebe http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg05176.html virtio-balloon: fix virtio-balloon child refcount in transports diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 40652a7..62f84c4 100644 (file) --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1325,7 +1325,7 @@ static void virtio_balloon_pci_instance_init(Object *obj) VirtIOBalloonPCI *dev = VIRTIO_BALLOON_PCI(obj); object_initialize(dev-vdev, sizeof(dev-vdev), TYPE_VIRTIO_BALLOON); object_property_add_child(obj, virtio-backend, OBJECT(dev-vdev), NULL); - + object_unref(OBJECT(dev-vdev)); object_property_add(obj, guest-stats, guest statistics, balloon_pci_stats_get_all, NULL, NULL, dev, NULL); It's has been applied in qemu 2.1.3 , I'll do test with qemu 2.1.2. - Mail original - De: aderumier aderum...@odiso.com À: datanom.net m...@datanom.net Cc: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 18:14:53 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? Thanks Michael That's seem to confirm that the problem come from the -machine option. I'm currently digging inside qemu code to find what does it change. - Mail original - De: datanom.net m...@datanom.net À: pve-devel pve-devel@pve.proxmox.com Envoyé: Jeudi 5 Mars 2015 17:30:00 Objet: Re: [pve-devel] balloon bug in qemu 2.1 ? On Thu, 5 Mar 2015 16:44:05 +0100 (CET) Alexandre DERUMIER aderum...@odiso.com wrote: Note that balloon itself is working # info balloon balloon: actual=1024 max_mem=1024 # balloon 512 # info balloon balloon: actual=512 max_mem=1024 Before migration: # info version 2.1.3 # info balloon balloon: actual=1024 max_mem=1024 total_mem=1002 free_mem=75 mem_swapped_in=165457920 mem_swapped_out=401846272 major_page_faults=29400 minor_page_faults=231808189 last_update=1425572879 After migration # info balloon balloon: actual=1024 max_mem=1024 You you stop and start then VM balloon works again. -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael at rasmussen dot cc http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xD3C9A00E mir at datanom dot net http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE501F51C mir at miras dot org http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xE3E80917 -- /usr/games/fortune -es says: May you have many handsome and obedient sons. ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel
Re: [pve-devel] [PATCH_V3] Bug Fix 602
-run_command($cmd, outfunc = $output, timeout = $timeout); +run_command($cmd, errmsg = ERROR, outfunc = $output, timeout = $timeout); Note: you use ERROR here - without collon. return $msg; } @@ -291,7 +291,26 @@ sub zfs_create_zvol { sub zfs_delete_zvol { my ($class, $scfg, $zvol) = @_; -$class-zfs_request($scfg, undef, 'destroy', '-r', $scfg-{pool}/$zvol); +my $ret; +eval {$ret = $class-zfs_request($scfg, undef, 'destroy', '-r', $scfg-{pool}/$zvol);}; +$ret = $@ if $@; + +if ($ret =~ m/^ERROR:(.*)/) { So this regex will never match! + + if ($ret =~ m/.*: dataset is busy.*/){ + + for(my $i = 0; $ret $i 5; $i++){ + sleep(1); + + eval {$ret = $class-zfs_request($scfg, undef, 'destroy', '-r', $scfg-{pool}/$zvol);}; Also, this is a code duplication, and can be avoided easily. + $ret = $@ if $@; + } + + die $ret if $ret; + } else { + die $ret; + } +} } sub zfs_list_zvol { -- 1.7.10.4 ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] balloon bug in qemu 2.1 ?
On March 6, 2015 at 5:26 AM Alexandre DERUMIER aderum...@odiso.com wrote: Seem to be a proxmox bug finally (or maybe proxmox use a path not used anymore by qemu), using qom balloon guest-stats (with the guest is started with -machine ..) Maybe you can try to find out what we do differently? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel