Skip to content

Commit

Permalink
add server-eshell command to launch erlang remsh
Browse files Browse the repository at this point in the history
Change-Id: Icafbbca08b938d5b70566bbfd8977f5994d256a7
Reviewed-on: http://review.membase.org/5402
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  • Loading branch information
apage43 authored and alk committed Apr 15, 2011
1 parent 91817c5 commit cc82e3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions info.py
Expand Up @@ -9,6 +9,8 @@

import restclient
import simplejson
import subprocess
import sys

class Info:
def __init__(self):
Expand All @@ -31,5 +33,8 @@ def runCmd(self, cmd, server, port,
for x in ['license', 'licenseValid', 'licenseValidUntil']:
if x in json:
del(json[x])

print simplejson.dumps(json, sort_keys=True, indent=2)
if cmd == 'server-eshell':
p = subprocess.call(['erl','-name','ctl@127.0.0.1',
'-setcookie',json['otpCookie'],'-hidden','-remsh',json['otpNode']])
else:
print simplejson.dumps(json, sort_keys=True, indent=2)
1 change: 1 addition & 0 deletions membase
Expand Up @@ -67,6 +67,7 @@ def main():
commands = {
'server-list' : listservers.ListServers,
'server-info' : info.Info,
'server-eshell' : info.Info,
'server-add' : node.Node,
'server-readd' : node.Node,
'rebalance' : node.Node,
Expand Down

0 comments on commit cc82e3d

Please sign in to comment.