rpms/ganglia/devel diskusage-fix.patch, NONE, 1.1 gmetad-authority.patch, NONE, 1.1 tcpconn-fixes.patch, NONE, 1.1 ganglia.spec, 1.18, 1.19
Kostas Georgiou (georgiou)
fedora-extras-commits at redhat.com
Tue Aug 12 16:21:50 UTC 2008
Author: georgiou
Update of /cvs/extras/rpms/ganglia/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1563
Modified Files:
ganglia.spec
Added Files:
diskusage-fix.patch gmetad-authority.patch tcpconn-fixes.patch
Log Message:
Many small changes, new module configs included, patches for various issues
from the 3.1.x trunk etc.
diskusage-fix.patch:
--- NEW FILE diskusage-fix.patch ---
--- gmond/python_modules/conf.d/diskusage.pyconf-orig 2008-08-12 13:20:42.000000000 +0100
+++ gmond/python_modules/conf.d/diskusage.pyconf 2008-08-12 13:21:53.000000000 +0100
@@ -7,6 +7,7 @@
}
}
+/*
collection_group {
collect_every = 10
time_threshold = 50
@@ -23,4 +24,5 @@
name = "<disk_total-metric-name>"
}
}
+*/
gmetad-authority.patch:
--- NEW FILE gmetad-authority.patch ---
Index: gmetad/process_xml.c
===================================================================
--- gmetad/process_xml.c (revision 1634)
+++ gmetad/process_xml.c (working copy)
@@ -724,7 +724,11 @@
if (!xmldata->host_alive)
return 0;
-
+
+ /* Only keep extra element details if we are the authority on this cluster. */
+ if (!authority_mode(xmldata))
+ return 0;
+
hashkey.data = (void*) name;
hashkey.size = strlen(name) + 1;
tcpconn-fixes.patch:
--- NEW FILE tcpconn-fixes.patch ---
Index: gmond/python_modules/network/tcpconn.py
===================================================================
--- gmond/python_modules/network/tcpconn.py (revision 1622)
+++ gmond/python_modules/network/tcpconn.py (working copy)
@@ -245,19 +245,14 @@
tempconns[conn] = 0
#Call the netstat utility and split the output into separate lines
- fd_poll = select.poll()
- self.popenChild = popen2.Popen3("netstat -t -a")
- fd_poll.register(self.popenChild.fromchild)
+ self.popenChild = popen2.Popen3("netstat -t -a -n")
+ lines = self.popenChild.fromchild.readlines()
- poll_events = fd_poll.poll()
-
- if (len(poll_events) == 0): # Timeout
- continue
-
- for (fd, events) in poll_events:
- lines = self.popenChild.fromchild.readlines()
-
- self.popenChild.wait()
+ try:
+ self.popenChild.wait()
+ except OSError, e:
+ if e.errno == 10: # No child process
+ continue
#Iterate through the netstat output looking for the 'tcp' keyword in the tcp_at
# position and the state information in the tcp_state_at position. Count each
@@ -300,7 +295,8 @@
_glock.release()
#Wait for the refresh_rate period before collecting the netstat data again.
- time.sleep(_refresh_rate)
+ if not self.shuttingdown:
+ time.sleep(_refresh_rate)
#Set the current state of the thread after a shutdown has been indicated.
self.running = False
Index: ganglia.spec
===================================================================
RCS file: /cvs/extras/rpms/ganglia/devel/ganglia.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ganglia.spec 29 Jul 2008 22:12:16 -0000 1.18
+++ ganglia.spec 12 Aug 2008 16:21:20 -0000 1.19
@@ -1,14 +1,16 @@
Name: ganglia
Version: 3.1.0
-Release: 0.5%{?svnrev:.r%{svnrev}}%{?dist}
+Release: 1%{?svnrev:.r%{svnrev}}%{?dist}
Summary: Ganglia Distributed Monitoring System
Group: Applications/Internet
License: BSD
URL: http://ganglia.sourceforge.net/
-Source0: http://www.ganglia.info/testing//%{name}-%{version}.tar.gz
+Source0: http://dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
#Source0: http://www.ganglia.info/snapshots/3.1.x/%{name}-%{version}.%{svnrev}.tar.gz
-#Source0: http://dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
+Patch0: tcpconn-fixes.patch
+Patch1: gmetad-authority.patch
+Patch2: diskusage-fix.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: rrdtool-devel, apr-devel >= 1
@@ -88,6 +90,9 @@
%prep
%setup -q -n %{name}-%{version}%{?svnrev:.%{svnrev}}
+%patch0 -p0
+%patch1 -p0
+%patch2 -p0
## Hey, those shouldn't be executable...
chmod -x lib/*.{h,x}
@@ -120,12 +125,23 @@
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/conf.php $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/
ln -s ../../..%{_sysconfdir}/%{name}/conf.php \
$RPM_BUILD_ROOT%{_datadir}/%{name}/conf.php
+mv $RPM_BUILD_ROOT%{_datadir}/%{name}/private_clusters $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/
+ln -s ../../..%{_sysconfdir}/%{name}/private_clusters \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}/private_clusters
cat << __EOF__ > $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
#
# Ganglia monitoring system php web frontend
#
Alias /%{name} %{_datadir}/%{name}
+
+ <Location /%{name}>
+ Order deny,allow
+ Deny from all
+ Allow from 127.0.0.1
+ Allow from ::1
+ # Allow from .example.com
+ </Location>
__EOF__
## Create directory structures
@@ -147,7 +163,7 @@
## Python bits
# Copy the python metric modules and .conf files
cp -p gmond/python_modules/conf.d/*.pyconf $RPM_BUILD_ROOT%{_sysconfdir}/ganglia/conf.d/
-cp -p gmond/modules/conf.d/modpython.conf $RPM_BUILD_ROOT%{_sysconfdir}/ganglia/conf.d/
+cp -p gmond/modules/conf.d/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/ganglia/conf.d/
cp -p gmond/python_modules/*/*.{py,pyc} $RPM_BUILD_ROOT%{_libdir}/ganglia/python_modules/
# Don't install the example modules
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/ganglia/conf.d/example.conf
@@ -156,14 +172,14 @@
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/ganglia/conf.d/modgstatus.conf
# Clean up the .conf.in files
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/ganglia/conf.d/*.conf.in
-# Disable the diskusage module until it is configured properly
-mv $RPM_BUILD_ROOT%{_sysconfdir}/ganglia/conf.d/diskusage.pyconf $RPM_BUILD_ROOT%{_sysconfdir}/ganglia/conf.d/diskusage.pyconf.off
+## Disable the diskusage module until it is configured properly
+#mv $RPM_BUILD_ROOT%{_sysconfdir}/ganglia/conf.d/diskusage.pyconf $RPM_BUILD_ROOT%{_sysconfdir}/ganglia/conf.d/diskusage.pyconf.off
## Install binaries
make install DESTDIR=$RPM_BUILD_ROOT
## House cleaning
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
-rm -f $RPM_BUILD_ROOT%{_datadir}/{Makefile.am,version.php.in}
+rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/{Makefile.am,version.php.in}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -229,6 +245,8 @@
%{_mandir}/man1/gstat.1*
%{_mandir}/man1/gmetric.1*
%config(noreplace) %{_sysconfdir}/ganglia/gmond.conf
+%config(noreplace) %{_sysconfdir}/ganglia/conf.d/*.conf
+%exclude %{_sysconfdir}/ganglia/conf.d/modpython.conf
%files gmond-python
%dir %{_libdir}/ganglia/python_modules/
@@ -247,10 +265,20 @@
%doc web/AUTHORS web/COPYING web/ChangeLog
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/conf.php
+%config(noreplace) %{_sysconfdir}/%{name}/private_clusters
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
%{_datadir}/%{name}
%changelog
+* Mon Aug 11 2008 Kostas Georgiou <k.georgiou at imperial.ac.uk> 3.1.0-1
+- Upstream patches from 3.1.1
+- Move private_clusters config to /etc and mark it as a config file
+- Only allow connections from localhost by default on the web frontend
+- Add some extra module config files (modules are always loaded at the
+ moment so removing the configs has no effect beyond metric collection
+ (upstream is working on way way to disable module loading from the
+ configs)
+
* Tue Jul 29 2008 Kostas Georgiou <k.georgiou at imperial.ac.uk> 3.1.0-0.5
- Add the config files for the python module
More information about the fedora-extras-commits
mailing list