From 4cf1001fa37c00daea40e9f68be7c95ab0e41e4d Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Thu, 29 Jul 2010 16:52:08 -0700 Subject: fix imports in endpoint/images.py boto.s3 no longer imports connection, so we need to explicitly import it. --- nova/endpoint/images.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nova/endpoint/images.py b/nova/endpoint/images.py index 12876da30..32f7cc228 100644 --- a/nova/endpoint/images.py +++ b/nova/endpoint/images.py @@ -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 -- cgit From fc433987e6adbca086bd2fa3d416658e9d3f04ba Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Thu, 29 Jul 2010 17:10:28 -0700 Subject: boto.utils import doesn't work with new boto, import boto instead --- nova/auth/signer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/auth/signer.py b/nova/auth/signer.py index 7d7471575..3b9bc8f2c 100644 --- a/nova/auth/signer.py +++ b/nova/auth/signer.py @@ -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 -- cgit From 099feefbbd1f9b0db70f1a4bcc90da57f902af9d Mon Sep 17 00:00:00 2001 From: Devin Carlen Date: Thu, 29 Jul 2010 17:18:39 -0700 Subject: Added project param to admin client zip download --- nova/adminclient.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nova/adminclient.py b/nova/adminclient.py index fceeac274..25d5e71cb 100644 --- a/nova/adminclient.py +++ b/nova/adminclient.py @@ -292,9 +292,13 @@ class NovaAdminClient(object): 'Operation': operation} return self.apiconn.get_status('ModifyProjectMember', params) - def get_zip(self, username): - """ returns the content of a zip file containing novarc and access credentials. """ - return self.apiconn.get_object('GenerateX509ForUser', {'Name': username}, UserInfo).file + def get_zip(self, user, project): + """ + Returns the content of a zip file containing novarc and access credentials. + """ + params = {'Name': user, 'Project': project} + zip = self.apiconn.get_object('GenerateX509ForUser', params, UserInfo) + return zip.file def get_hosts(self): return self.apiconn.get_list('DescribeHosts', {}, [('item', HostInfo)]) -- cgit From 912a6bd28adb2a17c4d0508ee44b1d19ae2624f0 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Fri, 30 Jul 2010 11:29:13 -0700 Subject: Make nodaemon twistd processes log to stdout --- bin/nova-objectstore | 5 ----- nova/twistd.py | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/nova-objectstore b/bin/nova-objectstore index 9385fd299..c0fa815c0 100755 --- a/bin/nova-objectstore +++ b/bin/nova-objectstore @@ -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 diff --git a/nova/twistd.py b/nova/twistd.py index ecb6e2892..c83276daa 100644 --- a/nova/twistd.py +++ b/nova/twistd.py @@ -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'): -- cgit