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

« back to all changes in this revision

Viewing changes to bin/nova-compute

  • 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:
22
22
import eventlet
23
23
eventlet.monkey_patch()
24
24
 
25
 
import gettext
26
25
import os
27
26
import sys
28
27
 
34
33
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
35
34
    sys.path.insert(0, POSSIBLE_TOPDIR)
36
35
 
37
 
gettext.install('nova', unicode=1)
38
36
 
39
37
from nova import flags
40
38
from nova import log as logging
45
43
    utils.default_flagfile()
46
44
    flags.FLAGS(sys.argv)
47
45
    logging.setup()
48
 
    service.serve()
 
46
    server = service.Service.create(binary='nova-compute')
 
47
    service.serve(server)
49
48
    service.wait()