Skip to content
Snippets Groups Projects
Commit 45412d75 authored by Varac's avatar Varac
Browse files

[feat] Add 'leap debug' cmd

This will output node debug information by calling the
bin/debug.sh script.
parent 935a5e88
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# debug script to be run on remote servers
# called from leap_cli with the 'leap debug' cmd
regexp='(leap|pixelated|stunnel|couch|soledad|haproxy)'
# query facts and filter out private stuff
echo -e '\n\n'
facter | egrep -iv '(^ssh|^uniqueid)'
# query installed versions
echo -e '\n\n'
dpkg -l | egrep "$regexp"
# query running procs
echo -e '\n\n'
ps aux|egrep "$regexp"
echo -e '\n\n'
echo -e "Last deploy:\n"
tail -2 /var/log/leap/deploy-summary.log
module LeapCli; module Commands
desc 'Output debug information.'
long_desc 'The FILTER can be the name of a node, service, or tag.'
arg_name 'FILTER'
command [:debug, :d] do |c|
c.action do |global,options,args|
nodes = manager.filter!(args)
ssh_connect(nodes, connect_options(options)) do |ssh|
ssh.leap.debug
end
end
end
end; end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment