Merged with trunk, added note about suspicious behaviour
This commit is contained in:
		| @@ -21,8 +21,6 @@ | ||||
|   Twisted daemon for nova objectstore. Supports S3 API. | ||||
| """ | ||||
|  | ||||
| import logging | ||||
|  | ||||
| from nova import flags | ||||
| from nova import utils | ||||
| from nova import twistd | ||||
| @@ -33,9 +31,6 @@ FLAGS = flags.FLAGS | ||||
|  | ||||
|  | ||||
| def main(): | ||||
|     # FIXME: if this log statement isn't here, no logging | ||||
|     # appears from other files and app won't start daemonized | ||||
|     logging.debug('Started HTTP server on %s' % (FLAGS.s3_port)) | ||||
|     app = handler.get_application() | ||||
|     print app | ||||
|     return app | ||||
|   | ||||
| @@ -34,7 +34,7 @@ | ||||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||||
| # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- | ||||
| # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT | ||||
| # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,  | ||||
| # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||||
| # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||||
| # IN THE SOFTWARE. | ||||
| @@ -48,7 +48,7 @@ import hashlib | ||||
| import hmac | ||||
| import logging | ||||
| import urllib | ||||
| import boto.utils | ||||
| import boto | ||||
|  | ||||
| from nova.exception import Error | ||||
|  | ||||
|   | ||||
| @@ -21,10 +21,8 @@ Proxy AMI-related calls from the cloud controller, to the running | ||||
| objectstore daemon. | ||||
| """ | ||||
|  | ||||
| import boto | ||||
| import boto.s3 | ||||
| import boto.s3.connection | ||||
| import json | ||||
| import random | ||||
| import urllib | ||||
|  | ||||
| from nova import flags | ||||
|   | ||||
| @@ -107,6 +107,9 @@ class BackRelayWithInput(protocol.ProcessProtocol): | ||||
|                     reason.trap(error.ProcessDone) | ||||
|                 self.deferred.callback((stdout, stderr)) | ||||
|             except: | ||||
|                 # This logic is a little suspicious to me (justinsb)... | ||||
|                 # If the callback throws an exception, then errback will be called also. | ||||
|                 # However, this is what the unit tests test for... | ||||
|                 self.deferred.errback(UnexpectedErrorOutput(stdout, stderr)) | ||||
|         elif self.onProcessEnded is not None: | ||||
|             self.onProcessEnded.errback(reason) | ||||
|   | ||||
| @@ -214,6 +214,9 @@ def serve(filename): | ||||
|         FLAGS.pidfile = '%s.pid' % name | ||||
|     elif FLAGS.pidfile.endswith('twistd.pid'): | ||||
|         FLAGS.pidfile = FLAGS.pidfile.replace('twistd.pid', '%s.pid' % name) | ||||
|     # NOTE(vish): if we're running nodaemon, redirect the log to stdout | ||||
|     if FLAGS.nodaemon and not FLAGS.logfile: | ||||
|         FLAGS.logfile = "-" | ||||
|     if not FLAGS.logfile: | ||||
|         FLAGS.logfile = '%s.log' % name | ||||
|     elif FLAGS.logfile.endswith('twistd.log'): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Justin Santa Barbara
					Justin Santa Barbara