Hi,
Currently the Aurora scheduler permits static ports for any job, but the
CLI client allows you to only use static ports with dedicated roles. This
limitation goes back to when static support was originally added to the
announcer. With https://issues.apache.org/jira/browse/AURORA-1212 I'd like
to remove this client-only limitation.
My use case is that I want to rollout Aurora but I've got some parts of my
infrastructure that do not yet support service discovery, and it'll take
significant research, development and operational work (months) to get them
into a state where they'd do so in a reliable fashion. I still want to take
advantage of Aurora's announcer functionality though, so I can use dynamic
ports and service discovery where possible.
More long term it seems likely that though dynamic ports are generally
better, static ports will be required for some use cases. For example if I
migrate our reverse proxies to run on Aurora I'll need static ports for
AWS's ELB to be able to get to it. Thus I expect that eventually there'll
be full static port support added to the scheduler. A wiki page with a list
of reserved ports and hoping noone accidentally clashes can only take you
so far after all.
Talking with Bill, there are use cases where keeping the current
restriction in the client makes sense. This should be doable via hooks and
having a quick go at it this seems to do the trick:
import json
class ForbidStaticPorts(object):
def pre_create_job(self, config, dummy):
for name, port in
json.loads(config.job().taskConfig.executorConfig.data).get('announce',
{}).get('portmap', {}).items():
if port.isdigit():
print 'Error port "%s" in job is static' % name
return False
return True
hooks = [ForbidStaticPorts()]
That's my first ever CLI hook, so there's probably ways to improve that.
If we could get this restriction removed and that'd be great, as it's
blocking our move to Aurora.
Thanks,
Brian