Re: [pve-devel] how to catch qmp events ?

2013-03-20 Thread Alexandre DERUMIER
but maybe they just delete the event when there is no connection? 

I will do tests today be sure.


If not it's possible that pvestatd catch an asyn event when doing stats, from 
an qmp command coming from pvedaemon.
Do we have some kind of cross-process memory storage in proxmox ? (It could be 
great to store last X events in central memory location)

 

- Mail original - 

De: Dietmar Maurer diet...@proxmox.com 
À: Alexandre DERUMIER aderum...@odiso.com 
Cc: pve-devel@pve.proxmox.com 
Envoyé: Mardi 19 Mars 2013 18:13:36 
Objet: RE: [pve-devel] how to catch qmp events ? 

 mmm, doc seem to say that events can be send in the response of any qmp 
 query 

but maybe they just delete the event when there is no connection? 
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] how to catch qmp events ?

2013-03-20 Thread Dietmar Maurer
 It could be great to store last X events in central memory location

I think we should not depend on such async information in any way.
Instead, qemu command should store that info if it is really needed.

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] how to catch qmp events ?

2013-03-20 Thread Alexandre DERUMIER
I think we should not depend on such async information in any way. 
Yes, sure, they are only usefull to have some infos/logs. (they are no command 
ids in events, just a timestamp)



I had tried to syslog events, I can syslog resume/pause/tray eject events.
But I can't get any bloc job event



Instead, qemu command should store that info if it is really needed. 

For my specific case, I don't know how it's possible.

- I launch qmp mirror disk, to block-job-mirror start in background.
- then each second, I send a qmp block-job-status.

But on disk sector error (I have verify with qemu-img), the block-job-mirror 
just stop

and qmp block-job-status say no block-job running.

So I really don't know how to retrieve error of the block-job-mirror.



How do you manage this kind of error with backups ? (I think it's also a 
block-job ?)






- Mail original - 

De: Dietmar Maurer diet...@proxmox.com 
À: Alexandre DERUMIER aderum...@odiso.com 
Cc: pve-devel@pve.proxmox.com 
Envoyé: Mercredi 20 Mars 2013 08:35:45 
Objet: RE: [pve-devel] how to catch qmp events ? 

 It could be great to store last X events in central memory location 

I think we should not depend on such async information in any way. 
Instead, qemu command should store that info if it is really needed. 
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] how to catch qmp events ?

2013-03-20 Thread Dietmar Maurer
 and qmp block-job-status say no block-job running.
 
 So I really don't know how to retrieve error of the block-job-mirror.
 
 
 
 How do you manage this kind of error with backups ? (I think it's also a 
 block-job
 ?)

I have an extra command 'backup' which starts the block-job and stores any 
errors.

I guess you should ask on the qemu-devel list how that is intended to work.

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] how to catch qmp events ?

2013-03-19 Thread Dietmar Maurer
 mirror block-job simply stop itself, but I don't have the error message.

There was some recent patches on the qemu-devel list to improve logging, but 
AFAIK
many error messages are still sent to /dev/null when you run with --damonize.



___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] how to catch qmp events ?

2013-03-19 Thread Alexandre DERUMIER
documentation
http://wiki.qemu.org/Features/BlockJob

said that a QMP event BLOCK_JOB_ERROR is send.

But qmp events are async, so I don't known how/when to get them.
(It's not a problem for my block-mirror, proxmox task just stop fine, but I 
don't have the error message)



the are an exammple here too.
http://wiki.qemu.org/QMP

Query VM status

C: { execute: query-status }
S: {
   return: {
   status: running,
   singlestep: false,
   running: true
   }
   }

Asynchronous message

S: { event: BLOCK_IO_ERROR,
 data: { device: ide0-hd1,
   operation: write,
   action: stop },
 timestamp: { seconds: 1265044230, microseconds: 450486 } }


- Mail original - 

De: Dietmar Maurer diet...@proxmox.com 
À: Alexandre DERUMIER aderum...@odiso.com, pve-devel@pve.proxmox.com 
Envoyé: Mardi 19 Mars 2013 17:28:06 
Objet: RE: [pve-devel] how to catch qmp events ? 

 mirror block-job simply stop itself, but I don't have the error message. 

There was some recent patches on the qemu-devel list to improve logging, but 
AFAIK 
many error messages are still sent to /dev/null when you run with --damonize. 
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] how to catch qmp events ?

2013-03-19 Thread Alexandre DERUMIER
mmm, doc seem to say that events can be send in the response of any qmp query

something like this:


- qmp query1
- reponse query1
- qmp query2
- response query2
- event query1


Maybe can we implement log of theses events somewhere ?(syslog, or somewhere in 
proxmox gui ?)
I should be easy to add this in qmpclient.pm


- Mail original - 

De: Alexandre DERUMIER aderum...@odiso.com 
À: Dietmar Maurer diet...@proxmox.com 
Cc: pve-devel@pve.proxmox.com 
Envoyé: Mardi 19 Mars 2013 18:01:23 
Objet: Re: [pve-devel] how to catch qmp events ? 

documentation 
http://wiki.qemu.org/Features/BlockJob 

said that a QMP event BLOCK_JOB_ERROR is send. 

But qmp events are async, so I don't known how/when to get them. 
(It's not a problem for my block-mirror, proxmox task just stop fine, but I 
don't have the error message) 



the are an exammple here too. 
http://wiki.qemu.org/QMP 

Query VM status 

C: { execute: query-status } 
S: { 
return: { 
status: running, 
singlestep: false, 
running: true 
} 
} 

Asynchronous message 

S: { event: BLOCK_IO_ERROR, 
data: { device: ide0-hd1, 
operation: write, 
action: stop }, 
timestamp: { seconds: 1265044230, microseconds: 450486 } } 


- Mail original - 

De: Dietmar Maurer diet...@proxmox.com 
À: Alexandre DERUMIER aderum...@odiso.com, pve-devel@pve.proxmox.com 
Envoyé: Mardi 19 Mars 2013 17:28:06 
Objet: RE: [pve-devel] how to catch qmp events ? 

 mirror block-job simply stop itself, but I don't have the error message. 

There was some recent patches on the qemu-devel list to improve logging, but 
AFAIK 
many error messages are still sent to /dev/null when you run with --damonize. 
___ 
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