-
Notifications
You must be signed in to change notification settings - Fork 29
support setting default data center as conf option #81
Comments
If no availability zone is specified, the API defaults to "first available". Currently that's set to sjc01 for most folks, but that could change in the future as new zones come online or sjc01 reaches capacity. My concern with setting a default in the jumpgate.conf like that is that there's no guarantee the specified data center is going to be available in the future. The "first available" will always correspond to an available data center since it's controlled by SoftLayer. |
@beittenc valid argument... however I can still see scenarios where providers want to default the DC at the jumpgate layer for whatever reason and I'm not seeing why we'd want to prevent them from doing assuming backwards compatibility with 'first avail' (i.e. in the proposed approach here the |
I'll +1 this. This seems like a pretty harmless feature. |
am working on it |
@sudorandom @Neetuj -- looking at the code for this one in servers.py (https://github.com/softlayer/jumpgate/blob/master/jumpgate/compute/drivers/sl/servers.py#L213) which currently looks like this: datacenter = (utils.lookup(body, 'server', 'availability_zone')
or config.CONF['compute']['default_availability_zone'])
if not datacenter:
return error_handling.bad_request(resp,
'availability_zone missing')
cci = SoftLayer.CCIManager(client) based on the chat above with @beittenc the intention was still to allow backwards compatibility for not specifying a default AZ and thus not passing one down to the SL python client.. The result of such would be the "1st avail DC".. See discussion in this item above. However the current code throws a bad request error if no AZ is in the body and no AZ is in the conf... This is not backwards compatible. This seems like a bug to me, or am I missing something? |
@bodenr this is a result of a stealth change that made the first available datacenter option is not available and an explicit datacenter choice required on the SoftLayer API side. |
Jumpgate's current implementation from a compute server create perspective determines the SL DC to use by pulling the
availability_zone
value out of the body of a server create request. If this property is not set it appears a default of None is passed down to the SL py client and from there the San Jose DC is used by default.Although I believe the best approach is to pull a dynamic value from a request (albeit a SL DC is really a region in my mind), it would be useful to allow the Jumgpate admin to specify a default DC to use if none is specified in server create request bodies.
For example in the jumpgate.conf we might have something like:
which indicates to use the Washing DC data center is none is specified in server create request body.
The text was updated successfully, but these errors were encountered: