incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Sorensen <shadow...@gmail.com>
Subject Re: [jira] [Updated] (CLOUDSTACK-67) Resizing
Date Thu, 13 Sep 2012 22:06:32 GMT
On Thu, Sep 13, 2012 at 2:47 PM, Wido den Hollander <wido@widodh.nl> wrote:
>
>
> On 09/13/2012 06:08 PM, Marcus Sorensen wrote:
>>
>> On Thu, Sep 13, 2012 at 5:56 AM, Wido den Hollander <wido@widodh.nl>
>> wrote:
>>>
>>>
>>>
>>> On 09/13/2012 06:36 AM, Marcus Sorensen wrote:
>>>>
>>>>
>>>> I mainly wanted to send out some feelers to see if there was an
>>>> imminent branch merge or something. If not, I'll clean up mine a bit
>>>> and let people have a look. I haven't looked into changing the UI yet
>>>> at all, and since it seems there's a redesign in progress maybe I'll
>>>> hold off. The API pieces are all there and work in my test
>>>> environment. There are a few things I had to work around, for example
>>>> it seems we're missing java bindings for key libvirt calls, which I
>>>> implemented via host script instead if your version of libvirtd/virsh
>>>> supports it.
>>>>
>>>
>>> I have a couple of libvirt-java fixes on my list anyway, for Mice Xia
>>> regarding the snapshots. I'll put this on my todo.
>>
>>
>> I was just going off of the documentation here:
>> http://libvirt.org/sources/java/javadoc/
>>
>> I'd need virStorageVolResize() to actually expand the block
>> device/file and virDomainBlockResize() to inform the guest qemu that
>> the block device size has changed.  As mentioned I'm using virsh
>> equivalents.
>>
>
> Both functions are in the libvirt version shipped with RHEL 6.3 and Ubuntu
> 12.04, so that's not the problem.

Yes, and they work via virsh (which the host script uses). It's just a
matter of the java bindings.

>
>
>> Since you seem to know a thing or two about the libvirt code, in
>> addition to the above, the libvirt I have doesn't seem to think it can
>> resize volumes on the pool type 'logical' (0.9.10 via CentOS 6.3).
>> This doesn't bother me since I'm using a host script anyway, but it's
>> yet another barrier to doing everything in java via libvirt.
>>
>> "error: this function is not supported by the connection driver:
>> storage pool does not support changing of volume capacity"
>>
>
> That's correct, see the current code:
> http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/storage/storage_backend_logical.c;h=97152ae605136530172102883cafc56ea775d031;hb=master#l842
>
> It's simply not implemented in the storage backend.
>
> I'll write that on my todo as well :)

Thanks!

>
>
>> Perhaps I could upgrade into a version of libvirt that would work, but
>> I think it's reasonable for people to want it to work out of the box
>> with the latest CentOS/RHEL, so yet another reason to stick with the
>> host script. I haven't followed libvirt development and just thought
>> you might know something about that.
>>
>
> I don't like host scripts since they tend to get old, forgotten, not
> packaged, etc. The best is to always use the libvirt-java bindings, we/I can
> fix those quite easily if something is missing.

I agree, but also I don't want the code to be broken on a giant chunk
of otherwise "current" distributions out there simply because they
don't ship the latest. The point is moot at this point however until
the java bindings are there. Once that's in place I'll look at doing a
fallback to host script and/or some giant neon arrow in the logs or
docs warning that they need a custom libvirt install.

>
> Wido
>
>
>>>> A few questions:
>>>>
>>>> Is all KVM storage that's file based automatically qcow2 in
>>>> cloudstack? That would be NFS and local, are there others?  It should
>>>> be simple for me to add those in and do some testing I think, although
>>>> qemu-img needs to be a specific, fairly recent version to support
>>>> qcow2 resizing.
>>>>
>>>> Which reminds me, cloudstack no longer bundles or requires a custom
>>>> qemu-kvm package, correct? Seems like it did at one point.
>>>>
>>>> Wido, I've played with Ceph a bit and RBD, but it's been maybe a year.
>>>> Is resizing of the RADOS device handled well? Have you played at all
>>>> with resizing the block device file of a live VM and then issuing a
>>>> 'virsh blockresize'?
>>>>
>>>>
>>>
>>> Resizing a block device from a running VM shouldn't be a problem. I'm not
>>> sure if the trigger comes through to the Guest OS that it detects the new
>>> capacity. For a root volume you will need to reboot anyway, since you
>>> can't
>>> detect a disk resize as long as the device is in use, eg mounted.
>>
>>
>> You're correct about the root requiring reboot, of course.  Qemu does
>> make it visible on the live system though with virtio disks, which
>> could be useful.
>>
>>>
>>> So, yes, it should work for RBD. I implemented the resizeVol method in
>>> the
>>> storage backend:
>>>
>>> http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/storage/storage_backend_rbd.c;h=cd37ce7c9e362e42a760ecff6f1db169d489b841;hb=master#l545
>>>
>>> Wido
>>>
>>>
>>>> On Wed, Sep 12, 2012 at 6:36 PM, Edison Su <Edison.su@citrix.com> wrote:
>>>>>
>>>>>
>>>>> Patch is always welcome. Will you change UI also? Maybe we can't check
>>>>> in
>>>>> UI part at this moment, but at least, the backend code should be ok.
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Marcus Sorensen [mailto:shadowsor@gmail.com]
>>>>>> Sent: Wednesday, September 12, 2012 4:36 PM
>>>>>> To: cloudstack-dev@incubator.apache.org
>>>>>> Subject: Re: [jira] [Updated] (CLOUDSTACK-67) Resizing
>>>>>>
>>>>>> I know everyone is working on the release,but is anyone working on
>>>>>> this? I've got a working implementation against KVM/CLVM. I'm not
>>>>>> super interested in setting up environments for all of the various
>>>>>> hypervisor/storage combos, but this could be used as a springboard
for
>>>>>> the other types.
>>>>>>
>>>>>> On Mon, Sep 10, 2012 at 10:52 AM, Alex Huang (JIRA) <jira@apache.org>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>        [ https://issues.apache.org/jira/browse/CLOUDSTACK-
>>>>>>
>>>>>>
>>>>>> 67?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Alex Huang updated CLOUDSTACK-67:
>>>>>>> ---------------------------------
>>>>>>>
>>>>>>>       Fix Version/s: 4.1.0
>>>>>>>
>>>>>>>> Resizing
>>>>>>>> --------
>>>>>>>>
>>>>>>>>                   Key: CLOUDSTACK-67
>>>>>>>>                   URL:
>>>>>>
>>>>>>
>>>>>> https://issues.apache.org/jira/browse/CLOUDSTACK-67
>>>>>>>>
>>>>>>>>
>>>>>>>>               Project: CloudStack
>>>>>>>>            Issue Type: Improvement
>>>>>>>>              Reporter: XxYton
>>>>>>>>               Fix For: 4.1.0
>>>>>>>>
>>>>>>>>
>>>>>>>> Resizing of volumes and instances is not possible right now.
>>>>>>>> Instance resizing should be done without rebooting the VM
if
>>>>>>
>>>>>>
>>>>>> supported by hypervisor.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> This message is automatically generated by JIRA.
>>>>>>> If you think it was sent incorrectly, please contact your JIRA
>>>>>>
>>>>>>
>>>>>> administrators
>>>>>>>
>>>>>>>
>>>>>>> For more information on JIRA, see:
>>>>>>
>>>>>>
>>>>>> http://www.atlassian.com/software/jira

Mime
View raw message