security communication with openssl and simplify netio

This commit is contained in:
Rongsong Shen 2025-11-18 11:21:24 +08:00
parent 2a7b7c39bb
commit 8f796b3109
20 changed files with 1176 additions and 922 deletions

View file

@ -128,7 +128,6 @@ static int dispatch_a_job_(cluster_t* c, endpoint_t* ep, xce_job_alloc_t* alloc)
int rc = 0;
job_t* j;
worker_t* w;
ioctx_t* ioctx;
xce_host_alloc_t** allocs;
int nc;
xce_job_exec_t einfo;
@ -201,21 +200,11 @@ static int dispatch_a_job_(cluster_t* c, endpoint_t* ep, xce_job_alloc_t* alloc)
j->job.start_info->q_post_exec = q_post_exec;
}
ioctx = ioctx_alloc(w->ep, c->myhost);
if (ioctx == NULL) {
ERROR("memory allocate failed");
free_launchinfo(&launchinfo);
obj_deref(j);
DEREF_OBJ(w);
return -ENOMEM;
}
einfo.jobid = alloc->jobid;
einfo.start_info = j->job.start_info;
einfo.launchinfo = &launchinfo;
rc = xce_startjob_req(ioctx, &einfo);
rc = xce_startjob_req(w->ep, &einfo);
free_launchinfo(&launchinfo);
@ -256,7 +245,6 @@ int job_ctrl(cluster_t* c, xce_jobctrl_t* ctrinfo)
if (j->job.allocs != NULL) {
xce_host_alloc_t** allocs = j->job.allocs->allocs;
worker_t* w;
ioctx_t* ioctx;
/* job control command will be sent to first node
* for parallel jobs
@ -265,16 +253,10 @@ int job_ctrl(cluster_t* c, xce_jobctrl_t* ctrinfo)
if (w != NULL) {
/* FIXME: better method to check host status */
if ((w->ep != NULL) && (w->host.status == 0)) {
ioctx = ioctx_alloc(w->ep, c->myhost);
if (ioctx != NULL) {
rc = xce_jobctrl_req(ioctx, ctrinfo);
if (rc < 0) {
ERROR("job ctrl %ld on host %s returns %d", jobid,
w->host.name, rc);
}
} else {
ERROR("memory allocate failed");
rc = -ENOMEM;
rc = xce_jobctrl_req(w->ep, ctrinfo);
if (rc < 0) {
ERROR("job ctrl %ld on host %s returns %d", jobid,
w->host.name, rc);
}
} else {
ERROR("worker %s is not in correct state, status %x ep %p",