26 Commits

Author SHA1 Message Date
Caleb Tennis
d1dd143952 Up nproc limit on startup.
Separate out setrlimit calls for specific exception handling.

Closes-Bug: #1264561
Change-Id: I5588f19f8d0393409580d17317727977758d5cb3
2013-12-29 11:35:07 -05:00
ZhiQiang Fan
f72704fc82 Change OpenStack LLC to Foundation
Change-Id: I7c3df47c31759dbeb3105f8883e2688ada848d58
Closes-bug: #1214176
2013-09-20 01:02:31 +08:00
Clay Gerrard
64430da593 fix race in test_wait on busy server
fix bug 1224208

Change-Id: I83c673a87c31214a7c54b6399ca53512885e6bc3
2013-09-11 22:29:25 -07:00
Jenkins
656490a01d Merge "Pep8 unit test modules w/ <= 10 violations (5 of 12)" 2013-09-04 21:15:03 +00:00
Jenkins
1e05fa64cd Merge "Pep8 unit test modules for hacking and one liners (4 of 12)" 2013-09-03 20:34:12 +00:00
Peter Portante
be1cff4f1f Pep8 unit test modules w/ <= 10 violations (5 of 12)
Change-Id: I8e82c14ada52d44df5a31e08982ac79cd7e5c969
Signed-off-by: Peter Portante <peter.portante@redhat.com>
2013-09-01 15:12:48 -04:00
Peter Portante
c067abd21e Pep8 unit test modules for hacking and one liners (4 of 12)
Address all the "hacking" lines that are flagged, and all the modules
that just have one item flagged.

Change-Id: I372a4bdf9c7748f73e38c4fd55e5954f1afade5b
Signed-off-by: Peter Portante <peter.portante@redhat.com>
2013-09-01 15:12:39 -04:00
Chuck Thier
6570c24d45 Only set PYTHON_EGG_CACHE if it isn't already set
Change-Id: I6503c80a236a1720562377d04313ee2688336c85
2013-08-30 19:36:26 +00:00
Clay Gerrard
34f5085c3e conf.d support
Allow Swift daemons and servers to optionally accept a directory as the
configuration parameter.  Directory based configuration leverages
ConfigParser's native multi-file support.  Files ending in '.conf' in the
given directory are parsed in lexicographical order.  Filenames starting with
'.' are ignored.  A mixture of file and directory configuration paths is not
supported - if the configuration path is a file behavior is unchanged.

 * update swift-init to search for conf.d paths when building servers
    (e.g. /etc/swift/proxy-server.conf.d/)
 * new script swift-config can be used to inspect the cumulative configuration
 * pull a little bit of code out of run_wsgi and test separately
 * fix example config bug for the proxy servers client_disconnect option
 * added section on directory based configuration to deployment guide

DocImpact

Implements: blueprint confd
Change-Id: I89b0f48e538117f28590cf6698401f74ef58003b
2013-04-30 00:17:46 -07:00
Greg Lange
44f00a23c1 fixed some minor things in tests that pyflakes complained about
Change-Id: Ifeab56a964630bcf941e932fcbe39e6572e62975
2013-03-26 20:42:26 +00:00
Joe Gordon
45f0502b52 Fix spelling mistakes
git ls-files | misspellings -f -
Source: https://github.com/lyda/misspell-check

Change-Id: I4132e6a276e44e2a8985238358533d315ee8d9c4
2013-02-12 16:39:40 -08:00
Chmouel Boudjnah
3282e3885c Add --run-dir switch to swift-init
- Add ability to specify an alternative run_dir than the default
  /var/run/swift.
- DocImpact

Change-Id: I17677588f2c8da563b7fec2dc4fdc52da87126ed
2013-01-21 18:12:17 +01:00
Darrell Bishop
57ebd17910 Warn when killing fails with EPERM
Have swift-init warn when the running user doesn't have permissions to
signal processes.  Fixes bug 1017494.

Change-Id: Icb9048ab36f1ca73bb93b11c9c2aed882d99dfa7
2012-10-03 08:28:36 -07:00
Victor Rodionov
31ff3da485 Fix wrong assert in manager unit test, self._assert(len(m.servers), 4)
don't check that number of servers equal 4.

Change-Id: I4a597eaf2b16b5b2cfc7fd706ac024357e9af2c2
2012-07-19 01:24:02 +04:00
Darrell Bishop
3d3ed34f44 Adding StatsD logging to Swift.
Documentation, including a list of metrics reported and their semantics,
is in the Admin Guide in a new section, "Reporting Metrics to StatsD".
An optional "metric prefix" may be configured which will be prepended to
every metric name sent to StatsD.

Here is the rationale for doing a deep integration like this versus only
sending metrics to StatsD in middleware.  It's the only way to report
some internal activities of Swift in a real-time manner. So to have one
way of reporting to StatsD and one place/style of configuration, even
some things (like, say, timing of PUT requests into the proxy-server)
which could be logged via middleware are consistently logged the same
way (deep integration via the logger delegate methods).

When log_statsd_host is configured, get_logger() injects a
swift.common.utils.StatsdClient object into the logger as
logger.statsd_client.  Then a set of delegate methods on LogAdapter
either pass through to the StatsdClient object or become no-ops. This
allows StatsD logging to look like:
    self.logger.increment('some.metric.here')
and do the right thing in all cases and with no messy conditional logic.

I wanted to use the pystatsd module for the StatsD client, but the
version on PyPi is lagging the git repo (and is missing both the prefix
functionality and timing_since() method).  So I wrote my
swift.common.utils.StatsdClient.  The interface is the same as
pystatsd.Client, but the code was written from scratch.  It's pretty
simple, and the tests I added cover it.  This also frees Swift from an
optional dependency on the pystatsd module, making this feature easier
to enable.

There's test coverage for the new code and all existing tests continue
to pass.

Refactored out _one_audit_pass() method in swift/account/auditor.py and
swift/container/auditor.py.

Fixed some misc. PEP8 violations.

Misc test cleanups and refactorings (particularly the way "fake logging"
is handled).

Change-Id: Ie968a9ae8771f59ee7591e2ae11999c44bfe33b2
2012-05-11 15:25:38 -07:00
John Dickinson
1ecf5ebba1 updated copyright date for all files
Change-Id: Ifd909d3561c2647770a7e0caa3cd91acd1b4f298
2012-03-19 13:45:34 -05:00
gholt
425705690e Updated the swift-init manager for object-expir...
Updated the swift-init manager for object-expirer support since the
expirer doesn't not use the object-server.conf but does start with
object-.

Change-Id: If6e0e9af4c6c861fdf390370f271d9139c573ba2
2012-01-03 22:12:33 +00:00
Clay Gerrard
7c2bf134b1 fixed lockups and lost messages in swift-init and capture_stdio 2011-03-30 15:04:15 -05:00
Clay Gerrard
a8b4f859c0 fixed tests for new wait default true 2011-02-15 13:19:33 -06:00
Clay Gerrard
22a45b3550 review cleanup 2011-02-14 14:52:49 -06:00
Clay Gerrard
1f78fae2fc more tests and cleanup 2011-02-12 14:50:24 -06:00
Clay Gerrard
51064d31eb renamed ini_files to conf_files in code 2011-02-12 03:25:29 -06:00
Clay Gerrard
bfae3625ef fixed license dates 2011-02-12 02:22:01 -06:00
Clay Gerrard
8a66319f14 more test, swift.common.manager coverage > 90% 2011-02-12 01:49:24 -06:00
Clay Gerrard
4c809e49b9 working on tests 2011-02-11 14:56:03 -06:00
Clay Gerrard
e3e604ec17 forgot some new files 2011-02-11 13:21:28 -06:00