You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Wido den Hollander <wi...@widodh.nl> on 2015/12/19 10:26:52 UTC

[BRAINDUMP][KVM] ISO attachment via HTTP to Instance

Hi,

So I just ran into a issue (again) where a NFS mount was hanging and a
ISO could not be attached. Long story short, NFS goes through kernel
space and causes timeouts, hanging kernels, processes in status D, etc, etc.

Qemu already supports attaching a CD-Rom via HTTP to a VM, I just tried:
http://widodh.o.auroraobjects.eu/qemu_cdrom_iso.png

Thought about this for 30 minutes and figured I write it down here and
maybe work on this later.

Idea would be to implement a HTTP storage pool in libvirt which could talk:
- S3
- WebDAV

It requires the HV to have direct access to the HTTP store, but we do
not need a staging NFS in between.

Since the HTTP talks happen in userspace (Qemu) we can properly timeout
on hanging HTTP requests, get back a status-code if stuff doesn't work
instead of just waiting for ever.

cURL is just a great HTTP library which can do this for us.

With a pre-signed URL you can attach a S3 URL directly to Qemu and via
WebDAV you only need to give in the username+password (if required).

On S3 you can also set the ACL of the ISO objects to Public, that would
rule out the need for a pre-signed URL.

I would love to get rid of NFS here!

This e-mail doesn't mean I'm about to implement it though :) The first
work would be libvirt.

I still have some pending RBD work for libvirt, so maybe I'll  take a
look at this.

Wido

Re: [BRAINDUMP][KVM] ISO attachment via HTTP to Instance

Posted by Wido den Hollander <wi...@widodh.nl>.

On 12/19/2015 12:28 PM, Nux! wrote:
> IMHO the idea is nice, but not sure if it's worth the effort.
> So we'll have primary storage, secondary storage and HTTP ISO library, might be a little bit confusing to users and the gain doesn't seem that big. If your NFS store is not working properly, then you already have other problems as well and you need to fix it.
> 

Sure, you can say that the NFS should just *work*, but we all know stuff
fails.

The problem with NFS is that it goes through kernelspace. A fread() or
fwrite() will just block for ever until the NFS works again.

In userspace and with HTTP you can easily timeout after 30 seconds or so.

> Now if we could have the whole secondary storage in HTTP/Webdav, that'd be early Xmas indeed. :-)
> 

That's the whole idea. I think it should be possible to put the whole
Secondary Storage in HTTP. This could be S3/Swift/WebDAV.

Qemu has a lot of support for HTTP nowadays, so technically it should be
possible.

Wido

> Lucian
> 
> --
> Sent from the Delta quadrant using Borg technology!
> 
> Nux!
> www.nux.ro
> 
> ----- Original Message -----
>> From: "Wido den Hollander" <wi...@widodh.nl>
>> To: dev@cloudstack.apache.org
>> Sent: Saturday, 19 December, 2015 09:26:52
>> Subject: [BRAINDUMP][KVM] ISO attachment via HTTP to Instance
> 
>> Hi,
>>
>> So I just ran into a issue (again) where a NFS mount was hanging and a
>> ISO could not be attached. Long story short, NFS goes through kernel
>> space and causes timeouts, hanging kernels, processes in status D, etc, etc.
>>
>> Qemu already supports attaching a CD-Rom via HTTP to a VM, I just tried:
>> http://widodh.o.auroraobjects.eu/qemu_cdrom_iso.png
>>
>> Thought about this for 30 minutes and figured I write it down here and
>> maybe work on this later.
>>
>> Idea would be to implement a HTTP storage pool in libvirt which could talk:
>> - S3
>> - WebDAV
>>
>> It requires the HV to have direct access to the HTTP store, but we do
>> not need a staging NFS in between.
>>
>> Since the HTTP talks happen in userspace (Qemu) we can properly timeout
>> on hanging HTTP requests, get back a status-code if stuff doesn't work
>> instead of just waiting for ever.
>>
>> cURL is just a great HTTP library which can do this for us.
>>
>> With a pre-signed URL you can attach a S3 URL directly to Qemu and via
>> WebDAV you only need to give in the username+password (if required).
>>
>> On S3 you can also set the ACL of the ISO objects to Public, that would
>> rule out the need for a pre-signed URL.
>>
>> I would love to get rid of NFS here!
>>
>> This e-mail doesn't mean I'm about to implement it though :) The first
>> work would be libvirt.
>>
>> I still have some pending RBD work for libvirt, so maybe I'll  take a
>> look at this.
>>
>> Wido

Re: [BRAINDUMP][KVM] ISO attachment via HTTP to Instance

Posted by Nux! <nu...@li.nux.ro>.
IMHO the idea is nice, but not sure if it's worth the effort.
So we'll have primary storage, secondary storage and HTTP ISO library, might be a little bit confusing to users and the gain doesn't seem that big. If your NFS store is not working properly, then you already have other problems as well and you need to fix it.

Now if we could have the whole secondary storage in HTTP/Webdav, that'd be early Xmas indeed. :-)

Lucian

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

----- Original Message -----
> From: "Wido den Hollander" <wi...@widodh.nl>
> To: dev@cloudstack.apache.org
> Sent: Saturday, 19 December, 2015 09:26:52
> Subject: [BRAINDUMP][KVM] ISO attachment via HTTP to Instance

> Hi,
> 
> So I just ran into a issue (again) where a NFS mount was hanging and a
> ISO could not be attached. Long story short, NFS goes through kernel
> space and causes timeouts, hanging kernels, processes in status D, etc, etc.
> 
> Qemu already supports attaching a CD-Rom via HTTP to a VM, I just tried:
> http://widodh.o.auroraobjects.eu/qemu_cdrom_iso.png
> 
> Thought about this for 30 minutes and figured I write it down here and
> maybe work on this later.
> 
> Idea would be to implement a HTTP storage pool in libvirt which could talk:
> - S3
> - WebDAV
> 
> It requires the HV to have direct access to the HTTP store, but we do
> not need a staging NFS in between.
> 
> Since the HTTP talks happen in userspace (Qemu) we can properly timeout
> on hanging HTTP requests, get back a status-code if stuff doesn't work
> instead of just waiting for ever.
> 
> cURL is just a great HTTP library which can do this for us.
> 
> With a pre-signed URL you can attach a S3 URL directly to Qemu and via
> WebDAV you only need to give in the username+password (if required).
> 
> On S3 you can also set the ACL of the ISO objects to Public, that would
> rule out the need for a pre-signed URL.
> 
> I would love to get rid of NFS here!
> 
> This e-mail doesn't mean I'm about to implement it though :) The first
> work would be libvirt.
> 
> I still have some pending RBD work for libvirt, so maybe I'll  take a
> look at this.
> 
> Wido