Re: [pve-devel] qemu-server : drive-mirror : die if stats are empty.

2013-05-06 Thread Dietmar Maurer
> 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


[pve-devel] qemu-img output format

2013-05-06 Thread Dietmar Maurer
convert on LVM fails with:

# /usr/bin/qemu-img convert -t writeback -p -C -f host_device -O host_device 
/dev/vmdisks/vm-100-disk-1 /dev/vmdisks/vm-101-disk-1
qemu-img: error while writing sector 0: Bad file descriptor

Seems -O host_device is the problem.

Why do we use host_device instead of 'raw'?
___
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.

2013-05-06 Thread Michael Rasmussen
On Tue, 07 May 2013 08:07:04 +0200 (CEST)
Alexandre DERUMIER  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  rasmussen  cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir  datanom  net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir  miras  org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=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.

2013-05-06 Thread Alexandre DERUMIER
>>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"  
À: "Alexandre DERUMIER"  
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.

2013-05-06 Thread Dietmar Maurer
> >>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] default I/O scheduler - CFQ or Deadline?

2013-05-06 Thread Alexandre DERUMIER
>>Yes, but we measure incredible bad performance with cfq. We get fsync 
>>rates of 250 instead of 3000 on ext4 (factor 12!). So iopriorities makes no 
>>sense if you are already 10 time slower? 

Sure !
3000 fsync with which hardware?  hardware raid with write cache ?

For me it's always use deadline with shared storage and local hardware raid 
with cache.

Don't need really cfq for reordering the ios, if the cache of the raid card or 
shared storage can handle this.  



- Mail original - 

De: "Dietmar Maurer"  
À: "Alexandre DERUMIER" , "Martin Maurer" 
 
Cc: pve-devel@pve.proxmox.com 
Envoyé: Mardi 7 Mai 2013 05:48:47 
Objet: RE: [pve-devel] default I/O scheduler - CFQ or Deadline? 

> If I remember, some openvz features works only with cfq ? (ionice, openvz IO 
> priorities) 
> see: 
> http://pve.proxmox.com/pipermail/pve-devel/2012-March/002488.html 

Yes, but we measure incredible bad performance with cfq. We get fsync 
rates of 250 instead of 3000 on ext4 (factor 12!). So iopriorities makes no 
sense if you are already 10 time slower? 
___
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.

2013-05-06 Thread Alexandre DERUMIER
>>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"  
À: "Alexandre DERUMIER"  
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


Re: [pve-devel] qemu-server : drive-mirror : die if stats are empty.

2013-05-06 Thread Dietmar Maurer
> 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


Re: [pve-devel] default I/O scheduler - CFQ or Deadline?

2013-05-06 Thread Dietmar Maurer
> If I remember, some openvz features works only with cfq ? (ionice, openvz IO
> priorities)
> see:
> http://pve.proxmox.com/pipermail/pve-devel/2012-March/002488.html

Yes, but we measure incredible bad performance with cfq. We get fsync
rates of 250 instead of 3000 on ext4 (factor 12!). So iopriorities makes no
sense if you are already 10 time slower?
___
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.

2013-05-06 Thread Michael Rasmussen
On Tue, 07 May 2013 02:21:26 +0200 (CEST)
Alexandre DERUMIER  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  rasmussen  cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir  datanom  net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir  miras  org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=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.

2013-05-06 Thread Alexandre DERUMIER
>>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"  
À: "Alexandre DERUMIER"  
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.

2013-05-06 Thread Alexandre DERUMIER
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"  
À: "Alexandre Derumier" , 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] clone GUI cleanup

2013-05-06 Thread Alexandre DERUMIER
it's working now with last git pull.

I'll do tests this afternoon


- Mail original - 

De: "Dietmar Maurer"  
À: "Alexandre DERUMIER"  
Cc: pve-devel@pve.proxmox.com 
Envoyé: Lundi 6 Mai 2013 11:23:36 
Objet: RE: clone GUI cleanup 

Maybe you need to update the qemu-server package? 

