Merge with trunk
This commit is contained in:
commit
602f214e52
@ -60,10 +60,11 @@ copyright = u'2010, United States Government as represented by the Administrator
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '2011.1'
|
||||
from nova import version as nova_version
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '2011.1-prerelease'
|
||||
release = nova_version.version()
|
||||
# The short X.Y version.
|
||||
version = nova_version.canonical_version_string()
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -19,16 +19,17 @@
|
||||
"""
|
||||
SQLAlchemy database backend
|
||||
"""
|
||||
import logging
|
||||
import time
|
||||
|
||||
from sqlalchemy.exc import OperationalError
|
||||
|
||||
from nova import flags
|
||||
from nova import log as logging
|
||||
from nova.db.sqlalchemy import models
|
||||
|
||||
|
||||
FLAGS = flags.FLAGS
|
||||
LOG = logging.getLogger('nova.db.sqlalchemy')
|
||||
|
||||
|
||||
for i in xrange(FLAGS.sql_max_retries):
|
||||
@ -39,5 +40,6 @@ for i in xrange(FLAGS.sql_max_retries):
|
||||
models.register_models()
|
||||
break
|
||||
except OperationalError:
|
||||
logging.exception(_("Data store is unreachable."
|
||||
" Trying again in %d seconds.") % FLAGS.sql_retry_interval)
|
||||
LOG.exception(_("Data store %s is unreachable."
|
||||
" Trying again in %d seconds."),
|
||||
FLAGS.sql_connection, FLAGS.sql_retry_interval)
|
||||
|
@ -22,7 +22,6 @@ System-level utilities and helper functions.
|
||||
|
||||
import datetime
|
||||
import inspect
|
||||
import logging
|
||||
import os
|
||||
import random
|
||||
import subprocess
|
||||
@ -37,8 +36,10 @@ from eventlet import greenthread
|
||||
|
||||
from nova import exception
|
||||
from nova.exception import ProcessExecutionError
|
||||
from nova import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger("nova.utils")
|
||||
TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
|
||||
|
||||
|
||||
@ -109,7 +110,7 @@ def vpn_ping(address, port, timeout=0.05, session_id=None):
|
||||
|
||||
|
||||
def fetchfile(url, target):
|
||||
logging.debug(_("Fetching %s") % url)
|
||||
LOG.debug(_("Fetching %s") % url)
|
||||
# c = pycurl.Curl()
|
||||
# fp = open(target, "wb")
|
||||
# c.setopt(c.URL, url)
|
||||
@ -121,7 +122,7 @@ def fetchfile(url, target):
|
||||
|
||||
|
||||
def execute(cmd, process_input=None, addl_env=None, check_exit_code=True):
|
||||
logging.debug(_("Running cmd (subprocess): %s"), cmd)
|
||||
LOG.debug(_("Running cmd (subprocess): %s"), cmd)
|
||||
env = os.environ.copy()
|
||||
if addl_env:
|
||||
env.update(addl_env)
|
||||
@ -134,7 +135,7 @@ def execute(cmd, process_input=None, addl_env=None, check_exit_code=True):
|
||||
result = obj.communicate()
|
||||
obj.stdin.close()
|
||||
if obj.returncode:
|
||||
logging.debug(_("Result was %s") % (obj.returncode))
|
||||
LOG.debug(_("Result was %s") % (obj.returncode))
|
||||
if check_exit_code and obj.returncode != 0:
|
||||
(stdout, stderr) = result
|
||||
raise ProcessExecutionError(exit_code=obj.returncode,
|
||||
@ -167,12 +168,12 @@ def default_flagfile(filename='nova.conf'):
|
||||
|
||||
|
||||
def debug(arg):
|
||||
logging.debug('debug in callback: %s', arg)
|
||||
LOG.debug(_('debug in callback: %s'), arg)
|
||||
return arg
|
||||
|
||||
|
||||
def runthis(prompt, cmd, check_exit_code=True):
|
||||
logging.debug(_("Running %s") % (cmd))
|
||||
LOG.debug(_("Running %s"), (cmd))
|
||||
rv, err = execute(cmd, check_exit_code=check_exit_code)
|
||||
|
||||
|
||||
@ -203,7 +204,7 @@ def get_my_ip():
|
||||
csock.close()
|
||||
return addr
|
||||
except socket.gaierror as ex:
|
||||
logging.warn(_("Couldn't get IP, using 127.0.0.1 %s"), ex)
|
||||
LOG.warn(_("Couldn't get IP, using 127.0.0.1 %s"), ex)
|
||||
return "127.0.0.1"
|
||||
|
||||
|
||||
@ -296,7 +297,7 @@ class LazyPluggable(object):
|
||||
fromlist = backend
|
||||
|
||||
self.__backend = __import__(name, None, None, fromlist)
|
||||
logging.info('backend %s', self.__backend)
|
||||
LOG.debug(_('backend %s'), self.__backend)
|
||||
return self.__backend
|
||||
|
||||
def __getattr__(self, key):
|
||||
|
13
setup.py
13
setup.py
@ -24,6 +24,15 @@ from setuptools.command.sdist import sdist
|
||||
from sphinx.setup_command import BuildDoc
|
||||
|
||||
from nova.utils import parse_mailmap, str_dict_replace
|
||||
from nova import version
|
||||
|
||||
if os.path.isdir('.bzr'):
|
||||
with open("nova/vcsversion.py", 'w') as version_file:
|
||||
vcs_cmd = subprocess.Popen(["bzr", "version-info", "--python"],
|
||||
stdout=subprocess.PIPE)
|
||||
vcsversion = vcs_cmd.communicate()[0]
|
||||
version_file.write(vcsversion)
|
||||
|
||||
|
||||
class local_BuildDoc(BuildDoc):
|
||||
def run(self):
|
||||
@ -49,7 +58,7 @@ class local_sdist(sdist):
|
||||
sdist.run(self)
|
||||
|
||||
setup(name='nova',
|
||||
version='2011.1',
|
||||
version=version.canonical_version_string(),
|
||||
description='cloud computing fabric controller',
|
||||
author='OpenStack',
|
||||
author_email='nova@lists.launchpad.net',
|
||||
@ -64,9 +73,11 @@ setup(name='nova',
|
||||
'bin/nova-dhcpbridge',
|
||||
'bin/nova-import-canonical-imagestore',
|
||||
'bin/nova-instancemonitor',
|
||||
'bin/nova-logspool',
|
||||
'bin/nova-manage',
|
||||
'bin/nova-network',
|
||||
'bin/nova-objectstore',
|
||||
'bin/nova-scheduler',
|
||||
'bin/nova-spoolsentry',
|
||||
'bin/nova-volume',
|
||||
'tools/nova-debug'])
|
||||
|
Loading…
Reference in New Issue
Block a user