Exemple #1
0
void populate_term_msg(struct local_exec_act *loadsat_act_data, char *node_coord_contact_list, char *node_contact_list) {
	char *loadsat_act_func = "{\n\
	\tint num_vcpus = 0;\n\
	\tlibvirt_init();\n\
	\tlibvirt_open();\n\
	\tnum_vcpus = (int)libvirt_get_domain_num_vcpus(\"Domain-0\");\n\
	\tnum_vcpus = num_vcpus - 1;\n\
	\tlibvirt_set_vcpus(\"Domain-0\", num_vcpus);\n\
	\tlibvirt_close();\n\
	}";
Exemple #2
0
static void __main_clean(int keeppid)
{
    if (g_c == NULL)
        return;


    NodeConfig *c = &g_c->config;
    NodeSysConfig *s = &g_c->config_sys;

    ly_epoll_close();
    libvirt_close();
    if (keeppid == 0)
        lyutil_remove_pid_file(c->pid_path, PROGRAM_NAME);
    lyauth_free(&g_c->auth);
    if (c->clc_ip)
        free(c->clc_ip);
    if (c->clc_mcast_ip)
        free(c->clc_mcast_ip);
    if (c->conf_path)
        free(c->conf_path);
    if (c->sysconf_path)
        free(c->sysconf_path);
    if (c->node_data_dir)
        free(c->node_data_dir);
    if (c->ins_data_dir)
        free(c->ins_data_dir);
    if (c->app_data_dir)
        free(c->app_data_dir);
    if (c->log_path)
        free(c->log_path);
    if (s->clc_ip)
        free(s->clc_ip);
    if (s->node_secret)
        free(s->node_secret);
    if (g_c->clc_ip)
        free(g_c->clc_ip);
    if (g_c->node_ip)
        free(g_c->node_ip);
    if (g_c->node) {
        luoyun_node_info_cleanup(g_c->node);
        free(g_c->node);
    }
    free(g_c);
    logclose();
    lyxml_cleanup();
    return;
}
Exemple #3
0
static void __main_clean(int keeppid)
{
    if (g_c == NULL)
        return;

    NodeConfig *c = &g_c->config;

    libvirt_close();
    if (c->conf_path)
        free(c->conf_path);
    if (c->sysconf_path)
        free(c->sysconf_path);
    if (c->node_data_dir)
        free(c->node_data_dir);
    if (c->log_path)
        free(c->log_path);
    if (g_c->node)
        free(g_c->node);
    free(g_c);
    return;
}