> -Original Message- 
> From: Alexandre DERUMIER [mailto:aderum...@odiso.com] 
> Sent: Montag, 06. Mai 2013 11:10 
> To: Dietmar Maurer 
> Cc: pve-devel@pve.proxmox.com 
> Subject: Re: clone GUI cleanup 
> 
> >>I just committed some patches for the clone Dialog. Does that still works 
> >>for 
> you? 
> 
> I don't know why, but the submit button is always disabled for me ? 
> 
> 
> 
> - Mail original - 
> 
> De: "Dietmar Maurer"  
> À: "Alexandre DERUMIER (aderum...@odiso.com)"  
> Cc: pve-devel@pve.proxmox.com 
> Envoyé: Vendredi 3 Mai 2013 14:02:11 
> Objet: clone GUI cleanup 
> 
> 
> 
> Hi Alexandre, 
> 
> I just committed some patches for the clone Dialog. Does that still works for 
> you? 
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] default I/O scheduler - CFQ or Deadline?

2013-05-06 Thread Alexandre DERUMIER
If I remember, some openvz features works only with cfq ? (ionice, openvz IO 
priorities)
see:
http://pve.proxmox.com/pipermail/pve-devel/2012-March/002488.html


Myself, I'm using deadline (because It's works better for my workload with my 
san), but I use kvm guests.

- Mail original - 

De: "Martin Maurer"  
À: pve-devel@pve.proxmox.com 
Envoyé: Lundi 6 Mai 2013 14:21:54 
Objet: [pve-devel] default I/O scheduler - CFQ or Deadline? 

Hi all, 

We want to discuss the changing of the pve default I/O scheduler from CFQ to 
Deadline. I want to collect feedback, pros and cons here. 

CFQ: 
- only CFQ support priorities (ionice) 

Deadline: 
- No support for priorities but generally faster for KVM in some (or a lot of?) 
systems. 

The scheduler can always be changed manually if the default is not suited (e.g. 
in /etc/default/grub). 

What do you think about this? Please report your thoughts! 

Martin 





___ 
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] qemu-server : drive-mirror : die if stats are empty.

2013-05-06 Thread Dietmar Maurer

> 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] default I/O scheduler - CFQ or Deadline?

2013-05-06 Thread Michael Rasmussen
On Mon, 6 May 2013 12:21:54 +
Martin Maurer  wrote:

> 
> What do you think about this? Please report your thoughts!
> 
I have hosts with SSD using deadline and hosts without SSD using CFQ.
AFAIAK there seems to be no difference running backup jobs with working
ionice or not. For KVM's I have not been able to notice any significant
difference.

-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael  rasmussen  cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir  datanom  net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir  miras  org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--
I kissed my first girl and smoked my first cigarette on the same day.
I haven't had time for tobacco since.
-- Arturo Toscanini


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] default I/O scheduler - CFQ or Deadline?

2013-05-06 Thread Eric Blevins
I have been using deadline for years, KVM machines seem to perform best
with it.

Eric

On 05/06/2013 08:21 AM, Martin Maurer wrote:
> Hi all,
>
> We want to discuss the changing of the pve default I/O scheduler from CFQ to 
> Deadline. I want to collect feedback, pros and cons here.
>
> CFQ:
> - only CFQ support priorities (ionice)
>
> Deadline:
> - No support for priorities but generally faster for KVM in some (or a lot 
> of?) systems.
>
> The scheduler can always be changed manually if the default is not suited 
> (e.g. in /etc/default/grub).
>
> What do you think about this? Please report your thoughts!
>
> Martin
>
>
>
>
>
> ___
> 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] default I/O scheduler - CFQ or Deadline?

2013-05-06 Thread Martin Maurer
Hi all,

We want to discuss the changing of the pve default I/O scheduler from CFQ to 
Deadline. I want to collect feedback, pros and cons here.

CFQ:
- only CFQ support priorities (ionice)

Deadline:
- No support for priorities but generally faster for KVM in some (or a lot of?) 
systems.

The scheduler can always be changed manually if the default is not suited (e.g. 
in /etc/default/grub).

What do you think about this? Please report your thoughts!

Martin





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


Re: [pve-devel] copy_vm: new option -target

2013-05-06 Thread Stefan Priebe - Profihost AG
Am 06.05.2013 13:30, schrieb Dietmar Maurer:
>> Hi yes in this case. But imagine someone is using qemu-img in their on 
>> scripts on
>> shell.
> 
> qemu-img convert always creates the disk.
> 
> The -C option is not documented and only used by pve commands. So what do you 
> think
> is the problem?
> 
Ah sorry id didn't know that. No then i don't see any problem. Sorry.
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] copy_vm: new option -target

