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/09/09 21:04:28 UTC
Question: Supported API calls in the Simulator
Hi All,
I was curious is there is a known set of API calls that will/should work
when CloudStack is in simulator mode?
Some background. I'm running CS 4.2 (commit
8d043c0e4d4c9ace8628f542eacf19e5339e28e8 to be specific), on rhel 6.3
64-bit, built from source following simulator instructions here:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-+Testing+with+Python#Marvin-TestingwithPython-Building
Simulator appears to work fine, however, I'm starting encounter API calls
that fail. Specifically attachVolume fails with a NullPointerException.
Is this a bug within the simulator or a known limitation?
Log statement for attachVolume:
ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-19:job-30 = [
fca87e69-c688-428c-82ca-4a44f5b169ff ]) Unexpected exception while
executing org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd
java.lang.NullPointerException
at
com.cloud.hypervisor.dao.HypervisorCapabilitiesDaoImpl.getMaxDataVolumesLimit(HypervisorCapabilitiesDaoImpl.java:90)
at
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
at
com.cloud.storage.VolumeManagerImpl.getMaxDataVolumesSupported(VolumeManagerImpl.java:1696)
at
com.cloud.storage.VolumeManagerImpl.attachVolumeToVM(VolumeManagerImpl.java:1762)
at
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
at
org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd.execute(AttachVolumeCmd.java:122)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:158)
at
com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:531)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
Thanks!
--
David Grizzanti
Software Engineer
Sungard Availability Services
e: david.grizzanti@sungard.com
w: 215.446.1431
c: 570.575.0315
Re: Question: Supported API calls in the Simulator
Posted by David Grizzanti <da...@sungard.com>.
Including a row in hypervisor_capabilities table for 'Simulator' as
hypervisor type seems to have done the trick.
Thanks again!
On Tue, Sep 10, 2013 at 9:37 AM, David Grizzanti <
david.grizzanti@sungard.com> wrote:
> All,
>
> Thanks for the suggestions and help. I'll try out what Prasanna suggested
> and let you know.
>
> Thanks!
>
>
> On Tue, Sep 10, 2013 at 12:55 AM, Prasanna Santhanam <ts...@apache.org>wrote:
>
>> On Tue, Sep 10, 2013 at 12:08:11AM -0400, Chip Childers wrote:
>> > On Mon, Sep 9, 2013 at 4:10 PM, Edison Su <Ed...@citrix.com> wrote:
>> >
>> > > The current implementation of simulator has its own limitation: the
>> > > simulator itself is a separate hypervisor type, thus a lot of
>> condition
>> > > checks against hypervisor type in mgt server will fail if simulator
>> is used.
>> > > For example, currently, the zone wide primary storage only works for
>> > > vmware and kvm, so if you add a zone wide primary storage into a zone
>> which
>> > > only has simulator as hypervisor, then you can't use that zone wide
>> primary
>> > > storage at all.
>> > > The simulator should be able to simulate any other hypervisors, maybe
>> > > fixed in 4.3?
>> > >
>> Some of this dependency on the hypervisor is unavoidable but will keep
>> improving as the architecture allows it. OTOH, Zone-Wide primary storage
>> should be easy to add to the simulator, I'll look into that.
>>
>> > Yeah, that's probably the best way to fix this up. Being able to have
>> the
>> > simulator "emulate" another HV for the orchestration logic would be
>> good.
>> > OTOH, I don't think we want to make this overly complex...
>>
>>
>> The original problem posed by David about the NPE comes because of a
>> config check from the `hypervisor_capabilities` table, if you include
>> a row for the simulator similar to the other hypervisors then you
>> should be able to get past the NPE.
>> --
>> 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: Supported API calls in the Simulator
Posted by David Grizzanti <da...@sungard.com>.
All,
Thanks for the suggestions and help. I'll try out what Prasanna suggested
and let you know.
Thanks!
On Tue, Sep 10, 2013 at 12:55 AM, Prasanna Santhanam <ts...@apache.org> wrote:
> On Tue, Sep 10, 2013 at 12:08:11AM -0400, Chip Childers wrote:
> > On Mon, Sep 9, 2013 at 4:10 PM, Edison Su <Ed...@citrix.com> wrote:
> >
> > > The current implementation of simulator has its own limitation: the
> > > simulator itself is a separate hypervisor type, thus a lot of condition
> > > checks against hypervisor type in mgt server will fail if simulator is
> used.
> > > For example, currently, the zone wide primary storage only works for
> > > vmware and kvm, so if you add a zone wide primary storage into a zone
> which
> > > only has simulator as hypervisor, then you can't use that zone wide
> primary
> > > storage at all.
> > > The simulator should be able to simulate any other hypervisors, maybe
> > > fixed in 4.3?
> > >
> Some of this dependency on the hypervisor is unavoidable but will keep
> improving as the architecture allows it. OTOH, Zone-Wide primary storage
> should be easy to add to the simulator, I'll look into that.
>
> > Yeah, that's probably the best way to fix this up. Being able to have the
> > simulator "emulate" another HV for the orchestration logic would be good.
> > OTOH, I don't think we want to make this overly complex...
>
>
> The original problem posed by David about the NPE comes because of a
> config check from the `hypervisor_capabilities` table, if you include
> a row for the simulator similar to the other hypervisors then you
> should be able to get past the NPE.
> --
> 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: Supported API calls in the Simulator
Posted by Prasanna Santhanam <ts...@apache.org>.
On Tue, Sep 10, 2013 at 12:08:11AM -0400, Chip Childers wrote:
> On Mon, Sep 9, 2013 at 4:10 PM, Edison Su <Ed...@citrix.com> wrote:
>
> > The current implementation of simulator has its own limitation: the
> > simulator itself is a separate hypervisor type, thus a lot of condition
> > checks against hypervisor type in mgt server will fail if simulator is used.
> > For example, currently, the zone wide primary storage only works for
> > vmware and kvm, so if you add a zone wide primary storage into a zone which
> > only has simulator as hypervisor, then you can't use that zone wide primary
> > storage at all.
> > The simulator should be able to simulate any other hypervisors, maybe
> > fixed in 4.3?
> >
Some of this dependency on the hypervisor is unavoidable but will keep
improving as the architecture allows it. OTOH, Zone-Wide primary storage
should be easy to add to the simulator, I'll look into that.
> Yeah, that's probably the best way to fix this up. Being able to have the
> simulator "emulate" another HV for the orchestration logic would be good.
> OTOH, I don't think we want to make this overly complex...
The original problem posed by David about the NPE comes because of a
config check from the `hypervisor_capabilities` table, if you include
a row for the simulator similar to the other hypervisors then you
should be able to get past the NPE.
--
Prasanna.,
------------------------
Powered by BigRock.com
Re: Question: Supported API calls in the Simulator
Posted by Chip Childers <ch...@sungard.com>.
On Mon, Sep 9, 2013 at 4:10 PM, Edison Su <Ed...@citrix.com> wrote:
> The current implementation of simulator has its own limitation: the
> simulator itself is a separate hypervisor type, thus a lot of condition
> checks against hypervisor type in mgt server will fail if simulator is used.
> For example, currently, the zone wide primary storage only works for
> vmware and kvm, so if you add a zone wide primary storage into a zone which
> only has simulator as hypervisor, then you can't use that zone wide primary
> storage at all.
> The simulator should be able to simulate any other hypervisors, maybe
> fixed in 4.3?
>
>
Yeah, that's probably the best way to fix this up. Being able to have the
simulator "emulate" another HV for the orchestration logic would be good.
OTOH, I don't think we want to make this overly complex...
RE: Question: Supported API calls in the Simulator
Posted by Edison Su <Ed...@citrix.com>.
The current implementation of simulator has its own limitation: the simulator itself is a separate hypervisor type, thus a lot of condition checks against hypervisor type in mgt server will fail if simulator is used.
For example, currently, the zone wide primary storage only works for vmware and kvm, so if you add a zone wide primary storage into a zone which only has simulator as hypervisor, then you can't use that zone wide primary storage at all.
The simulator should be able to simulate any other hypervisors, maybe fixed in 4.3?
> -----Original Message-----
> From: David Grizzanti [mailto:david.grizzanti@sungard.com]
> Sent: Monday, September 09, 2013 12:04 PM
> To: dev@cloudstack.apache.org
> Subject: Question: Supported API calls in the Simulator
>
> Hi All,
>
> I was curious is there is a known set of API calls that will/should work when
> CloudStack is in simulator mode?
>
> Some background. I'm running CS 4.2 (commit
> 8d043c0e4d4c9ace8628f542eacf19e5339e28e8 to be specific), on rhel 6.3 64-
> bit, built from source following simulator instructions here:
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Marvin+-
> +Testing+with+Python#Marvin-TestingwithPython-Building
>
> Simulator appears to work fine, however, I'm starting encounter API calls
> that fail. Specifically attachVolume fails with a NullPointerException.
> Is this a bug within the simulator or a known limitation?
>
> Log statement for attachVolume:
> ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-19:job-30 =
> [ fca87e69-c688-428c-82ca-4a44f5b169ff ]) Unexpected exception while
> executing
> org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd
> java.lang.NullPointerException
> at
> com.cloud.hypervisor.dao.HypervisorCapabilitiesDaoImpl.getMaxDataVolum
> esLimit(HypervisorCapabilitiesDaoImpl.java:90)
> at
> com.cloud.utils.component.ComponentInstantiationPostProcessor$Intercep
> torDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at
> com.cloud.storage.VolumeManagerImpl.getMaxDataVolumesSupported(Vol
> umeManagerImpl.java:1696)
> at
> com.cloud.storage.VolumeManagerImpl.attachVolumeToVM(VolumeManag
> erImpl.java:1762)
> at
> com.cloud.utils.component.ComponentInstantiationPostProcessor$Intercep
> torDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at
> org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd.execut
> e(AttachVolumeCmd.java:122)
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:158)
> at
> com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:5
> 31)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.jav
> a:1146)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
> va:615)
> at java.lang.Thread.run(Thread.java:679)
>
> Thanks!
>
> --
> David Grizzanti
> Software Engineer
> Sungard Availability Services
>
> e: david.grizzanti@sungard.com
> w: 215.446.1431
> c: 570.575.0315