Hey Mike,
Thank you for looking at the design and providing feedback -
The new reservation will be named R<next_available_id>. If the job id is 123 and is run immediately when submitted, the reservation might get named R124.
I have added this detail to the design.
Yes, now updated in the design.
I missed out on this - we are not allowing the user to create reservation out of an array job, but did not specify the error that will be displayed.
I have added Interface 5 for the error message
In all 3 scenarios - the reservation will be created in the pulling complex.
Done
I would like to restrict the option of creating reservation out of a job to jobs only in state R/42, updated the design with this detail.
Thanks for the updates @prakashcv13. A couple more itemsâŚ
I think you should change âpbs_rsub: Reservation cannot be created from a reservation jobâ to âpbs_rsub: Reservation may not be created from a job already within a reservationâ. I would caution your use of âcanâ and âmayâ. If something is impossible, it âcannotâ be done. If a restriction has been imposed it âmay notâ be done.
What type of attribute is create_resv_from? Is it numeric, string, etc.?
Hey @prakashcv13
I only have two comments. First is what is the permissions on create_resv_from? If it is for normal users, then it might be an end run around the reservation ACLs. If it is for normal users, you should check if the user is in the reservation ACLs and reject the job if not.
My other comment is that you might change create_resv_from to create_resv_from_job. The existing attribute seems to end all of a sudden.
What happens if a job is submitted into a reservation queue with âcreate_resv_fromâ attribute set to 1? I assume server will reject it but you may want to add that to design.
Walltime of the reservation will be the walltime left out of the running job or the full walltime the job was submitted for? I assume it is going to be the walltime left on the running job but it will help if you mention that.
Can jobs be altered to set âcreate_resv_fromâ attribute while they are running?
I am with @bhroam on renaming the attribute name from âcreate_resv_fromâ to âcreate_resv_from_jobâ.
What error is thrown when the job and the reservationâs user do not match?
The design document currently mentions âInterface 4â twice, please change that.
Existing functionality - if one user is submitting a job to anotherâ reservation - it will be reported as an Unauthorized request
other way round - new functionality - creating a reservation out of another userâs job will also display the same message - updated the design with this information.
Now, this is something I did not think of. @scc, I am with @arungrover on this, could you please let us know what according to you would be the right thing to do?
In the example in interface 6, what is âqrâ ? Is it an alias of pbs_rstat?
Maybe rephrase the error message in interface 6 to say âjob in a reservationâ instead of âreservation jobâ. When I think about the term reservation job, I think about this feature.
Thanks @prakashcv13 for addressing the comments. I have a few questions about the implementation though and it would be nice if you could add some of the internal design details to the document as well.
I saw the example you have listed in âhook demo.txtâ file and saw that the job out of which the reservation was made was a job without a walltime. I think we should not allow such jobs to have a reservations created out of them. The reason being it is hard to decide the duration of the reservation.
There could be jobs submitted with soft walltime and in those case reservations should only use hard walltime of the job to decide its duration.
Currently we do not allow running jobs to move queues, How are you planning to move the running job into reservation queue in this case? Would it dequeue the job from its original queue and then enqueue the job into the reservation queue? If so, how will it affect limits? wouldnât it open a way to game the system for users to move their running jobs into reservations and not get affected by run limits?
You might want to change Interface 7. It shows a qsub error for pbs_rsub command.
Not difficult, the reservation will be for 5 years.
done.
good point to be mentioned in the design. done.
Yes, dequeue-ing and enqueue-ing is what I was thinking of. User will not be able to go around the limits if they are applied at the server/complex level.
But, if applied at the queue level, they would be able to.
I donât think using the default scheduler duration is the right answer here. I think you should deny converting a job into a reservation unless it has a walltime. If we want to come back to this in the future, weâll have more flexibility of how we want to implement it.
This will also screw with defaults. Any resource that was gained from a default will be lost when it is dequeued from the original queue. The resources_max on the reservation queue might replace it though. This should be tested.
Hey @prakashcv13
I just had a thought. Does the rsub hook get called when you convert a job into a reservation? I think it should. We are creating a new reservation.
I believe we actually should create the reservation from a job with no walltime request and have it be for a 5 year duration. The intent is that this will play nicely with the other feature you are working on: Deleting idle reservations.
for limits - the user can even now get passed them - by moving the job to a reservation.
for default resources - this is a documented behaviour - we should document that the default resources might get lost OR - would you suggest using the same default resources from the queue to which the job is submitted while creating a reservation queue?
The reservation will be created with the resources the job requested. A resources_max will be set on the reservation queue. Jobs pick this up as a default if there isnât a default set. My concern might not be warranted. Could you test this? Submit a job into a queue with resources_default.foo = 5. Convert that job into a reservation. Check to see if it still has a request of foo.