Closed seanjensengrey closed 8 years ago
After patching the tools to pass the framework name through, it looks like the scheduler defaults to a framework_name of 'riak'
2016-07-26 21:27:37.540 [error] <0.133.0> Supervisor rms_sup had child rms_scheduler started with erl_mesos_scheduler:start_link(riak_mesos_scheduler, rms_scheduler, [{framework_user,"root"},{framework_name,"riak"},{framework_role,"riak"},{framework_hostname,"ip..."},...], [{master_hosts,["leader.mesos:5050"]},{resubscribe_interval,60000}]) at <0.149.0> exit with reason shutdown in context child_terminated
21:27:46.918 [error] Supervisor rms_sup had child rms_scheduler started with erl_mesos_scheduler:start_link(riak_mesos_scheduler, rms_scheduler, [{framework_user,"root"},{framework_name,"riak"},{framework_role,"riak"},{framework_hostname,"ip..."},...], [{master_hosts,["leader.mesos:5050"]},{resubscribe_interval,60000}]) at <0.169.0> exit with reason shutdown in context child_terminated
21:27:46.918 [error] Supervisor rms_sup had child rms_scheduler started with erl_mesos_scheduler:start_link(riak_mesos_scheduler, rms_scheduler, [{framework_user,"root"},{framework_name,"riak"},{framework_role,"riak"},{framework_hostname,"ip..."},...], [{master_hosts,["leader.mesos:5050"]},{resubscribe_interval,60000}]) at <0.169.0> exit with reason reached_max_restart_intensity in context shutdown
21:27:46.919 [info] Application rms exited with reason: shutdown
https://github.com/basho-labs/riak-mesos-scheduler/search?utf8=%E2%9C%93&q=framework_name
One thing I noticed was that when I attempted to install the second framework, both would alternatively flap. I think it has to do with them being in the same distributed erlang cluster.
@sanmiguel this is a both a tools issue and a scheduler issue
TIL, the location --framework
in the command line will dictate what data structure it makes it into.
riak-mesos --framework foonoot --config ~/.config/riak-mesos/kv.json framework install
And breakpoint in cmd_framework:install
will have
(Pdb) p ctx.framework
'foonoot'
(Pdb) p kwargs
{'config': None, 'info': False, 'debug': False, 'version': False, 'config_schema': False, 'json': False, 'cluster': None, 'node': None, 'verbose': False, 'framework': None, 'insecure_ssl': False, 'home': None}
riak-mesos --config ~/.config/riak-mesos/kv.json framework install --framework footsdfasd
yields
> /Users/basho/x.env/lib/python3.5/site-packages/riak_mesos/commands/cmd_framework.py(58)install()
-> ctx.init_args(**kwargs)
(Pdb) p ctx.framework
'riak'
(Pdb) pp kwargs
{'cluster': None,
'config': None,
'config_schema': False,
'debug': False,
'framework': 'footsdfasd',
'home': None,
'info': False,
'insecure_ssl': False,
'json': False,
'node': None,
'verbose': False,
'version': False}
Changes made in basho-labs/riak-mesos-scheduler#89 render the hostname
and role
parameters optional. By default, they take the following value:
role
= framework-name
hostname
= <framework-name>.marathon.mesos
I've also merged ( #36 ) some changes that more properly use the framework
through the tools. Now you may use a config file that specifies a "framework-name": "riak-foo"
and from then on, administer it by using riak-mesos --framework riak-foo ...
.
Attempting to install multiple named frameworks at the same time results in stacktrace
dcos.errors.DCOSHTTPException: Error while fetching [http://marathon.mesos:8080/v2/apps]: HTTP 409: Conflict
Now with
--debug