Пример #1
0
def main():
    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    # Enable object backporting via the conductor
    base.IronicObject.indirection_api = base.IronicObjectIndirectionAPI()

    # Build and start the WSGI app
    host = CONF.api.host_ip
    port = CONF.api.port
    wsgi = simple_server.make_server(host,
                                     port,
                                     app.VersionSelectorApplication(),
                                     server_class=ThreadedSimpleServer)

    LOG = log.getLogger(__name__)
    LOG.info(_LI("Serving on http://%(host)s:%(port)s"), {
        'host': host,
        'port': port
    })
    LOG.debug("Configuration:")
    CONF.log_opt_values(LOG, logging.DEBUG)

    try:
        wsgi.serve_forever()
    except KeyboardInterrupt:
        pass
Пример #2
0
def main():
    # Pase config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    mgr = ironic_service.RPCService(CONF.host, "ironic.conductor.manager", "ConductorManager")
    launcher = service.launch(mgr)
    launcher.wait()
Пример #3
0
def main():
    # Pase config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    mgr = manager.ConductorManager(CONF.host, manager.MANAGER_TOPIC)
    launcher = service.launch(mgr)
    launcher.wait()
Пример #4
0
def main():
    service.prepare_service()
    CONF.set_override('debug', False)
    _assess_db_performance()
    _assess_db_and_object_performance()
    _assess_db_object_and_api_performance()
    _report_conductors()
Пример #5
0
def main():
    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    # Enable object backporting via the conductor
    base.IronicObject.indirection_api = base.IronicObjectIndirectionAPI()

    # Build and start the WSGI app
    host = CONF.api.host_ip
    port = CONF.api.port
    wsgi = simple_server.make_server(
        host, port,
        app.VersionSelectorApplication(),
        server_class=ThreadedSimpleServer)

    LOG = log.getLogger(__name__)
    LOG.info(_LI("Serving on http://%(host)s:%(port)s"),
             {'host': host, 'port': port})
    LOG.debug("Configuration:")
    CONF.log_opt_values(LOG, logging.DEBUG)

    try:
        wsgi.serve_forever()
    except KeyboardInterrupt:
        pass
Пример #6
0
def main():
    # Pase config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    mgr = manager.ConductorManager(CONF.host, manager.MANAGER_TOPIC)
    launcher = service.launch(mgr)
    launcher.wait()
Пример #7
0
def main():
    # NOTE(lucasagomes): Safeguard to prevent 'ironic.conductor.manager'
    # from being imported prior to the configuration options being loaded.
    # If this happened, the periodic decorators would always use the
    # default values of the options instead of the configured ones. For
    # more information see: https://bugs.launchpad.net/ironic/+bug/1562258
    # and https://bugs.launchpad.net/ironic/+bug/1279774.
    assert 'ironic.conductor.manager' not in sys.modules

    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    if gmr is not None:
        gmr.TextGuruMeditation.setup_autorun(version)
    else:
        LOG.debug('Guru meditation reporting is disabled '
                  'because oslo.reports is not installed')

    mgr = rpc_service.RPCService(CONF.host, 'ironic.conductor.manager',
                                 'ConductorManager')

    issue_startup_warnings(CONF)

    profiler.setup('ironic_conductor', CONF.host)

    launcher = service.launch(CONF, mgr, restart_method='mutate')
    launcher.wait()
Пример #8
0
def main():
    # Pase config file and command line options, then start logging
    prepare_service(sys.argv)

    topic = 'ironic.manager'
    mgr = manager.ManagerService(CONF.host, topic)
    launcher = service.launch(mgr)
    launcher.wait()
Пример #9
0
def main():
    # Pase config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    topic = 'ironic.manager'
    mgr = manager.ManagerService(CONF.host, topic)
    launcher = service.launch(mgr)
    launcher.wait()
Пример #10
0
def main():
    # Pase config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    mgr = ironic_service.RPCService(CONF.host, 'ironic.conductor.manager',
                                    'ConductorManager')
    launcher = service.launch(mgr)
    launcher.wait()
Пример #11
0
def initialize_wsgi_app(argv=sys.argv):
    i18n.install('ironic')

    service.prepare_service(argv)

    LOG.debug("Configuration:")
    CONF.log_opt_values(LOG, log.DEBUG)

    return app.VersionSelectorApplication()
Пример #12
0
def main():
    # Pase config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    mgr = ironic_service.load_manager('ironic.conductor.manager',
                                      'ConductorManager',
                                       CONF.host)
    launcher = service.launch(mgr)
    launcher.wait()
Пример #13
0
def main():
    # this is hack to work with previous usage of ironic-dbsync
    # pls change it to ironic-dbsync upgrade
    valid_commands = set(["upgrade", "downgrade", "revision", "version", "stamp", "create_schema"])
    if not set(sys.argv) & valid_commands:
        sys.argv.append("upgrade")

    service.prepare_service(sys.argv)
    CONF.command.func()
Пример #14
0
def main():
    # this is hack to work with previous usage of ironic-dbsync
    # pls change it to ironic-dbsync upgrade
    valid_commands = set(
        ['upgrade', 'downgrade', 'revision', 'version', 'stamp'])
    if not set(sys.argv) & valid_commands:
        sys.argv.append('upgrade')

    service.prepare_service(sys.argv)
    CONF.command.func()
Пример #15
0
def main():
    # this is hack to work with previous usage of ironic-dbsync
    # pls change it to ironic-dbsync upgrade
    valid_commands = set([
        'upgrade', 'downgrade', 'revision',
        'version', 'stamp', 'create_schema',
    ])
    if not set(sys.argv) & valid_commands:
        sys.argv.append('upgrade')

    service.prepare_service(sys.argv)
    CONF.command.func()
Пример #16
0
def main():
    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    # Enable object backporting via the conductor
    base.IronicObject.indirection_api = base.IronicObjectIndirectionAPI()

    # Build and start the WSGI app
    launcher = ironic_service.process_launcher()
    server = ironic_service.WSGIService('ironic_api', CONF.api.enable_ssl_api)
    launcher.launch_service(server, workers=server.workers)
    launcher.wait()
Пример #17
0
def main():
    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    # Enable object backporting via the conductor
    base.IronicObject.indirection_api = base.IronicObjectIndirectionAPI()

    # Build and start the WSGI app
    launcher = ironic_service.process_launcher()
    server = ironic_service.WSGIService('ironic_api')
    launcher.launch_service(server, workers=server.workers)
    launcher.wait()
Пример #18
0
def main():
    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    mgr = ironic_service.RPCService(CONF.host, 'ironic.conductor.manager',
                                    'ConductorManager')

    LOG = log.getLogger(__name__)
    LOG.debug("Configuration:")
    CONF.log_opt_values(LOG, log.DEBUG)

    launcher = service.launch(CONF, mgr)
    launcher.wait()
Пример #19
0
def main():
    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    gmr.TextGuruMeditation.setup_autorun(version)

    profiler.setup('ironic_api', CONF.host)

    # Build and start the WSGI app
    launcher = ironic_service.process_launcher()
    server = wsgi_service.WSGIService('ironic_api', CONF.api.enable_ssl_api)
    launcher.launch_service(server, workers=server.workers)
    launcher.wait()
Пример #20
0
def initialize_wsgi_app(show_deprecated=False):
    i18n.install('ironic')

    service.prepare_service(sys.argv)

    LOG.debug("Configuration:")
    CONF.log_opt_values(LOG, log.DEBUG)

    if show_deprecated:
        LOG.warning("Using ironic/api/app.wsgi is deprecated and it will "
                    "be removed in Rocky release. Please use automatically "
                    "generated ironic-api-wsgi instead.")

    return app.VersionSelectorApplication()
Пример #21
0
def main():
    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    mgr = ironic_service.RPCService(CONF.host,
                                    'ironic.conductor.manager',
                                    'ConductorManager')

    LOG = log.getLogger(__name__)
    LOG.debug("Configuration:")
    CONF.log_opt_values(LOG, logging.DEBUG)

    launcher = service.launch(CONF, mgr)
    launcher.wait()
Пример #22
0
def main():
    # Pase config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    # Build and start the WSGI app
    host = CONF.ironic_api_bind_ip
    port = CONF.ironic_api_port
    wsgi = simple_server.make_server(host, port,
                                     app.VersionSelectorApplication())

    print "Serving on http://%s:%s" % (host, port)

    try:
        wsgi.serve_forever()
    except KeyboardInterrupt:
        pass
Пример #23
0
def main():
    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    gmr.TextGuruMeditation.setup_autorun(version)

    # Enable object backporting via the conductor
    base.IronicObject.indirection_api = (
        indirection.IronicObjectIndirectionAPI())

    profiler.setup('ironic_api', CONF.host)

    # Build and start the WSGI app
    launcher = ironic_service.process_launcher()
    server = wsgi_service.WSGIService('ironic_api', CONF.api.enable_ssl_api)
    launcher.launch_service(server, workers=server.workers)
    launcher.wait()
Пример #24
0
def main():
    # Pase config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    # Build and start the WSGI app
    host = CONF.ironic_api_bind_ip
    port = CONF.ironic_api_port
    wsgi = simple_server.make_server(
            host, port,
            app.VersionSelectorApplication())

    print "Serving on http://%s:%s" % (host, port)

    try:
        wsgi.serve_forever()
    except KeyboardInterrupt:
        pass
Пример #25
0
def main():
    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    if gmr is not None:
        gmr.TextGuruMeditation.setup_autorun(version)
    else:
        LOG.debug('Guru meditation reporting is disabled '
                  'because oslo.reports is not installed')

    profiler.setup('ironic_api', CONF.host)

    # Build and start the WSGI app
    launcher = ironic_service.process_launcher()
    server = wsgi_service.WSGIService('ironic_api', CONF.api.enable_ssl_api)
    launcher.launch_service(server, workers=server.workers)
    launcher.wait()
Пример #26
0
def main():
    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    gmr.TextGuruMeditation.setup_autorun(version)

    # Enable object backporting via the conductor
    base.IronicObject.indirection_api = (
        indirection.IronicObjectIndirectionAPI())

    profiler.setup('ironic_api', CONF.host)

    # Build and start the WSGI app
    launcher = ironic_service.process_launcher()
    server = wsgi_service.WSGIService('ironic_api', CONF.api.enable_ssl_api)
    launcher.launch_service(server, workers=server.workers)
    launcher.wait()
Пример #27
0
def main():
    # Pase config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    # Build and start the WSGI app
    host = CONF.api.host_ip
    port = CONF.api.port
    wsgi = simple_server.make_server(host, port, app.VersionSelectorApplication(), server_class=ThreadedSimpleServer)

    LOG = log.getLogger(__name__)
    LOG.info(_LI("Serving on http://%(host)s:%(port)s"), {"host": host, "port": port})
    LOG.info(_LI("Configuration:"))
    CONF.log_opt_values(LOG, logging.INFO)

    try:
        wsgi.serve_forever()
    except KeyboardInterrupt:
        pass
Пример #28
0
def main():
    # NOTE(lucasagomes): Safeguard to prevent 'ironic.conductor.manager'
    # from being imported prior to the configuration options being loaded.
    # If this happened, the periodic decorators would always use the
    # default values of the options instead of the configured ones. For
    # more information see: https://bugs.launchpad.net/ironic/+bug/1562258
    # and https://bugs.launchpad.net/ironic/+bug/1279774.
    assert 'ironic.conductor.manager' not in sys.modules

    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    mgr = rpc_service.RPCService(CONF.host, 'ironic.conductor.manager',
                                 'ConductorManager')

    _check_auth_options(CONF)

    launcher = service.launch(CONF, mgr)
    launcher.wait()
Пример #29
0
def main():
    # Pase config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    # Build and start the WSGI app
    host = CONF.ironic_api_bind_ip
    port = CONF.ironic_api_port
    wsgi = simple_server.make_server(host, port,
                                     app.VersionSelectorApplication())

    LOG = log.getLogger(__name__)
    LOG.info("Serving on http://%s:%s" % (host, port))
    LOG.info("Configuration:")
    CONF.log_opt_values(LOG, logging.INFO)

    try:
        wsgi.serve_forever()
    except KeyboardInterrupt:
        pass
Пример #30
0
def main():
    command_opt = cfg.SubCommandOpt('command',
                                    title='Command',
                                    help=_('Available commands'),
                                    handler=add_command_parsers)

    CONF.register_cli_opt(command_opt)

    # this is hack to work with previous usage of ironic-dbsync
    # pls change it to ironic-dbsync upgrade
    valid_commands = set([
        'upgrade', 'revision',
        'version', 'stamp', 'create_schema',
        'online_data_migrations',
    ])
    if not set(sys.argv) & valid_commands:
        sys.argv.append('upgrade')

    service.prepare_service(sys.argv)
    CONF.command.func()
Пример #31
0
def main():
    command_opt = cfg.SubCommandOpt('command',
                                    title='Command',
                                    help=_('Available commands'),
                                    handler=add_command_parsers)

    CONF.register_cli_opt(command_opt)

    # this is hack to work with previous usage of ironic-dbsync
    # pls change it to ironic-dbsync upgrade
    valid_commands = set([
        'upgrade', 'revision',
        'version', 'stamp', 'create_schema',
        'online_data_migrations',
    ])
    if not set(sys.argv) & valid_commands:
        sys.argv.append('upgrade')

    service.prepare_service(sys.argv)
    CONF.command.func()
Пример #32
0
def main():
    # NOTE(lucasagomes): Safeguard to prevent 'ironic.conductor.manager'
    # from being imported prior to the configuration options being loaded.
    # If this happened, the periodic decorators would always use the
    # default values of the options instead of the configured ones. For
    # more information see: https://bugs.launchpad.net/ironic/+bug/1562258
    # and https://bugs.launchpad.net/ironic/+bug/1279774.
    assert 'ironic.conductor.manager' not in sys.modules

    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    mgr = rpc_service.RPCService(CONF.host,
                                 'ironic.conductor.manager',
                                 'ConductorManager')

    _check_auth_options(CONF)

    launcher = service.launch(CONF, mgr)
    launcher.wait()
Пример #33
0
def main():
    # Pase config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    # Build and start the WSGI app
    host = CONF.ironic_api_bind_ip
    port = CONF.ironic_api_port
    wsgi = simple_server.make_server(
            host, port,
            app.VersionSelectorApplication())

    LOG = log.getLogger(__name__)
    LOG.info("Serving on http://%s:%s" % (host, port))
    LOG.info("Configuration:")
    CONF.log_opt_values(LOG, logging.INFO)

    try:
        wsgi.serve_forever()
    except KeyboardInterrupt:
        pass
Пример #34
0
def main():
    # Pase config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    # Build and start the WSGI app
    host = CONF.api.host_ip
    port = CONF.api.port
    wsgi = simple_server.make_server(
            host, port,
            app.VersionSelectorApplication(),
            server_class=ThreadedSimpleServer)

    LOG = log.getLogger(__name__)
    LOG.info(_("Serving on http://%(host)s:%(port)s") %
             {'host': host, 'port': port})
    LOG.info(_("Configuration:"))
    CONF.log_opt_values(LOG, logging.INFO)

    try:
        wsgi.serve_forever()
    except KeyboardInterrupt:
        pass
Пример #35
0
def main():
    # NOTE(lucasagomes): Safeguard to prevent 'ironic.conductor.manager'
    # from being imported prior to the configuration options being loaded.
    # If this happened, the periodic decorators would always use the
    # default values of the options instead of the configured ones. For
    # more information see: https://bugs.launchpad.net/ironic/+bug/1562258
    # and https://bugs.launchpad.net/ironic/+bug/1279774.
    assert 'ironic.conductor.manager' not in sys.modules

    # Parse config file and command line options, then start logging
    ironic_service.prepare_service(sys.argv)

    gmr.TextGuruMeditation.setup_autorun(version)

    mgr = rpc_service.RPCService(CONF.host,
                                 'ironic.conductor.manager',
                                 'ConductorManager')

    issue_startup_warnings(CONF)

    profiler.setup('ironic_conductor', CONF.host)

    launcher = service.launch(CONF, mgr, restart_method='mutate')
    launcher.wait()
Пример #36
0
def main():
    service.prepare_service(sys.argv)
    migration.db_sync()
Пример #37
0
def main():
    service.prepare_service(sys.argv)
    migration.db_sync()
Пример #38
0
def main():
    service.prepare_service()
    CONF.set_override('debug', False)
    _create_test_nodes()