Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed riak attach to use a remsh #254

Merged
merged 6 commits into from
Apr 11, 2013
Merged

Conversation

angrycub
Copy link

@angrycub angrycub commented Dec 6, 2012

This serves to insulate the running riak Erlang Virtual Machine from
accidental CTRL-C's causing it to halt. The original behavior has been
moved to riak attach-direct

This serves to insulate the running riak Erlang Virtual Machine from
accidental CTRL-C's causing it to halt.  The original behavior has been
moved to `riak attach-direct`
@@ -23,6 +23,31 @@ RUNNER_LOG_DIR={{runner_log_dir}}
# Note the trailing slash on $PIPE_DIR/
PIPE_DIR={{pipe_dir}}
RUNNER_USER={{runner_user}}
PLATFORM_DATA_DIR={{platform_data_dir}}#!/bin/sh
# -*- tab-width:4;indent-tabs-mode:nil -*-
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to do this stuff, it belongs at the top, not at line 27.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That stuff is already at the top, looks like a bad merge/diff to me.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's copypasta.

@jaredmorrow
Copy link
Contributor

So if you look at the resulting file, there is two of everything. Take a look at your branch and re-push to this PR.

@jaredmorrow
Copy link
Contributor

Also, this might need to wait until after we branch 1.3 unless there is a bug associated that is a must-need.

@evanmcc
Copy link
Contributor

evanmcc commented Dec 6, 2012

That looks a lot better.

I think that it can wait till after 1.3, although it's a pretty strong nice-to-have.

@jaredmorrow
Copy link
Contributor

So, if it is a nice-to-have, I'd be more inclined to +1 if the new functionality was something like attach-nice with attach staying the same for 1.3. Also, I'd hold off on any +1 for a test addition to the basic_command_line test in riak_test.

@evanmcc
Copy link
Contributor

evanmcc commented Dec 6, 2012

My feeling is that attach should go away, and I'm willing to wait for 1.4
if that's what it takes to get it to happen.

I'll work with charlie to get an update to riak_test.

On Thu, Dec 6, 2012 at 12:57 PM, Jared Morrow notifications@github.comwrote:

So, if it is a nice-to-have, I'd be more inclined to +1 if the new
functionality was something like attach-nice with attach staying the same
for 1.3. Also, I'd hold off on any +1 for a test addition to the
basic_command_line test in riak_test.


Reply to this email directly or view it on GitHubhttps://github.com//pull/254#issuecomment-11103433.

@seancribbs
Copy link
Contributor

@evanmcc Disagree. In scenarios where disterl is unresponsive, remsh might refuse to connect but attach always has the pipes.

@angrycub
Copy link
Author

angrycub commented Dec 6, 2012

I'd just not like it to be the "go to" version of how we connect. I like the idea of keeping the piped version in, just as a different name. Working on some riak-tests now to test the behavior.

@evanmcc
Copy link
Contributor

evanmcc commented Dec 6, 2012

@seancribbs this retains attach as attach-direct with all of its
functionality intact.

On Thu, Dec 6, 2012 at 1:13 PM, Charlie Voiselle
notifications@github.comwrote:

I'd just not like it to be the "go to" version of how we connect. I like
the idea of keeping the piped version in, just as a different name. Working
on some riak-tests now to test the behavior.


Reply to this email directly or view it on GitHubhttps://github.com//pull/254#issuecomment-11104408.

@seancribbs
Copy link
Contributor

@evanmcc I know, I was more commenting on your suggestion to remove it entirely. Aside from the inability for Erlang to daemonize itself sensibly, having the run_erl/to_erl pair can be extremely helpful for support.

@evanmcc
Copy link
Contributor

evanmcc commented Dec 6, 2012

I totally agree, Sean. By go away, I meant as the default. Sorry if there
was any confusion.

On Thu, Dec 6, 2012 at 1:40 PM, Sean Cribbs notifications@github.comwrote:

