Skip to content

[BUG] job.ts_user and job.ts_name are never replaced by the actual job user and job name before insertion into the time sharing map. #101

@ClementGre

Description

@ClementGre

To configure time sharing for a set of jobs, we add the types :
timesharing=user,name or timesharing=user,* or timesharing=*,name or timesharing=*,*.
This is extracted and saved as job.ts_user and job.ts_name here using:

job.ts_user, job.ts_name = j_type.type.split("=")[1].split(",")

To track timesharing, slots contain an attribute ts_itvs which is a mapping: (user_name or *) -> (job_name or *) -> ProcSet with ProcSet being the resources claimed by a job that is time-shareable with the job name job_name or any if * of the user job_user or any if *.

The bug is that job.ts_user and job.ts_name contains the keyword user or name (or *) instead of the actual job user and job name.
Then, when a job is scheduled and sub_slot_during_job is called, we use
slot.ts_itvs[job.ts_user][job.ts_name] = copy.copy(job.res_set) without replacing name and user by the actual job name and user name.

Then, unless the replacement is already done by oarsub, which seems not to be the case (see the tests here), the time_shared intervals will be common to all jobs.

To fix this, either job.ts_user should store the actual user name, or ts_user should be replaced by the job user name in sub_slot_during_job. Same for job.ts_name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions