~markmc/nova/flat-dhcp-without-bridge-iface

« back to all changes in this revision

Viewing changes to bin/nova-console

  • Committer: Tarmac
  • Author(s): Vishvananda Ishaya
  • Date: 2011-08-19 00:04:02 UTC
  • mfrom: (1450.4.8 united-launch-strategy)
  • Revision ID: tarmac-20110819000402-dp9hs0eosmunud8x
Makes all of the binary services launch using the same strategy.
 * Removes helper methods from utils for loading flags and logging
 * Changes service.serve to use Launcher
 * Changes service.wait to actually wait for all the services to exit
 * Changes nova-api to explicitly load flags and logging and use service.serve
 * Fixes the annoying IOError when /etc/nova/nova.conf doesn't exist

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import eventlet
22
22
eventlet.monkey_patch()
23
23
 
24
 
import gettext
25
24
import os
26
25
import sys
27
26
 
33
32
if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
34
33
    sys.path.insert(0, possible_topdir)
35
34
 
36
 
gettext.install('nova', unicode=1)
37
35
 
38
36
from nova import flags
39
37
from nova import log as logging
44
42
    utils.default_flagfile()
45
43
    flags.FLAGS(sys.argv)
46
44
    logging.setup()
47
 
    service.serve()
 
45
    server = service.Service.create(binary='nova-console')
 
46
    service.serve(server)
48
47
    service.wait()