2013-05-06 Thread Dietmar Maurer
> Hi yes in this case. But imagine someone is using qemu-img in their on 
> scripts on
> shell.

qemu-img convert always creates the disk.

The -C option is not documented and only used by pve commands. So what do you 
think
is the problem?

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


Re: [pve-devel] copy_vm: new option -target

2013-05-06 Thread Stefan Priebe - Profihost AG
Am 03.05.2013 08:39, schrieb Dietmar Maurer:
>> great idea - but who knows if the target i really zero init or not? so if 
>> somebody
>> generally uses qemu-img and copy on top of an existing disk this is not 
>> correct...
> 
> Either we or qemu-img creates the file, so we know its zero. 
> 
Hi yes in this case. But imagine someone is using qemu-img in their on
scripts on shell.

Stefan


___
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.

2013-05-06 Thread Dietmar Maurer
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] clone GUI cleanup

2013-05-06 Thread Dietmar Maurer
Maybe you need to update the qemu-server package?

> -Original Message-
> From: Alexandre DERUMIER [mailto:aderum...@odiso.com]
> Sent: Montag, 06. Mai 2013 11:10
> To: Dietmar Maurer
> Cc: pve-devel@pve.proxmox.com
> Subject: Re: clone GUI cleanup
> 
> >>I just committed some patches for the clone Dialog. Does that still works 
> >>for
> you?
> 
> I don't know why, but the submit button is always disabled for me ?
> 
> 
> 
> - Mail original -
> 
> De: "Dietmar Maurer" 
> À: "Alexandre DERUMIER (aderum...@odiso.com)" 
> Cc: pve-devel@pve.proxmox.com
> Envoyé: Vendredi 3 Mai 2013 14:02:11
> Objet: clone GUI cleanup
> 
> 
> 
> Hi Alexandre,
> 
> I just committed some patches for the clone Dialog. Does that still works for
> you?

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


[pve-devel] [PATCH] drive-mirror : die if stats are empty.

2013-05-06 Thread Alexandre Derumier
If drive have bad sectors, the block job die.
we need to die if stats are empty to avoid this:

transferred: 21440086016 bytes remaining: 34668544 bytes total: 21474754560 
bytes progression: 99.84 %
Use of uninitialized value $transferred in subtraction (-) at 
/usr/share/perl5/PVE/QemuServer.pm line 4611.
Use of uninitialized value $total in subtraction (-) at 
/usr/share/perl5/PVE/QemuServer.pm line 4611.
Use of uninitialized value $transferred in multiplication (*) at 
/usr/share/perl5/PVE/QemuServer.pm line 4612.
Use of uninitialized value $total in division (/) at 
/usr/share/perl5/PVE/QemuServer.pm line 4612.
clone failed: mirroring error: Illegal division by zero at 
/usr/share/perl5/PVE/QemuServer.pm line 4612.

Maybe it should be improved by catching qmp events, but doesn't seem to work 
for now

Signed-off-by: Alexandre Derumier 
---
 PVE/QemuServer.pm |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index a15bf26..c31d08a 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4606,11 +4606,13 @@ sub qemu_drive_mirror {
while (1) {
my $stats = PVE::QemuServer::vm_mon_cmd($vmid, 
"query-block-jobs");
my $stat = @$stats[0];
+   die "mirroring job seem to have die. Maybe do you have bad 
sectors?" if !$stat;
+   die "error job is not mirroring" if $stat->{type} ne "mirror";
+
my $transferred = $stat->{offset};
my $total = $stat->{len};
my $remaining = $total - $transferred;
my $percent = sprintf "%.2f", ($transferred * 100 / $total);
-   die "error job is not mirroring" if $stat->{type} ne "mirror";
 
 print "transferred: $transferred bytes remaining: $remaining 
bytes total: $total bytes progression: $percent %\n";
 
-- 
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 : drive-mirror : die if stats are empty.

2013-05-06 Thread Alexandre Derumier
see commit

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


Re: [pve-devel] clone GUI cleanup

2013-05-06 Thread Alexandre DERUMIER
>>I just committed some patches for the clone Dialog. Does that still works for 
>>you? 

I don't know why, but the submit button is always disabled for me ?



- Mail original - 

De: "Dietmar Maurer"  
À: "Alexandre DERUMIER (aderum...@odiso.com)"  
Cc: pve-devel@pve.proxmox.com 
Envoyé: Vendredi 3 Mai 2013 14:02:11 
Objet: clone GUI cleanup 



Hi Alexandre, 

I just committed some patches for the clone Dialog. Does that still works for 
you? 
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] qemu_drive_mirror

2013-05-06 Thread Alexandre DERUMIER
Ok,

I'll redo tests with my faulty volume to see if it's help.


- Mail original - 

De: "Dietmar Maurer"  
À: "Alexandre DERUMIER"  
Cc: pve-devel@pve.proxmox.com 
Envoyé: Lundi 6 Mai 2013 09:27:24 
Objet: RE: qemu_drive_mirror 

> Seem that the block-job die. 

No, I simply get a timeout for query-block-jobs 

Just uploaded a fix for that. 
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] qemu_drive_mirror

2013-05-06 Thread Dietmar Maurer
> Seem that the block-job die.

No, I simply get a timeout for query-block-jobs

Just uploaded a fix for that.
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] PVE::Storage::volume_has_feature

2013-05-06 Thread Alexandre DERUMIER
>>That works out of the box.
Ok, perfect !




- Mail original - 

De: "Dietmar Maurer"  
À: "Alexandre DERUMIER"  
Cc: pve-devel@pve.proxmox.com 
Envoyé: Lundi 6 Mai 2013 09:05:05 
Objet: RE: [pve-devel] PVE::Storage::volume_has_feature 

Note: A reference to the base image is stored inside the qcow2 file 

> -Original Message- 
> From: Alexandre DERUMIER [mailto:aderum...@odiso.com] 
> Sent: Montag, 06. Mai 2013 09:03 
> To: Dietmar Maurer 
> Cc: pve-devel@pve.proxmox.com 
> Subject: Re: [pve-devel] PVE::Storage::volume_has_feature 
> 
> also some infos here: 
> 
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] qemu_drive_mirror

2013-05-06 Thread Alexandre DERUMIER
Seem that the block-job die.
Last time I have see that, it was because of a sector error on the volume.
Do you have tried with another volume ?
(does the backup work?)

We should be able to see what exactly happen it with qmp events, but last time 
I have tried, I can't get them 

Maybe does it work since this commit ??:

"do not delete unmatched content from $$input"
https://git.proxmox.com/?p=qemu-server.git;a=blobdiff;f=PVE/QMPClient.pm;h=45fcba4befad6ad252b53a3472aa41bc5e1d452a;hp=6782c377b77cac5577b82eee4a946c54638c8bd4;hb=f4fde4d3760b0b7bfa8537be751fad3910fa39ad;hpb=194d171e6cfedbc5fbf07956259d65ef294b3a0f



I have use drive-mirror in production on around 200 volumes without error, the 
only one dying was a sector error on drive.



- Mail original - 

De: "Dietmar Maurer"  
À: "Alexandre DERUMIER (aderum...@odiso.com)"  
Cc: pve-devel@pve.proxmox.com 
Envoyé: Lundi 6 Mai 2013 09:10:33 
Objet: qemu_drive_mirror 



For me drive-mirror is totally unstable, any idea whats wrong? 

create full clone of drive virtio0 (local:200/vm-200-disk-1.qcow2) 
Formatting 
'/var/lib/vz/images/102/vm-102-disk-1.qcow2', fmt=qcow2 
size=34359738368 encryption=off cluster_size=65536 
preallocation='metadata' lazy_refcounts=off 
transferred: 0 bytes remaining: 34359738368 bytes total: 34359738368 bytes 
progression: 0.00 % 
transferred: 41943040 bytes remaining: 34317795328 bytes total: 34359738368 
bytes progression: 0.12 % 
transferred: 125829120 bytes remaining: 34233909248 bytes total: 34359738368 
bytes progression: 0.37 % 
transferred: 241172480 bytes remaining: 34118565888 bytes total: 34359738368 
bytes progression: 0.70 % 
transferred: 367001600 bytes remaining: 33992736768 bytes total: 34359738368 
bytes progression: 1.07 % 
transferred: 492830720 bytes remaining: 33866907648 bytes total: 34359738368 
bytes progression: 1.43 % 
TASK ERROR: clone failed: mirroring error: at 
/usr/share/perl5/PVE/QemuServer.pm line 4639. 