@evanmcc https://github.com/evanmcc I know, I was more commenting on
your suggestion to remove it entirely. Aside from the inability for Erlang
to daemonize itself sensibly, having the run_erl/to_erl pair can be
extremely helpful for support.


Reply to this email directly or view it on GitHubhttps://github.com//pull/254#issuecomment-11106045.

@seancribbs
Copy link
Contributor

@evanmcc 🍻

@seancribbs
Copy link
Contributor

I might also mention that running q(). from the remsh still quits the Riak node. At least you won't hang it by hitting Ctrl-C, however.

@evanmcc
Copy link
Contributor

evanmcc commented Dec 10, 2012

Looking into what it would take to adding a restricted shell. It doesn't
seem particularly hard, more of a build problem than a coding issue.

On Sun, Dec 9, 2012 at 11:27 AM, Sean Cribbs notifications@github.comwrote:

I might also mention that running q(). from the remsh still quits the
Riak node. At least you won't hang it by hitting Ctrl-C, however.


Reply to this email directly or view it on GitHubhttps://github.com//pull/254#issuecomment-11174699.

@doubleyou
Copy link

My 5 cents: #265 (comment)

@rzezeski
Copy link
Contributor

rzezeski commented Jan 8, 2013

I vote we make attach use remsh by default, here are my reasons:

  1. If lager console is enabled and node is busy then it can be impossible to do anything because logging msgs clobber all your input/output.
  2. If you mess with any shared binaries or make other big structures the memory will continue to be used even after you detach.
  3. I recently watched a customer bring down multiple nodes by using Ctrl-C, and being fairly upset about it.

@doubleyou
Copy link

I'll repeat myself here, but why use run_erl in the first place? Does it have any benefits except logs rotation?

@seancribbs
Copy link
Contributor

@doubleyou See my comment above. If disterl is unresponsive (busy_dist_port, e.g.), connecting to the fifos will still work.

@evanmcc
Copy link
Contributor

evanmcc commented Apr 8, 2013

Any objections to merging this before the upcoming freeze? I note that it's still hanging out here, lacking consensus. I'd like to re-review the code, but my opinion is that it should go in.

@reiddraper
Copy link
Contributor

If we go with this, let's also update Riak Enterprise, Riak CS, Stanchion and any other projects which have an attach feature.

@jaredmorrow
Copy link
Contributor

@evanmcc I'd like to see a test added to https://github.com/basho/riak_test/blob/master/tests/basic_command_line.erl if new behavior and old behavior (moving run_erl to a different command) is tested and working, I'm +1. @reiddraper if it makes it in, I'll move it into node_package and add it to cs/stanchion/etc.

@jaredmorrow
Copy link
Contributor

I'll pick this up for testing.

@ghost ghost assigned jaredmorrow Apr 9, 2013
@jaredmorrow
Copy link
Contributor

Wrote partial riak_test, but having trouble with some riak_test functionality. Tested a lot by hand, and added details to release notes. @angrycub if you can handle a PR to docs.basho.com to update any mention of riak attach I'll finish the riak_test. In the meantime, this can be merged.

jaredmorrow added a commit that referenced this pull request Apr 11, 2013
Changed `riak attach` to use a remsh
@jaredmorrow jaredmorrow merged commit cb9e224 into basho:master Apr 11, 2013
jaredmorrow added a commit to basho/riak_test that referenced this pull request Apr 11, 2013
Adds attach_direct function to correspond to `riak attach-direct`
as well as change the basic_command_line test to test both
`riak attach` and `riak attach-direct`.

Corresponds to functionality added in basho/riak#254
@joedevivo
Copy link
Contributor

you broke my ❤️ @angrycub, YOU BROKE MY ❤️!

hmmr pushed a commit that referenced this pull request Nov 8, 2016
Add riak-admin ensemble-status command
martincox pushed a commit that referenced this pull request Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants