调整kni.conf
This commit is contained in:
@@ -362,7 +362,7 @@ static int log_generate(struct pme_info *pmeinfo, void *local_logger){
|
||||
ret = kni_send_logger_sendlog(g_kni_handle->send_logger, log_msg, strlen(log_msg));
|
||||
if(ret < 0){
|
||||
FS_operate(g_kni_fs_handle->handle, g_kni_fs_handle->fields[KNI_FIELD_SENDLOG_FAIL], 0, FS_OP_ADD, 1);
|
||||
KNI_LOG_ERROR(local_logger, "Failed at knisend_logger_sendlog, ret is %d, strem_traceid is %s",
|
||||
KNI_LOG_ERROR(local_logger, "Failed at sendlog_to_kafka, ret is %d, strem_traceid is %s",
|
||||
ret, pmeinfo->stream_traceid);
|
||||
goto error_out;
|
||||
}
|
||||
@@ -1760,7 +1760,7 @@ extern "C" int kni_init(){
|
||||
char log_path[KNI_PATH_MAX] = "";
|
||||
int tfe_node_count = 0;
|
||||
int tfe_data_recv_thread_num = -1;
|
||||
char local_eth[KNI_SYMBOL_MAX] = "";
|
||||
char manage_eth[KNI_SYMBOL_MAX] = "";
|
||||
struct kni_send_logger *send_logger = NULL;
|
||||
struct kni_field_stat_handle *fs_handle = NULL;
|
||||
int id = -1;
|
||||
@@ -1801,15 +1801,15 @@ extern "C" int kni_init(){
|
||||
goto error_out;
|
||||
}
|
||||
ret = MESA_load_profile_int_def(profile, section, "tfe_data_recv_thread_num", &tfe_data_recv_thread_num, 1);
|
||||
ret = MESA_load_profile_string_nodef(profile, section, "local_eth", local_eth, sizeof(local_eth));
|
||||
ret = MESA_load_profile_string_nodef(profile, section, "manage_eth", manage_eth, sizeof(manage_eth));
|
||||
if(ret < 0){
|
||||
printf("MESA_prof_load: local_eth not set, profile is %s, section is %s", profile, section);
|
||||
printf("MESA_prof_load: manage_eth not set, profile is %s, section is %s", profile, section);
|
||||
goto error_out;
|
||||
}
|
||||
ret = MESA_load_profile_int_def(profile, section, "keepalive_replay_switch", &keepalive_replay_switch, 1);
|
||||
KNI_LOG_ERROR(local_logger, "MESA_prof_load, [%s]:\n log_path: %s\n log_level: %d\n tfe_node_count: %d\n"
|
||||
"tfe_data_recv_thread_num: %d\n local_eth: %s\n keepalive_replay_switch: %d",
|
||||
section, log_path, log_level, tfe_node_count, tfe_data_recv_thread_num, local_eth, keepalive_replay_switch);
|
||||
"tfe_data_recv_thread_num: %d\n manage_eth: %s\n keepalive_replay_switch: %d",
|
||||
section, log_path, log_level, tfe_node_count, tfe_data_recv_thread_num, manage_eth, keepalive_replay_switch);
|
||||
g_kni_handle = ALLOC(struct kni_handle, 1);
|
||||
g_kni_handle->local_logger = local_logger;
|
||||
g_kni_handle->tfe_data_recv_thread_num = tfe_data_recv_thread_num;
|
||||
@@ -1846,16 +1846,16 @@ extern "C" int kni_init(){
|
||||
g_kni_fs_handle = fs_handle;
|
||||
|
||||
//init local_ipv4
|
||||
ret = kni_ipv4_addr_get_by_eth(local_eth, &(g_kni_handle->local_ipv4));
|
||||
ret = kni_ipv4_addr_get_by_eth(manage_eth, &(g_kni_handle->local_ipv4));
|
||||
if(ret < 0){
|
||||
KNI_LOG_ERROR(local_logger, "Failed at get bind ipv4 addr, eth is %s", local_eth);
|
||||
KNI_LOG_ERROR(local_logger, "Failed at get bind ipv4 addr, eth is %s", manage_eth);
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
//init kni_send_logger
|
||||
send_logger = kni_send_logger_init(profile, local_logger);
|
||||
if(send_logger == NULL){
|
||||
KNI_LOG_ERROR(local_logger, "Failed at init kni_send_logger", local_eth);
|
||||
KNI_LOG_ERROR(local_logger, "Failed at init kni_send_logger", manage_eth);
|
||||
goto error_out;
|
||||
}
|
||||
g_kni_handle->send_logger = send_logger;
|
||||
|
||||
Reference in New Issue
Block a user