Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #60 from eucalyptus/r2.2
Browse files Browse the repository at this point in the history
Update to 0.1.6. Tested on 3.4.2 and 3.2.2.
  • Loading branch information
hspencer77 committed May 7, 2014
2 parents 016d950 + b8f04a3 commit 67557df
Show file tree
Hide file tree
Showing 4 changed files with 375 additions and 80 deletions.
2 changes: 1 addition & 1 deletion eucalyptus-sos-plugins.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Summary: A plugin to sosreport to collect data about Eucalyptus clouds
Name: eucalyptus-sos-plugins
Version: 0.1.5
Version: 0.1.6
Release: 0%{?dist}
Source0: %{name}-%{version}.tar.gz
Group: Applications/System
Expand Down
3 changes: 3 additions & 0 deletions sos/plugins/eucacore.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ def checkenabled(self):
def setup(self):
self.addCopySpec("/etc/eucalyptus")
self.addCopySpec("/var/log/eucalyptus/*")
self.addCopySpec("/var/lib/eucalyptus/keys")
if os.path.isfile('/usr/bin/sha1sum'):
self.collectExtOutput("find /var/lib/eucalyptus/keys -type f -print | xargs -I {} sha1sum {}", suggest_filename="sha1sum-eucalyptus-keys")
hprof_list = glob.glob('/var/log/eucalyptus/*.hprof')
if hprof_list:
self.collectExtOutput("rm -rf /var/log/eucalyptus/*.hprof", suggest_filename="hprof-removal")
if os.path.isfile('/sbin/iptables-save'):
self.collectExtOutput("/sbin/iptables-save --counters", suggest_filename="iptables-save-counters")
return
19 changes: 19 additions & 0 deletions sos/plugins/eucadb.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,25 @@ def setup(self):
self.collectExtOutput("/usr/pgsql-9.1/bin/pg_dump -c -o -h /var/lib/eucalyptus/db/data -p 8777 -U root --exclude-table=reporting_instance_usage_events eucalyptus_reporting", suggest_filename="eucalyptus_reporting.sql", timeout = 600)
self.collectExtOutput("/usr/pgsql-9.1/bin/pg_dump -c -o -h /var/lib/eucalyptus/db/data -p 8777 -U root eucalyptus_storage", suggest_filename="eucalyptus_storage.sql", timeout = 600)
self.collectExtOutput("/usr/pgsql-9.1/bin/pg_dump -c -o -h /var/lib/eucalyptus/db/data -p 8777 -U root eucalyptus_walrus", suggest_filename="eucalyptus_walrus.sql", timeout = 600)
if self.isInstalled("eucalyptus-enterprise-vmware-broker"):
self.collectExtOutput("/usr/pgsql-9.1/bin/pg_dump -c -o -h /var/lib/eucalyptus/db/data -p 8777 -U root eucalyptus_vmwarebroker", suggest_filename="eucalyptus_vmwarebroker.sql", timeout = 600)

if os.path.isfile('/usr/pgsql-9.1/bin/psql') and self.check_postgres():
self.collectExtOutput("/usr/pgsql-9.1/bin/psql -h /var/lib/eucalyptus/db/data -p 8777 -U root -c \"SELECT pg_database.datname,pg_database_size(pg_database.datname),pg_size_pretty(pg_database_size(pg_database.datname)) FROM pg_database ORDER BY pg_database_size DESC;\" -d database_events", suggest_filename="database_sizes.txt", timeout = 600)

if os.path.isfile('/var/lib/eucalyptus/db/data/pg_hba.conf'):
self.addCopySpec('/var/lib/eucalyptus/db/data/pg_hba.conf')

if os.path.isfile('/var/lib/eucalyptus/db/data/pg_hba.conf.org'):
self.addCopySpec('/var/lib/eucalyptus/db/data/pg_hba.conf.org')

if os.path.isfile('/var/lib/eucalyptus/db/data/pg_ident.conf'):
self.addCopySpec('/var/lib/eucalyptus/db/data/pg_ident.conf')

if os.path.isfile('/var/lib/eucalyptus/db/data/postgresql.conf'):
self.addCopySpec('/var/lib/eucalyptus/db/data/postgresql.conf')

if os.path.isfile('/var/lib/eucalyptus/db/data/postgresql.conf.org'):
self.addCopySpec('/var/lib/eucalyptus/db/data/postgresql.conf.org')

return
Loading

0 comments on commit 67557df

Please sign in to comment.