예제 #1
0
        set_pod_manager(pod_manager)

    log.info("Setting event log manager...")
    event_log_manager = KeystoneEventLogManager()
    set_event_log_manager(event_log_manager)

    log.info("Watching property changes for restart...")
    RestartPropertyWatcher(get_config_manager(), exit_handler,
                           RESTART_PROPERTIES)

    log.info("Modeling the CPU...")
    cpu = get_cpu_from_env()

    # Start periodic scheduling
    log.info("Starting periodic event scheduling...")
    start_periodic_scheduling(exit_handler)

    # Start the cpu usage predictor manager
    log.info("Setting up the cpu usage predictor manager...")
    set_cpu_usage_predictor_manager(ConfigurableCpuUsagePredictorManager())

    # Start performance monitoring
    log.info("Starting performance monitoring...")
    workload_monitor_manager = WorkloadMonitorManager()
    set_workload_monitor_manager(workload_monitor_manager)

    # Setup the workload manager
    log.info("Setting up the workload manager...")
    cpu_allocator = get_fallback_allocator(get_config_manager())
    log.info(
        "Created Fallback CPU allocator with primary: '{}' and secondary: '{}".
예제 #2
0
        set_pod_manager(pod_manager)

    log.info("Setting event log manager...")
    event_log_manager = LocalEventLogManager()
    set_event_log_manager(event_log_manager)

    log.info("Watching property changes for restart...")
    RestartPropertyWatcher(get_config_manager(), exit_handler,
                           RESTART_PROPERTIES)

    log.info("Modeling the CPU...")
    cpu = get_cpu_from_env()

    # Start periodic scheduling
    log.info("Starting periodic event scheduling...")
    start_periodic_scheduling()

    # Start the cpu usage predictor manager
    log.info("Setting up the cpu usage predictor manager...")

    # Start performance monitoring
    log.info("Starting performance monitoring...")
    workload_monitor_manager = WorkloadMonitorManager()
    set_workload_monitor_manager(workload_monitor_manager)

    # Setup the workload manager
    log.info("Setting up the workload manager...")
    cpu_allocator = get_fallback_allocator(get_config_manager())
    log.info(
        "Created Fallback CPU allocator with primary: '{}' and secondary: '{}".
        format(cpu_allocator.get_primary_allocator().__class__.__name__,
예제 #3
0
    gunicorn_logger = logging.getLogger('gunicorn.error')
    app.logger.handlers = gunicorn_logger.handlers
    app.logger.setLevel(gunicorn_logger.level)

    log.info("Setting config manager...")
    config_manager = get_config_manager(EnvPropertyProvider())
    set_config_manager(config_manager)

    log.info("Setting event log manager...")
    set_event_log_manager(KeystoneEventLogManager())

    log.info("Setting up the cpu usage predictor manager...")
    set_cpu_usage_predictor_manager(ConfigurableCpuUsagePredictorManager())

    log.info("Setting cpu_allocators...")

    assign_alloc_str = config_manager.get_str(REMOTE_ASSIGN_ALLOCATOR)
    free_alloc_str = config_manager.get_str(REMOTE_FREE_ALLOCATOR)
    rebalance_alloc_str = config_manager.get_str(REMOTE_REBALANCE_ALLOCATOR)
    log.info("Setting cpu_allocators to assign: {}, free: {}, rebalance: {}".format(
        assign_alloc_str, free_alloc_str, rebalance_alloc_str))

    assign_allocator = get_allocator(assign_alloc_str, config_manager)
    free_allocator = get_allocator(free_alloc_str, config_manager)
    rebalance_allocator = get_allocator(rebalance_alloc_str, config_manager)
    set_cpu_allocators(assign_allocator, free_allocator, rebalance_allocator)

    log.info("Starting metrics reporting...")
    MetricsManager([SolverMetricsReporter(), assign_allocator, free_allocator, rebalance_allocator])
    start_periodic_scheduling(RealExitHandler())