or 

create full clone of drive virtio0 (local:200/vm-200-disk-1.qcow2) 
Formatting '/var/lib/vz/images/103/vm-103-disk-1.qcow2', fmt=qcow2 
size=34359738368 encryption=off cluster_size=65536 preallocation='metadata' 
lazy_refcounts=off 
transferred: 0 bytes remaining: 34359738368 bytes total: 34359738368 bytes 
progression: 0.00 % 
transferred: 31457280 bytes remaining: 34328281088 bytes total: 34359738368 
bytes progression: 0.09 % 
transferred: 62914560 bytes remaining: 34296823808 bytes total: 34359738368 
bytes progression: 0.18 % 
transferred: 136249344 bytes remaining: 34223489024 bytes total: 34359738368 
bytes progression: 0.40 % 
transferred: 251592704 bytes remaining: 34108145664 bytes total: 34359738368 
bytes progression: 0.73 % 
transferred: 377421824 bytes remaining: 33982316544 bytes total: 34359738368 
bytes progression: 1.10 % 
transferred: 492765184 bytes remaining: 33866973184 bytes total: 34359738368 
bytes progression: 1.43 % 
transferred: 608108544 bytes remaining: 33751629824 bytes total: 34359738368 
bytes progression: 1.77 % 
transferred: 1069481984 bytes remaining: 33290256384 bytes total: 34359738368 
bytes progression: 3.11 % 
transferred: 1604255744 bytes remaining: 32755482624 bytes total: 34359738368 
bytes progression: 4.67 % 
transferred: 2139029504 bytes remaining: 32220708864 bytes total: 34359738368 
bytes progression: 6.23 % 
TASK ERROR: clone failed: mirroring error: VM 200 qmp command 
'block-job-cancel' failed - got timeout 
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] qemu_drive_mirror

2013-05-06 Thread Dietmar Maurer
I guess we need to increase timeout for query-block-jobs - will apply a fix for 
that.

> -Original Message-
> From: pve-devel-boun...@pve.proxmox.com [mailto:pve-devel-
> boun...@pve.proxmox.com] On Behalf Of Dietmar Maurer
> Sent: Montag, 06. Mai 2013 09:11
> To: Alexandre DERUMIER (aderum...@odiso.com)
> Cc: pve-devel@pve.proxmox.com
> Subject: [pve-devel] qemu_drive_mirror
> 
> For me drive-mirror is totally unstable, any idea whats wrong?
> 
> create full clone of drive virtio0 (local:200/vm-200-disk-1.qcow2) Formatting
> '/var/lib/vz/images/102/vm-102-disk-1.qcow2', fmt=qcow2
> size=34359738368 encryption=off cluster_size=65536 preallocation='metadata'
> lazy_refcounts=off
> transferred: 0 bytes remaining: 34359738368 bytes total: 34359738368 bytes
> progression: 0.00 %
> transferred: 41943040 bytes remaining: 34317795328 bytes total: 34359738368
> bytes progression: 0.12 %
> transferred: 125829120 bytes remaining: 34233909248 bytes total:
> 34359738368 bytes progression: 0.37 %
> transferred: 241172480 bytes remaining: 34118565888 bytes total:
> 34359738368 bytes progression: 0.70 %
> transferred: 367001600 bytes remaining: 33992736768 bytes total:
> 34359738368 bytes progression: 1.07 %
> transferred: 492830720 bytes remaining: 33866907648 bytes total:
> 34359738368 bytes progression: 1.43 % TASK ERROR: clone failed: mirroring
> error:  at /usr/share/perl5/PVE/QemuServer.pm line 4639.
> 
> or
> 
> create full clone of drive virtio0 (local:200/vm-200-disk-1.qcow2)
> Formatting '/var/lib/vz/images/103/vm-103-disk-1.qcow2', fmt=qcow2
> size=34359738368 encryption=off cluster_size=65536 preallocation='metadata'
> lazy_refcounts=off
> transferred: 0 bytes remaining: 34359738368 bytes total: 34359738368 bytes
> progression: 0.00 %
> transferred: 31457280 bytes remaining: 34328281088 bytes total: 34359738368
> bytes progression: 0.09 %
> transferred: 62914560 bytes remaining: 34296823808 bytes total: 34359738368
> bytes progression: 0.18 %
> transferred: 136249344 bytes remaining: 34223489024 bytes total:
> 34359738368 bytes progression: 0.40 %
> transferred: 251592704 bytes remaining: 34108145664 bytes total:
> 34359738368 bytes progression: 0.73 %
> transferred: 377421824 bytes remaining: 33982316544 bytes total:
> 34359738368 bytes progression: 1.10 %
> transferred: 492765184 bytes remaining: 33866973184 bytes total:
> 34359738368 bytes progression: 1.43 %
> transferred: 608108544 bytes remaining: 33751629824 bytes total:
> 34359738368 bytes progression: 1.77 %
> transferred: 1069481984 bytes remaining: 33290256384 bytes total:
> 34359738368 bytes progression: 3.11 %
> transferred: 1604255744 bytes remaining: 32755482624 bytes total:
> 34359738368 bytes progression: 4.67 %
> transferred: 2139029504 bytes remaining: 32220708864 bytes total:
> 34359738368 bytes progression: 6.23 %
> TASK ERROR: clone failed: mirroring error: VM 200 qmp command 'block-job-
> cancel' failed - got timeout


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


