summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Reporting/Collector.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove PIDFileError as it does not always exist in the package and is rarely ↵Matt Kemp2014-10-021-5/+0
| | | | used.
* Catch possible typeerror resulting from None being returned when reading the ↵Matt Kemp2014-10-021-1/+1
| | | | pid.
* Fixes to ensure pidfile can be opened or broken if stale.Matt Kemp2014-10-011-18/+11
|
* Attempt to break the pid lock during startup.Matt Kemp2014-10-011-8/+26
| | | | | | | | This commit attempts to break the pidfilelock during startup in cases where the process may have exited without successfully cleaning up the lockfile. It also attempts to grab the lock before opening the context. Also applied to the Collector module, which may have been looking for the wrong exception since it does not rely on a timeout.
* bcfg2-report-collector: better error messages when failing to daemonizeChris St. Pierre2014-03-041-0/+13
|
* Reporting: properly close db connectionChris St. Pierre2014-02-281-3/+0
| | | | | | | | | Close the db connection at the end of each DjangoORM import, not when the reporting collector shuts down. The collector may not have even opened a connection, in the case of a storage backend other than DjangoORM. Fixes #157
* ensure that DB connections are always closed at thread/process exitChris St. Pierre2014-02-181-3/+6
|
* Reporting: occasionally reap child threadsMichael Fenn2014-01-101-0/+23
| | | | | | | | I noticed that, at least on Python 2.4, memory for threads doesn't get freed until the threads are joined. This patch causes the collector to periodically go through and reap those threads. Tested in production for ~1 month, no reported issues.
* Revert "Reporting: Simple sanity check to avoid creating too many threads"Michael Fenn2013-10-141-3/+0
| | | | | | | | This reverts commit f813f86f8ac2bc7b55f4eb6a0d936f1ce4f68ba7. Premature optimization is the root of all evil, etc. Conflicts: src/lib/Bcfg2/Reporting/Collector.py
* Reporting: misc improvements to collector threadingMichael Fenn2013-10-101-4/+6
| | | | | | 1. Use a better convention for calling the threading.Thread constructor 2. Add docstring to ReportingStoreThread.run 3. Give the storage thread variable a better name
* Reporting: Simple sanity check to avoid creating too many threadsMichael Fenn2013-10-091-0/+3
|
* Reporting: start a new thread for each importMichael Fenn2013-10-091-10/+29
| | | | | | | | | | | | | | | | | When dealing with a high-latency database connection (eg. across a WAN), the bcfg2-report-collector process can fall behind in its import queue. The imports are very much bound by the response latency of the database server and not processing throughput. This patch fires off a new thread for each database interaction. The thread itself simply falls out of scope when the interaction is finished processing. The interaction object is still read from the disk serially in order avoid having to create a locking mechanism for that part of the process. This change does potentially create greater load on the database server, but ultimately the load is limited by rate at which the bcfg2 server can generate work.
* Reporting: have bcfg2-report-collector be explicit about detachingMichael Fenn2013-08-191-1/+1
| | | | | | | | | Following the same logic as 360ba2e7, we should be explicit about the need to detach the bcfg2-report-collector process. Side note: this bit me because I was starting the bcfg2 server processes via SSH, and the way python-daemon checks for being started by inetd is to see if stdin is a socket. (??)
* Reporting: Fix traceback when run interactivelySol Jerome2013-06-171-2/+4
| | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* fix lockfile imports for pyhton-daemon >= 1.6Tim Laszlo2012-10-181-1/+2
|
* ty daemon.pidlock before pidlockfileTim Laszlo2012-10-181-1/+7
|
* Switch from lockfile to PIDLockFileTim Laszlo2012-10-181-3/+9
|
* Reporting: Make transport configurableTim Laszlo2012-10-101-0/+7
| | | | | | | Add routines to the setup to handle alternate transports. Make the default for new installs LocalFilesystem and existing installs DirectStore. Raise an error is DirectStore is used when loading bcfg-report-collector
* Reporting: Merge new reporting dataTim Laszlo2012-10-081-0/+111
Move reporting data to a new schema Use south for django migrations Add bcfg2-report-collector daemon Conflicts: doc/development/index.txt doc/server/plugins/connectors/properties.txt doc/server/plugins/generators/packages.txt setup.py src/lib/Bcfg2/Client/Tools/SELinux.py src/lib/Bcfg2/Compat.py src/lib/Bcfg2/Encryption.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Server/Admin/Init.py src/lib/Bcfg2/Server/Admin/Reports.py src/lib/Bcfg2/Server/BuiltinCore.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/FileMonitor/Inotify.py src/lib/Bcfg2/Server/Plugin/base.py src/lib/Bcfg2/Server/Plugin/interfaces.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py src/lib/Bcfg2/Server/Plugins/FileProbes.py src/lib/Bcfg2/Server/Plugins/Ohai.py src/lib/Bcfg2/Server/Plugins/Packages/Collection.py src/lib/Bcfg2/Server/Plugins/Packages/Source.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Packages/__init__.py src/lib/Bcfg2/Server/Plugins/Probes.py src/lib/Bcfg2/Server/Plugins/Properties.py src/lib/Bcfg2/Server/Reports/backends.py src/lib/Bcfg2/Server/Reports/manage.py src/lib/Bcfg2/Server/Reports/nisauth.py src/lib/Bcfg2/settings.py src/sbin/bcfg2-crypt src/sbin/bcfg2-yum-helper testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestSEModules.py