You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by David Grizzanti <da...@sungard.com> on 2013/10/31 22:07:02 UTC

Question: Error when creating templates from ROOT volumes in the Simulator

Hi All,

I have been seeing an issue with the Simulator that I was hoping someone
could provide some insight into.

Some background. I'm running from the 4.2.0 tag on rhel 6.3, building from
source/enabling the simulator.

Overall, most operations seem to work fine, however, I noticed that when
creating a template from the ROOT volume on a VM, the template can't then
be used to create a subsequent VM.  The reason for this seems to be that
the "size" of the template is set to 0.  After digging through the database
a bit, I discovered that the size and physical_size columns in
the template_store_ref table are set to 0 for these templates.  If I
correct those values for my entry after the fact, everything appears to
work.

I dug around in the code a bit as well, but nothing obvious was jumping out
at me as to why this was happening.

Any thoughts?

Thanks!

-- 
David Grizzanti
Software Engineer
Sungard Availability Services

e: david.grizzanti@sungard.com
w: 215.446.1431
c: 570.575.0315

Re: Question: Error when creating templates from ROOT volumes in the Simulator

Posted by David Grizzanti <da...@sungard.com>.
Ok, thanks Prasanna.  I'm going to create a bug in Jira so we can keep track of the changes (when/if they are needed).

-- 
David Grizzanti
Software Engineer
Sungard Availability Services

e: david.grizzanti@sungard.com
w: 215.446.1431
c: 570.575.0315

On November 7, 2013 at 3:02:09 PM, David Grizzanti (david.grizzanti@sungard.com) wrote:

Prasanna,

I took a look at the SimulatorImageStoreDriverImpl, but it seems like it's setting size correctly in that case.  Also, in trying to step through the code, that section doesn't appear to be called when creating a template from a ROOT volume (I could be doing something wrong though when stepping through the code in debug mode).  You mentioned that it may have been something you missed when updating aft erhte 4.2 storage refactor - is there some other plugin code that I can look at for one of the other hypervisors that might shed some light on the correct way to do this?

Thanks!


On Tue, Nov 5, 2013 at 9:09 AM, David Grizzanti <da...@sungard.com> wrote:
Ok, thanks Prasanna. Will have a look and let you know what I find.


On Tuesday, November 5, 2013, Prasanna Santhanam wrote:
This is a bug. Likely something I missed when adopting the simulator
to the storage refactor in 4.2. You'd want to look at the
SimulatorImageStoreDriverImpl.java#createTemplate() and see how the
template gets registered with 0 size.

On Tue, Nov 05, 2013 at 02:54:00AM -0500, Sebastien Goasguen wrote:
> Pinging Prasanna on this,
>
>
> On Oct 31, 2013, at 5:07 PM, David Grizzanti <da...@sungard.com> wrote:
>
> > Hi All,
> >
> > I have been seeing an issue with the Simulator that I was hoping someone
> > could provide some insight into.
> >
> > Some background. I'm running from the 4.2.0 tag on rhel 6.3, building from
> > source/enabling the simulator.
> >
> > Overall, most operations seem to work fine, however, I noticed that when
> > creating a template from the ROOT volume on a VM, the template can't then
> > be used to create a subsequent VM.  The reason for this seems to be that
> > the "size" of the template is set to 0.  After digging through the database
> > a bit, I discovered that the size and physical_size columns in
> > the template_store_ref table are set to 0 for these templates.  If I
> > correct those values for my entry after the fact, everything appears to
> > work.
> >
> > I dug around in the code a bit as well, but nothing obvious was jumping out
> > at me as to why this was happening.
> >
> > Any thoughts?
> >
> > Thanks!
> >
> > --
> > David Grizzanti
> > Software Engineer
> > Sungard Availability Services
> >
> > e: david.grizzanti@sungard.com
> > w: 215.446.1431
> > c: 570.575.0315

--
Prasanna.,

------------------------
Powered by BigRock.com




--
David Grizzanti
Software Engineer
Sungard Availability Services

e: david.grizzanti@sungard.com
w: 215.446.1431
c: 570.575.0315




--
David Grizzanti
Software Engineer
Sungard Availability Services

e: david.grizzanti@sungard.com
w: 215.446.1431
c: 570.575.0315

Re: Question: Error when creating templates from ROOT volumes in the Simulator

Posted by Prasanna Santhanam <ts...@apache.org>.
David,

I took a little closer look today. I think that the way CloudStack
chooses the motion service to detect that the simulator should copy over a
mock template to a mock location needs intercepting. I'm not fully
privy of the changes to storage code (both in master and 4.2) but will
troubleshoot further tomorrow. Meanwhile if anyone more familiar with
storage code can point us in the right direction, it would be great to
get over this issue.

Thanks,

On Thu, Nov 07, 2013 at 03:02:09PM -0500, David Grizzanti wrote:
> Prasanna,
> 
> I took a look at the SimulatorImageStoreDriverImpl, but it seems like it's
> setting size correctly in that case.  Also, in trying to step through the
> code, that section doesn't appear to be called when creating a template
> from a ROOT volume (I could be doing something wrong though when stepping
> through the code in debug mode).  You mentioned that it may have been
> something you missed when updating aft erhte 4.2 storage refactor - is
> there some other plugin code that I can look at for one of the other
> hypervisors that might shed some light on the correct way to do this?
> 
> Thanks!
> 
> 
> On Tue, Nov 5, 2013 at 9:09 AM, David Grizzanti <david.grizzanti@sungard.com
> > wrote:
> 
> > Ok, thanks Prasanna. Will have a look and let you know what I find.
> >
> >
> > On Tuesday, November 5, 2013, Prasanna Santhanam wrote:
> >
> >> This is a bug. Likely something I missed when adopting the simulator
> >> to the storage refactor in 4.2. You'd want to look at the
> >> SimulatorImageStoreDriverImpl.java#createTemplate() and see how the
> >> template gets registered with 0 size.
> >>
> >> On Tue, Nov 05, 2013 at 02:54:00AM -0500, Sebastien Goasguen wrote:
> >> > Pinging Prasanna on this,
> >> >
> >> >
> >> > On Oct 31, 2013, at 5:07 PM, David Grizzanti <
> >> david.grizzanti@sungard.com> wrote:
> >> >
> >> > > Hi All,
> >> > >
> >> > > I have been seeing an issue with the Simulator that I was hoping
> >> someone
> >> > > could provide some insight into.
> >> > >
> >> > > Some background. I'm running from the 4.2.0 tag on rhel 6.3, building
> >> from
> >> > > source/enabling the simulator.
> >> > >
> >> > > Overall, most operations seem to work fine, however, I noticed that
> >> when
> >> > > creating a template from the ROOT volume on a VM, the template can't
> >> then
> >> > > be used to create a subsequent VM.  The reason for this seems to be
> >> that
> >> > > the "size" of the template is set to 0.  After digging through the
> >> database
> >> > > a bit, I discovered that the size and physical_size columns in
> >> > > the template_store_ref table are set to 0 for these templates.  If I
> >> > > correct those values for my entry after the fact, everything appears
> >> to
> >> > > work.
> >> > >
> >> > > I dug around in the code a bit as well, but nothing obvious was
> >> jumping out
> >> > > at me as to why this was happening.
> >> > >
> >> > > Any thoughts?
> >> > >
> >> > > Thanks!
> >> > >
> >> > > --
> >> > > David Grizzanti
> >> > > Software Engineer
> >> > > Sungard Availability Services
> >> > >
> >> > > e: david.grizzanti@sungard.com
> >> > > w: 215.446.1431
> >> > > c: 570.575.0315
> >>
> >> --
> >> Prasanna.,
> >>
> >> ------------------------
> >> Powered by BigRock.com
> >>
> >>
> >>
> >
> > --
> > David Grizzanti
> > Software Engineer
> > Sungard Availability Services
> >
> > e: david.grizzanti@sungard.com
> > w: 215.446.1431
> > c: 570.575.0315
> >
> >
> 
> 
> -- 
> David Grizzanti
> Software Engineer
> Sungard Availability Services
> 
> e: david.grizzanti@sungard.com
> w: 215.446.1431
> c: 570.575.0315

-- 
Prasanna.,

------------------------
Powered by BigRock.com


Re: Question: Error when creating templates from ROOT volumes in the Simulator

Posted by David Grizzanti <da...@sungard.com>.
Prasanna,

I took a look at the SimulatorImageStoreDriverImpl, but it seems like it's
setting size correctly in that case.  Also, in trying to step through the
code, that section doesn't appear to be called when creating a template
from a ROOT volume (I could be doing something wrong though when stepping
through the code in debug mode).  You mentioned that it may have been
something you missed when updating aft erhte 4.2 storage refactor - is
there some other plugin code that I can look at for one of the other
hypervisors that might shed some light on the correct way to do this?

Thanks!


On Tue, Nov 5, 2013 at 9:09 AM, David Grizzanti <david.grizzanti@sungard.com
> wrote:

> Ok, thanks Prasanna. Will have a look and let you know what I find.
>
>
> On Tuesday, November 5, 2013, Prasanna Santhanam wrote:
>
>> This is a bug. Likely something I missed when adopting the simulator
>> to the storage refactor in 4.2. You'd want to look at the
>> SimulatorImageStoreDriverImpl.java#createTemplate() and see how the
>> template gets registered with 0 size.
>>
>> On Tue, Nov 05, 2013 at 02:54:00AM -0500, Sebastien Goasguen wrote:
>> > Pinging Prasanna on this,
>> >
>> >
>> > On Oct 31, 2013, at 5:07 PM, David Grizzanti <
>> david.grizzanti@sungard.com> wrote:
>> >
>> > > Hi All,
>> > >
>> > > I have been seeing an issue with the Simulator that I was hoping
>> someone
>> > > could provide some insight into.
>> > >
>> > > Some background. I'm running from the 4.2.0 tag on rhel 6.3, building
>> from
>> > > source/enabling the simulator.
>> > >
>> > > Overall, most operations seem to work fine, however, I noticed that
>> when
>> > > creating a template from the ROOT volume on a VM, the template can't
>> then
>> > > be used to create a subsequent VM.  The reason for this seems to be
>> that
>> > > the "size" of the template is set to 0.  After digging through the
>> database
>> > > a bit, I discovered that the size and physical_size columns in
>> > > the template_store_ref table are set to 0 for these templates.  If I
>> > > correct those values for my entry after the fact, everything appears
>> to
>> > > work.
>> > >
>> > > I dug around in the code a bit as well, but nothing obvious was
>> jumping out
>> > > at me as to why this was happening.
>> > >
>> > > Any thoughts?
>> > >
>> > > Thanks!
>> > >
>> > > --
>> > > David Grizzanti
>> > > Software Engineer
>> > > Sungard Availability Services
>> > >
>> > > e: david.grizzanti@sungard.com
>> > > w: 215.446.1431
>> > > c: 570.575.0315
>>
>> --
>> Prasanna.,
>>
>> ------------------------
>> Powered by BigRock.com
>>
>>
>>
>
> --
> David Grizzanti
> Software Engineer
> Sungard Availability Services
>
> e: david.grizzanti@sungard.com
> w: 215.446.1431
> c: 570.575.0315
>
>


-- 
David Grizzanti
Software Engineer
Sungard Availability Services

e: david.grizzanti@sungard.com
w: 215.446.1431
c: 570.575.0315

Re: Question: Error when creating templates from ROOT volumes in the Simulator

Posted by David Grizzanti <da...@sungard.com>.
Ok, thanks Prasanna. Will have a look and let you know what I find.

On Tuesday, November 5, 2013, Prasanna Santhanam wrote:

> This is a bug. Likely something I missed when adopting the simulator
> to the storage refactor in 4.2. You'd want to look at the
> SimulatorImageStoreDriverImpl.java#createTemplate() and see how the
> template gets registered with 0 size.
>
> On Tue, Nov 05, 2013 at 02:54:00AM -0500, Sebastien Goasguen wrote:
> > Pinging Prasanna on this,
> >
> >
> > On Oct 31, 2013, at 5:07 PM, David Grizzanti <
> david.grizzanti@sungard.com <javascript:;>> wrote:
> >
> > > Hi All,
> > >
> > > I have been seeing an issue with the Simulator that I was hoping
> someone
> > > could provide some insight into.
> > >
> > > Some background. I'm running from the 4.2.0 tag on rhel 6.3, building
> from
> > > source/enabling the simulator.
> > >
> > > Overall, most operations seem to work fine, however, I noticed that
> when
> > > creating a template from the ROOT volume on a VM, the template can't
> then
> > > be used to create a subsequent VM.  The reason for this seems to be
> that
> > > the "size" of the template is set to 0.  After digging through the
> database
> > > a bit, I discovered that the size and physical_size columns in
> > > the template_store_ref table are set to 0 for these templates.  If I
> > > correct those values for my entry after the fact, everything appears to
> > > work.
> > >
> > > I dug around in the code a bit as well, but nothing obvious was
> jumping out
> > > at me as to why this was happening.
> > >
> > > Any thoughts?
> > >
> > > Thanks!
> > >
> > > --
> > > David Grizzanti
> > > Software Engineer
> > > Sungard Availability Services
> > >
> > > e: david.grizzanti@sungard.com <javascript:;>
> > > w: 215.446.1431
> > > c: 570.575.0315
>
> --
> Prasanna.,
>
> ------------------------
> Powered by BigRock.com
>
>
>

-- 
David Grizzanti
Software Engineer
Sungard Availability Services

e: david.grizzanti@sungard.com
w: 215.446.1431
c: 570.575.0315

Re: Question: Error when creating templates from ROOT volumes in the Simulator

Posted by Prasanna Santhanam <ts...@apache.org>.
This is a bug. Likely something I missed when adopting the simulator
to the storage refactor in 4.2. You'd want to look at the
SimulatorImageStoreDriverImpl.java#createTemplate() and see how the
template gets registered with 0 size.

On Tue, Nov 05, 2013 at 02:54:00AM -0500, Sebastien Goasguen wrote:
> Pinging Prasanna on this,
> 
> 
> On Oct 31, 2013, at 5:07 PM, David Grizzanti <da...@sungard.com> wrote:
> 
> > Hi All,
> > 
> > I have been seeing an issue with the Simulator that I was hoping someone
> > could provide some insight into.
> > 
> > Some background. I'm running from the 4.2.0 tag on rhel 6.3, building from
> > source/enabling the simulator.
> > 
> > Overall, most operations seem to work fine, however, I noticed that when
> > creating a template from the ROOT volume on a VM, the template can't then
> > be used to create a subsequent VM.  The reason for this seems to be that
> > the "size" of the template is set to 0.  After digging through the database
> > a bit, I discovered that the size and physical_size columns in
> > the template_store_ref table are set to 0 for these templates.  If I
> > correct those values for my entry after the fact, everything appears to
> > work.
> > 
> > I dug around in the code a bit as well, but nothing obvious was jumping out
> > at me as to why this was happening.
> > 
> > Any thoughts?
> > 
> > Thanks!
> > 
> > -- 
> > David Grizzanti
> > Software Engineer
> > Sungard Availability Services
> > 
> > e: david.grizzanti@sungard.com
> > w: 215.446.1431
> > c: 570.575.0315

-- 
Prasanna.,

------------------------
Powered by BigRock.com


Re: Question: Error when creating templates from ROOT volumes in the Simulator

Posted by Sebastien Goasguen <ru...@gmail.com>.
Pinging Prasanna on this,


On Oct 31, 2013, at 5:07 PM, David Grizzanti <da...@sungard.com> wrote:

> Hi All,
> 
> I have been seeing an issue with the Simulator that I was hoping someone
> could provide some insight into.
> 
> Some background. I'm running from the 4.2.0 tag on rhel 6.3, building from
> source/enabling the simulator.
> 
> Overall, most operations seem to work fine, however, I noticed that when
> creating a template from the ROOT volume on a VM, the template can't then
> be used to create a subsequent VM.  The reason for this seems to be that
> the "size" of the template is set to 0.  After digging through the database
> a bit, I discovered that the size and physical_size columns in
> the template_store_ref table are set to 0 for these templates.  If I
> correct those values for my entry after the fact, everything appears to
> work.
> 
> I dug around in the code a bit as well, but nothing obvious was jumping out
> at me as to why this was happening.
> 
> Any thoughts?
> 
> Thanks!
> 
> -- 
> David Grizzanti
> Software Engineer
> Sungard Availability Services
> 
> e: david.grizzanti@sungard.com
> w: 215.446.1431
> c: 570.575.0315