[pve-devel] qemu_drive_mirror

2013-05-06 Thread Dietmar Maurer
For me drive-mirror is totally unstable, any idea whats wrong?

create full clone of drive virtio0 (local:200/vm-200-disk-1.qcow2)
Formatting
'/var/lib/vz/images/102/vm-102-disk-1.qcow2', fmt=qcow2
size=34359738368 encryption=off cluster_size=65536
preallocation='metadata' lazy_refcounts=off
transferred: 0 bytes remaining: 34359738368 bytes total: 34359738368 bytes 
progression: 0.00 %
transferred: 41943040 bytes remaining: 34317795328 bytes total: 34359738368 
bytes progression: 0.12 %
transferred: 125829120 bytes remaining: 34233909248 bytes total: 34359738368 
bytes progression: 0.37 %
transferred: 241172480 bytes remaining: 34118565888 bytes total: 34359738368 
bytes progression: 0.70 %
transferred: 367001600 bytes remaining: 33992736768 bytes total: 34359738368 
bytes progression: 1.07 %
transferred: 492830720 bytes remaining: 33866907648 bytes total: 34359738368 
bytes progression: 1.43 %
TASK ERROR: clone failed: mirroring error:  at 
/usr/share/perl5/PVE/QemuServer.pm line 4639.

or

create full clone of drive virtio0 (local:200/vm-200-disk-1.qcow2)
Formatting '/var/lib/vz/images/103/vm-103-disk-1.qcow2', fmt=qcow2 
size=34359738368 encryption=off cluster_size=65536 preallocation='metadata' 
lazy_refcounts=off
transferred: 0 bytes remaining: 34359738368 bytes total: 34359738368 bytes 
progression: 0.00 %
transferred: 31457280 bytes remaining: 34328281088 bytes total: 34359738368 
bytes progression: 0.09 %
transferred: 62914560 bytes remaining: 34296823808 bytes total: 34359738368 
bytes progression: 0.18 %
transferred: 136249344 bytes remaining: 34223489024 bytes total: 34359738368 
bytes progression: 0.40 %
transferred: 251592704 bytes remaining: 34108145664 bytes total: 34359738368 
bytes progression: 0.73 %
transferred: 377421824 bytes remaining: 33982316544 bytes total: 34359738368 
bytes progression: 1.10 %
transferred: 492765184 bytes remaining: 33866973184 bytes total: 34359738368 
bytes progression: 1.43 %
transferred: 608108544 bytes remaining: 33751629824 bytes total: 34359738368 
bytes progression: 1.77 %
transferred: 1069481984 bytes remaining: 33290256384 bytes total: 34359738368 
bytes progression: 3.11 %
transferred: 1604255744 bytes remaining: 32755482624 bytes total: 34359738368 
bytes progression: 4.67 %
transferred: 2139029504 bytes remaining: 32220708864 bytes total: 34359738368 
bytes progression: 6.23 %
TASK ERROR: clone failed: mirroring error: VM 200 qmp command 
'block-job-cancel' failed - got timeout

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


