Re: [pve-devel] qemu-server : drive-mirror : die if stats are empty.
What for? Just to log event messages? no ;), of course,that was just an example. Maybe something like a shared memory with last qmp events, to be able to use them from proxmox code it should great to be able to known if a block job have die and the block job error detail, if a bad sector exist by example (for drive-mirror, can be usefull for backup too). IMHO, A block job should store the error somewhere, so that we can query it later. (like I do it for the backup task). Maybe it could be usefull too for other things in the future, like spice qmp events (client connect/disconnectd events). Another idea, maybe it should be possible to stream events to extjs (websocket ?), to instant update running vm status in the gui, without need to pool the status. (It's just an idea ;) Everything is possible ;-) But we now have a simple, stateless interface. I am not really keen to make that more complex. At least I would wait until we really need it. ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] qemu-server : drive-mirror : die if stats are empty.
IMHO, A block job should store the error somewhere, so that we can query it later. (like I do it for the backup task). OH, ok, so indeed if it's possible to retrieve them, it could be great. I'll try to read the qemu code. Everything is possible ;-) But we now have a simple, stateless interface. I am not really keen to make that more complex. At least I would wait until we really need it. Yes, it was just an idea ;) I agree to keep things simple :) - Mail original - De: Dietmar Maurer diet...@proxmox.com À: Alexandre DERUMIER aderum...@odiso.com Cc: pve-devel@pve.proxmox.com Envoyé: Mardi 7 Mai 2013 08:02:54 Objet: RE: [pve-devel] qemu-server : drive-mirror : die if stats are empty. What for? Just to log event messages? no ;), of course,that was just an example. Maybe something like a shared memory with last qmp events, to be able to use them from proxmox code it should great to be able to known if a block job have die and the block job error detail, if a bad sector exist by example (for drive-mirror, can be usefull for backup too). IMHO, A block job should store the error somewhere, so that we can query it later. (like I do it for the backup task). Maybe it could be usefull too for other things in the future, like spice qmp events (client connect/disconnectd events). Another idea, maybe it should be possible to stream events to extjs (websocket ?), to instant update running vm status in the gui, without need to pool the status. (It's just an idea ;) Everything is possible ;-) But we now have a simple, stateless interface. I am not really keen to make that more complex. At least I would wait until we really need it. ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] qemu-server : drive-mirror : die if stats are empty.
On Tue, 07 May 2013 08:07:04 +0200 (CEST) Alexandre DERUMIER aderum...@odiso.com wrote: OH, ok, so indeed if it's possible to retrieve them, it could be great. I'll try to read the qemu code. Why not simply make a new sub where the socket is not closed instantly but instead is closed on demand or add an option to the existing sub which, if true, requires manual closing of the socket? -- 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 -- Aliquid melius quam pessimum optimum non est. signature.asc Description: PGP signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] qemu-server : drive-mirror : die if stats are empty.
Why not simply make a new sub where the socket is not closed instantly but instead is closed on demand or add an option to the existing sub which, if true, requires manual closing of the socket? Because qmp only allows one connection, so that would block any other command. ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] qemu-server : drive-mirror : die if stats are empty.
applied, thanks! -Original Message- From: pve-devel-boun...@pve.proxmox.com [mailto:pve-devel- boun...@pve.proxmox.com] On Behalf Of Alexandre Derumier Sent: Montag, 06. Mai 2013 11:21 To: pve-devel@pve.proxmox.com Subject: [pve-devel] qemu-server : drive-mirror : die if stats are empty. see commit ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] qemu-server : drive-mirror : die if stats are empty.
I had tried to syslog the current qmp response in qmpclient.pm, I got nothing, except events for vm stop, vm cont and cd eject. we close connection immediately, so I guess events arrive later (so we miss them). ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] qemu-server : drive-mirror : die if stats are empty.
about qmp events, I have tested with qmp-shell python script (available in QMP/ in qemu.git), and I can receive the BLOCK_JOB_ERROR BLOCK_JOB_COMPLETED events. I had tried to syslog the current qmp response in qmpclient.pm, I got nothing, except events for vm stop, vm cont and cd eject. Any idea ? (QEMU) drive-mirror device=drive-virtio1 sync=full format=raw target=/var/lib/vz/images/269/test.raw {u'return': {}} (QEMU) query-block-jobs {u'return': [{u'busy': True, u'type': u'mirror', u'len': 21474754560, u'paused': False, u'io-status': u'ok', u'offset': 335396864, u'device': u'drive-virtio1', u'speed': 0}]} (QEMU) query-block-jobs {u'return': [{u'busy': True, u'type': u'mirror', u'len': 21474754560, u'paused': False, u'io-status': u'ok', u'offset': 450674688, u'device': u'drive-virtio1', u'speed': 0}]} (QEMU) query-block-jobs {u'return': [{u'busy': True, u'type': u'mirror', u'len': 21474754560, u'paused': False, u'io-status': u'ok', u'offset': 513589248, u'device': u'drive-virtio1', u'speed': 0}]} (QEMU) query-block-jobs {u'return': [{u'busy': True, u'type': u'mirror', u'len': 21474754560, u'paused': False, u'io-status': u'ok', u'offset': 32288, u'device': u'drive-virtio1', u'speed': 0}]} (QEMU) query-block-jobs {u'return': [{u'busy': True, u'type': u'mirror', u'len': 21474754560, u'paused': False, u'io-status': u'ok', u'offset': 807190528, u'device': u'drive-virtio1', u'speed': 0}]} (QEMU) query-block-jobs {u'return': [{u'busy': True, u'type': u'mirror', u'len': 21474754560, u'paused': False, u'io-status': u'ok', u'offset': 1446428672, u'device': u'drive-virtio1', u'speed': 0}]} (QEMU) query-block-jobs {u'return': [{u'busy': True, u'type': u'mirror', u'len': 21474754560, u'paused': False, u'io-status': u'ok', u'offset': 1750384640, u'device': u'drive-virtio1', u'speed': 0}]} (QEMU) query-block-jobs {u'return': {}} {u'timestamp': {u'seconds': 1367852478, u'microseconds': 693260}, u'data': {u'device': u'drive-virtio1', u'action': u'report', u'operation': u'write'}, u'event': u'BLOCK_JOB_ERROR'} {u'timestamp': {u'seconds': 1367852478, u'microseconds': 696408}, u'data': {u'speed': 0, u'offset': 21461909504, u'len': 21474754560, u'error': u'Invalid argument', u'device': u'drive-virtio1', u'type': u'mirror'}, u'event': u'BLOCK_JOB_COMPLETED'} - Mail original - De: Dietmar Maurer diet...@proxmox.com À: Alexandre Derumier aderum...@odiso.com, pve-devel@pve.proxmox.com Envoyé: Lundi 6 Mai 2013 11:27:34 Objet: RE: [pve-devel] qemu-server : drive-mirror : die if stats are empty. applied, thanks! -Original Message- From: pve-devel-boun...@pve.proxmox.com [mailto:pve-devel- boun...@pve.proxmox.com] On Behalf Of Alexandre Derumier Sent: Montag, 06. Mai 2013 11:21 To: pve-devel@pve.proxmox.com Subject: [pve-devel] qemu-server : drive-mirror : die if stats are empty. see commit ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] qemu-server : drive-mirror : die if stats are empty.
we close connection immediately, so I guess events arrive later (so we miss them). So currently, each process/workers/daemons try to access concurrently to same qmp socket, then need to close it fast to not block other process/workers/daemons right ? Maybe can we improve that (not for proxmox 3.0 because I think it's a big task). Something like a qmp proxy, keeping the connection always open with qmp socket, queueing incoming requests from daemons and parsing continuously the result. Something like --- process-(http/json?)|QMP PROXY | workers-|queuing request |always open /var/run/qemu-server/vmid.qmp daemons-| | | | -|response |---always open-- -| | -| | |events handler syslog/other---| What do you think about this ? - Mail original - De: Dietmar Maurer diet...@proxmox.com À: Alexandre DERUMIER aderum...@odiso.com Cc: pve-devel@pve.proxmox.com Envoyé: Lundi 6 Mai 2013 19:03:13 Objet: RE: [pve-devel] qemu-server : drive-mirror : die if stats are empty. I had tried to syslog the current qmp response in qmpclient.pm, I got nothing, except events for vm stop, vm cont and cd eject. we close connection immediately, so I guess events arrive later (so we miss them). ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] qemu-server : drive-mirror : die if stats are empty.
On Tue, 07 May 2013 02:21:26 +0200 (CEST) Alexandre DERUMIER aderum...@odiso.com wrote: Something like --- process-(http/json?)|QMP PROXY | workers-|queuing request |always open /var/run/qemu-server/vmid.qmp daemons-| | | | -|response |---always open-- -| | -| | |events handler syslog/other---| Instead of a message queue based proxy why not go for a multi process based using select or consider using threads? (I assume such a proxy must be written in C/C++) -- 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 -- The main problem I have with cats is, they're not dogs. -- Kevin Cowherd signature.asc Description: PGP signature ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
Re: [pve-devel] qemu-server : drive-mirror : die if stats are empty.
What for? Just to log event messages? no ;), of course,that was just an example. Maybe something like a shared memory with last qmp events, to be able to use them from proxmox code it should great to be able to known if a block job have die and the block job error detail, if a bad sector exist by example (for drive-mirror, can be usefull for backup too). Maybe it could be usefull too for other things in the future, like spice qmp events (client connect/disconnectd events). Another idea, maybe it should be possible to stream events to extjs (websocket ?), to instant update running vm status in the gui, without need to pool the status. (It's just an idea ;) - Mail original - De: Dietmar Maurer diet...@proxmox.com À: Alexandre DERUMIER aderum...@odiso.com Cc: pve-devel@pve.proxmox.com Envoyé: Mardi 7 Mai 2013 06:05:43 Objet: RE: [pve-devel] qemu-server : drive-mirror : die if stats are empty. What do you think about this ? What for? Just to log event messages? ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel