from heat.common import config
from heat.common import wsgi
-from paste import httpserver
from heat.openstack.common import cfg
from heat.openstack.common import log as logging
port = cfg.CONF.bind_port
host = cfg.CONF.bind_host
- LOG.info(('Starting Heat API on %s:%s') % (host, port))
- httpserver.serve(app, host=host, port=port)
+ LOG.info('Starting Heat API on %s:%s' % (host, port))
+ server = wsgi.Server()
+ server.start(app, cfg.CONF, default_port=port)
+ server.wait()
except RuntimeError, e:
sys.exit("ERROR: %s" % e)
from heat.common import config
from heat.common import wsgi
from heat.common import context
-from paste import httpserver
from heat.openstack.common import log as logging
from heat.openstack.common import cfg
host = cfg.CONF.bind_host
send_address_to_engine(host, port)
LOG.info(('Starting Heat Metadata on %s:%s') % (host, port))
- httpserver.serve(app, host=host, port=port)
+ server = wsgi.Server()
+ server.start(app, cfg.CONF, default_port=port)
+ server.wait()
except RuntimeError, e:
sys.exit("ERROR: %s" % e)
raise RuntimeError("Unable to locate config file")
try:
- # Setup logging early
- setup_logging()
-
app = wsgi.paste_deploy_app(conf_file, app_name, cfg.CONF)
# Log the options used when starting if we're in debug mode...
from heat.openstack.common import importutils
from heat.openstack.common import utils
+
+# TODO(shadower) remove this once eventlet with fix from #55 gets released
+eventlet.wsgi.MAX_REQUEST_LINE = 50000
+
bind_opts = [
cfg.StrOpt('bind_host', default='0.0.0.0'),
cfg.IntOpt('bind_port'),
def get_bind_addr(conf, default_port=None):
"""Return the host and port to bind to."""
- conf.register_opts(bind_opts)
+ for opt in bind_opts:
+ if not opt.name in conf:
+ conf.register_opt(opt)
return (conf.bind_host, conf.bind_port or default_port)