Bug 831884 - rhc-admin-move leaves keys loaded into ssh-agent
Summary: rhc-admin-move leaves keys loaded into ssh-agent
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Dan McPherson
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-14 02:02 UTC by Wesley Hearn
Modified: 2015-05-15 01:58 UTC (History)
3 users (show)

Fixed In Version: devenv_1848
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-25 18:27:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wesley Hearn 2012-06-14 02:02:02 UTC
Description of problem:
rhc-admin-move leaves ssh keys loaded into ssh-agent. After moving a lot of apps we have seen the number get close to 3000 keys still loaded in memory on the ex-srvs.

Version-Release number of selected component (if applicable):


How reproducible:
Always.

Steps to Reproduce:
1. Run `ps -aux | grep ssh-agent | wc -l` on a broker take note how many is running
2. Use rhc-admin-mode to move a gear from one node to another
3. Rerun `ps -aux | grep ssh-agent | wc -l`
  
Actual results:
Each time rhc-admin-move is ran it leaves the ssh key loaded into ssh-agent causing it to take up resources(2800 running is about 2GB of ram)

Expected results:
It should clear the key from ssh-agent after completion

Additional info:

Comment 1 Johnny Liu 2012-06-18 07:37:02 UTC
Verified this bug on devenv_1850, and PASS.

# rhc-admin-move .....
<--snip-->
Identity added: /var/www/stickshift/broker/config/keys/rsync_id_rsa (/var/www/stickshift/broker/config/keys/rsync_id_rsa)
Warning: Permanently added '10.72.198.196' (RSA) to the list of known hosts.
Agent pid 15950
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 15950 killed;
<--snip-->


Before move:
# ps -ef | grep ssh-agent 
root     15944 14947  0 03:33 pts/1    00:00:00 grep ssh-agent


During move:
# ps -ef | grep ssh-agent 
root     15947 15325  0 03:33 pts/0    00:00:00 sh -c eval `ssh-agent`; ssh-add /var/www/stickshift/broker/config/keys/rsync_id_rsa; ssh -o StrictHostKeyChecking=no -A root.198.196 "rsync -aA -e 'ssh -o StrictHostKeyChecking=no' /var/lib/stickshift/16cee095b10d44468b79d5c9d1a9613d/ root.81.169:/var/lib/stickshift/16cee095b10d44468b79d5c9d1a9613d/"; ssh-agent -k


After move:
# ps -ef | grep ssh-agent 
root     16001 14947  0 03:33 pts/1    00:00:00 grep ssh-agent


Note You need to log in before you can comment on or make changes to this bug.