Skip to content

Instantly share code, notes, and snippets.

@goneri
Last active March 22, 2016 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goneri/fff8a0e803a6cab23f8b to your computer and use it in GitHub Desktop.
Save goneri/fff8a0e803a6cab23f8b to your computer and use it in GitHub Desktop.
#!/bin/bash
source stackrc
ip_address_list=$(nova list|sed -n 's,.*ctlplane=\([0-9.]\+\).*,\1,p')
for ip in ${ip_address_list}; do
ssh -o stricthostkeychecking=no heat-admin@${ip} sudo sosreport --batch -p system,virt,openstack,network,kernel,services,storage,security
ssh -o stricthostkeychecking=no heat-admin@${ip} "sudo find /var/tmp -name 'sosreport-*' -exec chmod 664 {} \;"
scp -o stricthostkeychecking=no heat-admin@${ip}:/var/tmp/sosreport-* /var/tmp
done
sudo sosreport --batch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment