Bases: object
WSGI application for the proxy server.
Check the configuration for possible errors
Mark a node as error limited. This immediately pretends the node received enough errors to trigger error suppression. Use this for errors like Insufficient Storage. For other errors use error_occurred().
Parameters: |
|
---|
Check if the node is currently error limited.
Parameters: | node – dictionary of node to check |
---|---|
Returns: | True if error limited, False otherwise |
Handle logging, and handling of errors.
Parameters: |
|
---|
Handle logging of generic exceptions.
Parameters: |
|
---|
Get the controller to handle a request.
Parameters: | path – path from request |
---|---|
Returns: | tuple of (controller class, path dictionary) |
Raises: | ValueError (thrown by split_path) if given invalid path |
Entry point for proxy server. Should return a WSGI-style callable (such as swob.Response).
Parameters: | req – swob.Request object |
---|
Yields nodes for a ring partition, skipping over error limited nodes and stopping at the configurable number of nodes. If a node yielded subsequently gets error limited, an extra node will be yielded to take its place.
Note that if you’re going to iterate over this concurrently from multiple greenthreads, you’ll want to use a swift.common.utils.GreenthreadSafeIterator to serialize access. Otherwise, you may get ValueErrors from concurrent access. (You also may not, depending on how logging is configured, the vagaries of socket IO and eventlet, and the phase of the moon.)
Parameters: |
|
---|
Called during WSGI pipeline creation. Modifies the WSGI pipeline context to ensure that mandatory middleware is present in the pipeline.
Parameters: | pipe – A PipelineWrapper object |
---|
Sorts nodes in-place (and returns the sorted list) according to the configured strategy. The default “sorting” is to randomly shuffle the nodes. If the “timing” strategy is chosen, the nodes are sorted according to the stored timing data.
paste.deploy app factory for creating WSGI proxy apps.