You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Reka Thirunavukkarasu <re...@wso2.com> on 2014/03/14 04:54:54 UTC

Re: How to set an Openstack host id in the NovaTemplateOptions ?

Hi

Would the templateBuilder().locationId(Stirng) in ComputeService be used
for this particular case where we need to provide our own availability zone
when starting an instance via jclouds? So that, we can overwrite the
location with our preferred one.

I have tested it for ec2 with availability zone and it is working fine. But
when i tested with openstack, i can't find the correct locations as from
listAssignableLocations() in ComputeService. listAssignableLocations()
always returns openstack region even though there are multiple zone got
configured in openstack. Shouldn't the listAssignableLocations return all
the available zone in openstack? Is this purposely done for openstack as to
return only the region from listAssignableLocations() or Am i missing any
configuration in openstack while configuring the availability zone?

Thanks,
Reka


On Mon, Nov 25, 2013 at 12:45 PM, Everett Toews <everett.toews@rackspace.com
> wrote:

> Okay. So it sounds like you want to be able to schedule a VM to a
> particular physical host/host aggregate. This is not something that any
> public cloud provider would ever let you do. It's a very un-cloudy
> proposition. Hence, you'll never find that kind of functionality in the
> ComputeService/TemplateOptions.
>
> Personally, I wouldn't recommend doing it in a private cloud either.
> However, if you're intent on it, there may be something that can help, see
> CreateServerOptions.availabilityZone(String). This should allow you to
> specify the availability zone in which to launch the server.
>
> However, I've never used it and I honestly don't know how that works. I
> suspect there's a bunch of config you need to do on your OpenStack
> deployment to make availability zones work before you can even call
> availabilityZone(String) and have it behave the way you expect.
>
> At this point we're kind of veering off into OpenStack deployment
> questions. If you have questions about configuring availability zones, I
> recommend going to lists.openstack.org and signing up to OpenStack and/or
> OpenStack-operators.
>
> Best of luck!
>
> Everett
>
>
> On Nov 25, 2013, at 11:00 AM, Nirmal Fernando wrote:
>
> > Hi Everett,
> >
> > Sorry for not being clear, I meant the host aggregates as of
> >
> http://docs.openstack.org/trunk/openstack-ops/content/scaling.html#segregate_cloud
> >
> >
> > On Mon, Nov 25, 2013 at 10:25 PM, Everett Toews <
> everett.toews@rackspace.com
> >> wrote:
> >
> >> First of all, let's make sure we're talking about the same thing here.
> >>
> >> When you say 'host' name do you mean the hostname of the virtual machine
> >> that you are starting or do you mean the hostname of the *physical*
> machine
> >> that the VM will be running on?
> >>
> >> Everett
> >>
> >>
> >> On Nov 25, 2013, at 9:34 AM, Nirmal Fernando wrote:
> >>
> >>> Hi Andrew,
> >>>
> >>> Thanks for the pointers. But I'm kind of confused here. Does this mean
> >> that
> >>> I can't specify a 'host' name when I build a Template using
> >>> TemplateBuilder?
> >>>
> >>>
> >>> On Mon, Nov 25, 2013 at 8:31 PM, Andrew Phillips <
> aphillips@qrmedia.com
> >>> wrote:
> >>>
> >>>> $Subject? I can't see any relevant operation in NovaTemplateOptions,
> is
> >>>>> there some other way?
> >>>>>
> >>>>
> >>>> Looking at ServerApi.create [1], it looks like you can indeed only set
> >> the
> >>>> *name*; the *ID* is something returned from that call [2].
> >>>>
> >>>> ap
> >>>>
> >>>> [1] https://github.com/jclouds/jclouds/blob/master/apis/
> >>>> openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_
> >>>> 0/features/ServerApi.java#L85
> >>>> [2] https://github.com/jclouds/jclouds/blob/master/apis/
> >>>> openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_
> >>>> 0/domain/ServerCreated.java
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>>
> >>> Thanks & regards,
> >>> Nirmal
> >>>
> >>> Senior Software Engineer- Platform Technologies Team, WSO2 Inc.
> >>> Mobile: +94715779733
> >>> Blog: http://nirmalfdo.blogspot.com/
> >>
> >>
> >
> >
> > --
> >
> > Thanks & regards,
> > Nirmal
> >
> > Senior Software Engineer- Platform Technologies Team, WSO2 Inc.
> > Mobile: +94715779733
> > Blog: http://nirmalfdo.blogspot.com/
>
>


-- 
Reka Thirunavukkarasu
Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007