Re: [pve-devel] PVE::Storage::volume_has_feature

2013-05-06 Thread Dietmar Maurer
Note: A reference to the base image is stored inside the qcow2 file

> -Original Message-
> From: Alexandre DERUMIER [mailto:aderum...@odiso.com]
> Sent: Montag, 06. Mai 2013 09:03
> To: Dietmar Maurer
> Cc: pve-devel@pve.proxmox.com
> Subject: Re: [pve-devel] PVE::Storage::volume_has_feature
> 
> also some infos here:
> 
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] PVE::Storage::volume_has_feature

2013-05-06 Thread Dietmar Maurer
> I don't known if
> 
> "qemu-img convert vm-200-disk-1.qcow2", will work out of the box or if we
> need to specify the base-xxx somewhere.

That works out of the box.
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] PVE::Storage::volume_has_feature

2013-05-06 Thread Alexandre DERUMIER
also some infos here:

http://www.linux-kvm.com/content/be-more-productive-base-images-part-3

"qemu-img convert -O qcow2 -B master-windows2003-base.qcow2 
master-windows2003.qcow2 final.qcow2"


- Mail original - 

De: "Alexandre DERUMIER"  
À: "Dietmar Maurer"  
Cc: pve-devel@pve.proxmox.com 
Envoyé: Lundi 6 Mai 2013 09:01:13 
Objet: Re: [pve-devel] PVE::Storage::volume_has_feature 

>>Sorry, I did not get that. Please can you explain more elaborate? 

We have a vmid 200, linked clone of vmid 100 with: 

base-100-disk-1.raw ---> vm-200-disk-1.qcow2 

then we want to full clone the vm 200. 

I don't known if 

"qemu-img convert vm-200-disk-1.qcow2", will work out of the box or if we need 
to specify the base-xxx somewhere. 

I never test it, maybe it work, maybe not... 

man say: 
"convert [-c] [-p] [-f fmt] [-t cache] [-O output_fmt] [-o options] [-s 
snapshot_name] [-S sparse_size] filename [filename2 [...]] output_filename" 

seem that we can pass multiple filenames 



- Mail original - 

De: "Dietmar Maurer"  
À: "Alexandre DERUMIER"  
Cc: pve-devel@pve.proxmox.com 
Envoyé: Lundi 6 Mai 2013 08:16:18 
Objet: RE: [pve-devel] PVE::Storage::volume_has_feature 

> Another thing we need to handle, it's full clone of a vm which is a qcow2 
> linked 
> clone. 
> I think we need to add backing files chain in qemu-img convert parameters. 

Sorry, I did not get that. Please can you explain more elaborate? 
___ 
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] PVE::Storage::volume_has_feature

2013-05-06 Thread Alexandre DERUMIER
>>Sorry, I did not get that. Please can you explain more elaborate? 

We have a vmid 200, linked clone of vmid 100 with:

base-100-disk-1.raw ---> vm-200-disk-1.qcow2

then we want to full clone the vm 200.

I don't known if 

"qemu-img convert vm-200-disk-1.qcow2", will work out of the box or if we need 
to specify the base-xxx somewhere.

I never test it, maybe it work, maybe not...

man say:
"convert [-c] [-p] [-f fmt] [-t cache] [-O output_fmt] [-o options] [-s 
snapshot_name] [-S sparse_size] filename [filename2 [...]] output_filename"

seem that we can pass multiple filenames 



- Mail original - 

De: "Dietmar Maurer"  
À: "Alexandre DERUMIER"  
Cc: pve-devel@pve.proxmox.com 
Envoyé: Lundi 6 Mai 2013 08:16:18 
Objet: RE: [pve-devel] PVE::Storage::volume_has_feature 

> Another thing we need to handle, it's full clone of a vm which is a qcow2 
> linked 
> clone. 
> I think we need to add backing files chain in qemu-img convert parameters. 

Sorry, I did not get that. Please can you explain more elaborate? 
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel