Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add cluster management. #71

Merged
merged 6 commits into from Apr 12, 2013

Conversation

Projects
None yet
2 participants
Contributor

cmeiklejohn commented Apr 8, 2013

Add new cluster management page.

There are some final things that are not completely idiomatic Ember, but we're going to revise those after this release cycle so we can focus on testing for the remainder of this cycle.

Contributor

cmeiklejohn commented Apr 11, 2013

Another card I tried moving to working and vanished from the kanban. @seancribbs @joedevivo @jgnewman can I get a final review here?

@cmeiklejohn I'll look over it again, yes.

@seancribbs seancribbs and 1 other commented on an outdated diff Apr 11, 2013

priv/admin/js/cluster.js
+ } else {
+ return common + 'pct-static';
+ }
+ }.property('ring_pct', 'pending_pct'),
+
+ /**
+ * In order for labels to be clickable, they need to be bound to checks/radios
+ * by ID. However, since these nodes are cloned by Ember, we need a way to make
+ * sure all of those elements get id's that don't override each other. This
+ * function gives us an ID string we can use as a prefix for id's on these other
+ * elements.
+ *
+ * @returns {String}
+ */
+ node_id: function() {
+ return Ember.generateGuid();
@seancribbs

seancribbs Apr 11, 2013

This object will already have a guid, though, right? Why not Ember.guidFor(this)?

@cmeiklejohn

cmeiklejohn Apr 11, 2013

Contributor

Good call, fixed in [805d0b8].

@seancribbs seancribbs commented on the diff Apr 11, 2013

priv/admin/js/legacy/gui.js
} else {
- parent.css('background-position', 'left top');
+ parent.css('background-position', 'left top');
+ }
+ });
+
+ // MAKE RADIO BUTTONS WORK WHEN YOU CLICK THEM
+ $(document).on('change', '.gui-radio', function(e) {
@seancribbs

seancribbs Apr 11, 2013

I suppose this is working around a legacy design, but it feels like an arraycontroller/view/template combo would cover this problem.

@cmeiklejohn

cmeiklejohn Apr 11, 2013

Contributor

Agreed. We will refactor this later, but agreed. We have ton of legacy code that needs to be killed.

There are a few problems with the UI, and it's unclear whether this is a riak_core issue or just control.

If I stage adding a bunch of nodes, and then clear the plan, the staged plan clears, but the nodes in the cluster (on the left side) do not clear. If I then try to re-add the first node of my crazy plan, ALL the nodes reappear in the plan. Additionally, the node being added suddenly becomes the owner of all partitions (at least in the UI). When I went to check the CLI version, all but the node that claimed to own 100% of the partitions were down, including the one running control.

Here's some sample errors from the logs that may help:

2013-04-11 11:01:34.805 [error] <0.3435.0> CRASH REPORT Process <0.3435.0> with 0 neighbours exited with reason: no match of right hand value {'EXIT',{badarg,[{erlang,hd,[[]],[]},{riak_core_ring_handler,startable_vnodes,2,[{file,"src/riak_core_ring_handler.erl"},{line,154}]},{riak_core_ring_handler,ensure_vnodes_started,2,[{file,"src/riak_core_ring_handler.erl"},{line,106}]},{riak_core_ring_handler,ensure_vnodes_started,3,[{file,"src/riak_core_ring_handler.erl"},{line,103}]},{riak_core_ring_handler,ensure_vnodes_started,1,[{file,"src/riak_core_ring_handler.erl"},{line,66}]},{riak_core_ring_handler,init,1,[{file,"src/riak_core_rin..."},...]},...]}} in riak_core_eventhandler_guard:init/1 line 36 in gen_server:init_it/6 line 328
2013-04-11 11:01:34.782 [error] <0.139.0> gen_server riak_core_ring_manager terminated with reason: no function clause matching random:uniform(0) line 111

It seems that if you clear a plan with nodes being added, they get stopped.

2013-04-11 11:01:48.068 [notice] <0.139.0>@riak_core:stop:51 "node removal completed, exiting."

I believe this is a bug/problem in core, based on the errors, but the UI is problematic in its display of the problem.

Contributor

cmeiklejohn commented Apr 11, 2013

@seancribbs Yes, this is riak_core. There is no "staged addition" in riak_core's claimant. If you perform these actions via the CLI, you should see the same behaviour. I'll try to verify this myself shortly.

Contributor

cmeiklejohn commented Apr 11, 2013

@seancribbs Can we chat more about the potential problem in core and how to handle the proper display in the user interface?

Contributor

cmeiklejohn commented Apr 12, 2013

@seancribbs good to merge?

Contributor

cmeiklejohn commented Apr 12, 2013

lol, merging dat.

cmeiklejohn added a commit that referenced this pull request Apr 12, 2013

@cmeiklejohn cmeiklejohn merged commit c42c1b1 into master Apr 12, 2013

@ghost ghost assigned cmeiklejohn Apr 17, 2013

@seancribbs seancribbs deleted the csm-cluster-management branch Apr 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment