cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wido den Hollander <w...@widodh.nl>
Subject Re: Loading a custom HostAllocator
Date Mon, 27 Jul 2015 12:49:19 GMT


On 27-07-15 12:28, Amy Niklasson wrote:
> I have tried this and I still can't find it. I have tried to find it both
> in the regular installation and the source installation of CloudStack.
> However I have managed to find this link
> http://cloudstack-release-notes.readthedocs.org/en/latest/upgrade/upgrade-4.0.html
> which implies that the file has changed name to componentContext.xml.
> Unfortunately I can't find this file either.
> 
> I have found the file
> /home/ubuntu/cloudstack/server/test/async-job-component.xml which contains
> the lines:
> 
> <adapters key="com.cloud.agent.manager.allocator.HostAllocator">
>   <adapter name="FirstFit"
> class="com.cloud.agent.manager.allocator.impl.FirstFitAllocator"/>
> </adapters>
> 
> Which are the lines according to
> http://docs.cloudstack.apache.org/en/master/alloc.html#implementing-a-
> <http://docs.cloudstack.apache.org/en/master/alloc.html#implementing-a-custom-hostallocator>custom-hostallocator
> <http://docs.cloudstack.apache.org/en/master/alloc.html#implementing-a-custom-hostallocator>
> should be changed. However this location is in nowhere close to the
> one mentioned.
> 
> If anyone has any experience of implementing a custom hostallocator in
> CloudStack 4.5 or knows anything I would very much appreciate any
> information you got.
> 

I haven't done this, but I don't think componentContext.xml is being
used anymore.

I think you need this one:
core/resources/META-INF/cloudstack/core/spring-core-registry-core-context.xml

Wido

> Kind Regards,
> Amy
> 
> 
> On 8 July 2015 at 09:47, Wido den Hollander <wido@widodh.nl> wrote:
> 
> 
> 
> On 08-07-15 10:08, Amy Niklasson wrote:
>>>> Hi, How do you load a custom HostAllocator in CloudStack 4.5? The
>>>> only documentation I've managed to find is
>>>> http://docs.cloudstack.apache.org/en/master/alloc.html#implementing-a-
> custom-hostallocator
>>>>
>>>>
> However,I can't find the files mentioned, components.xml and
>>>> components-premium.xml, in /client/ tomcatconf. Anyone who knows?
>>>>
> 
> Not exactly sure which file it is, but you could try a grep through
> the code.
> 
> It's the Spring framework which loads the modules in boot.
> 
> Wido
> 
>>>> Regards, Amy
>>>>
>>
> 

Mime
View raw message