[GE dev] Re: [GE dev] [GE users] Can a user change his/her job priority

sleon roman at glebov.de
Wed Nov 12 11:26:13 GMT 2008


    [ The following text is in the "UTF-8" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Resending the patch

Roman Glebov wrote:
> NOTE: The following attachments:
>
> ge.patch[text/x-diff;
>  name="ge.patch"] 
>
>  have been removed from this message because they are not allowed for this discussion.
>
> Hallo Chris and GE-Developers,
>  
>  We have confronted a similar problem. Thats why
>  i have written a simple patch for latest-cvs-version of Gridengine,
>  which allows non-admin users to choose Priorities > 0 and also
>  to increase a priority of a  job after it was submitted.
>  
>  Can this patch be incorporated into the SGE-Source?
>  
>  Maybe this option should be configurable in the future, but for now just look at the patch.
>  
>  with regards Roman Glebov
>
>
>
> Sebastian Stark wrote:
>   
>>> Hi Sebastian,
>>>
>>> I have not followed up on that issue and looking back it seems I have
>>> not filed an SGE issue on this.
>>>
>>> If you still have my original post to the list can you reply to it
>>> mentioning your issue and SGE version? That will update the thread
>>> and hopefully we'll get an answer. I'll test with SGE 6.2 later today
>>> and will file an issue if needed.
>>>
>>> Regards,
>>> Chris
>>>
>>>
>>>
>>> On Nov 7, 2008, at 5:28 AM, Sebastian Stark wrote:
>>>
>>>       
>>>> Hi Chris,
>>>>
>>>> did you ever receive an answer to this question? We have the same
>>>> problem here.
>>>>
>>>>
>>>> Sebastian
>>>>
>>>> On 17.06.2008, at 16:19, Chris Dagdigian wrote:
>>>>
>>>>         
>>>>> Hi SGE devs,
>>>>>
>>>>> Users are reporting that they can't raise the priority of their own
>>>>> jobs even when the priority value is less than zero (in past SGE
>>>>> versions users used to have full control to raise and lower values
>>>>> in the range -1023 to 0 with operators/managers having control over
>>>>> the higher range).
>>>>>
>>>>> Is this an intended behavior (non-operators can never raise
>>>>> priority value ever, regardless of its value)?
>>>>>
>>>>> -Chris
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Begin forwarded message:
>>>>>
>>>>>           
>>>>>> From: "Kevin Doman" <kdoman07 at gmail.com>
>>>>>> Date: June 17, 2008 10:15:17 AM EDT
>>>>>> To: users at gridengine.sunsource.net
>>>>>> Subject: Re: [GE users] Can a user change his/her job priority
>>>>>> Reply-To: users at gridengine.sunsource.net
>>>>>>
>>>>>> 6.1u2, 6.1u4 ... mine is 6.0u8 and I experienced the same thing.
>>>>>>
>>>>>> On Tue, Jun 17, 2008 at 9:12 AM, Richard Ems
>>>>>> <Richard.Ems at cape-horn-eng.com> wrote:
>>>>>>             
>>>>>>> Chris Dagdigian wrote:
>>>>>>>
>>>>>>>               
>>>>>>>> Because the starting value is -100 your user can then
>>>>>>>> self-elevate some of
>>>>>>>> his/her jobs by using the values -99 to -1. Kinda odd from a usage
>>>>>>>> perspective but it should work.
>>>>>>>>                 
>>>>>>> But this solution you propose is what is not working anymore. A
>>>>>>> user can
>>>>>>> only decrease priorities and not increase them, regardless of
>>>>>>> which priority
>>>>>>> they try (on 6.1u2 and 6.1u4).
>>>>>>>
>>>>>>> qalter -p -100 12345           works
>>>>>>>
>>>>>>> and later
>>>>>>>
>>>>>>> qalter -p -90 12345            does not work
>>>>>>>
>>>>>>> This last command throws the error "denied: "<user>" must be
>>>>>>> operator to
>>>>>>> increase job priority".
>>>>>>>
>>>>>>> I think this worked up to some older SGE version.
>>>>>>>
>>>>>>> Richard
>>>>>>>
>>>>>>> -- 
>>>>>>> Richard Ems       mail: Richard.Ems at Cape-Horn-Eng.com
>>>>>>>
>>>>>>> Cape Horn Engineering S.L.
>>>>>>> C/ Dr. J.J. Dómine 1, 5? piso
>>>>>>> 46011 Valencia
>>>>>>> Tel : +34 96 3242923 / Fax 924
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>>
>>>>>>> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
>>>>>>> For additional commands, e-mail: users-help at gridengine.sunsource.net
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
>>>>>> For additional commands, e-mail: users-help at gridengine.sunsource.net
>>>>>>
>>>>>>             
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe at gridengine.sunsource.net
>>>>> For additional commands, e-mail: dev-help at gridengine.sunsource.net
>>>>>
>>>>>           
>>>> -- 
>>>> http://www.kyb.tuebingen.mpg.de/~stark
>>>> Max Planck Institute for Biological Cybernetics
>>>>
>>>>         
>
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=39&dsMessageId=88513
>
> To unsubscribe from this discussion, e-mail: [dev-unsubscribe at gridengine.sunsource.net].

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=88521

To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].

    [ Part 2: "Attached Text" ]

Index: source/daemons/qmaster/sge_job_qmaster.c
===================================================================
RCS file: /cvs/gridengine/source/daemons/qmaster/sge_job_qmaster.c,v
retrieving revision 1.201
diff -u -p -r1.201 sge_job_qmaster.c
--- source/daemons/qmaster/sge_job_qmaster.c	16 Jul 2008 12:04:16 -0000	1.201
+++ source/daemons/qmaster/sge_job_qmaster.c	3 Nov 2008 21:22:05 -0000
@@ -749,15 +749,17 @@ int sge_gdi_add_job(sge_gdi_ctx_class_t 
          }   
       }
 
+
+      /* PATCH SLEON we disable it to allow unpriv user pos privileges */
       /*
        * only operators and managers are allowed to submit
        * jobs with higher priority than 0 (=BASE_PRIORITY)
        */
-      if (lGetUlong(jep, JB_priority) > BASE_PRIORITY && !manop_is_operator(ruser)) {
-         ERROR((SGE_EVENT, MSG_JOB_NONADMINPRIO));
-         answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_ERROR);
-         DRETURN(STATUS_EUNKNOWN);
-      }
+//      if (lGetUlong(jep, JB_priority) > BASE_PRIORITY && !manop_is_operator(ruser)) {
+//         ERROR((SGE_EVENT, MSG_JOB_NONADMINPRIO));
+//         answer_list_add(alpp, SGE_EVENT, STATUS_EUNKNOWN, ANSWER_QUALITY_ERROR);
+//         DRETURN(STATUS_EUNKNOWN);
+//      }
 
       /* checks on -hold_jid */
       if (job_verify_predecessors(jep, alpp)) {
@@ -2426,14 +2428,18 @@ int *trigger  
    if ((pos=lGetPosViaElem(jep, JB_priority, SGE_NO_ABORT))>=0) {
       u_long32 old_priority;
       uval=lGetPosUlong(jep, pos);
-      if (uval > (old_priority=lGetUlong(new_job, JB_priority))) { 
-         /* need to be at least operator */
-         if (!manop_is_operator(ruser)) {
-            ERROR((SGE_EVENT, MSG_SGETEXT_MUST_BE_OPR_TO_SS, ruser, MSG_JOB_PRIOINC));
-            answer_list_add(alpp, SGE_EVENT, STATUS_ENOOPR, ANSWER_QUALITY_ERROR);
-            DRETURN(STATUS_ENOOPR);   
-         }
-      }
+
+      /* SLEON PATCH TO ENABLE increase of priority for non ops */
+
+     // if (uval > (old_priority=lGetUlong(new_job, JB_priority))) { 
+     //    /* need to be at least operator */
+     //    if (!manop_is_operator(ruser)) {
+     //       ERROR((SGE_EVENT, MSG_SGETEXT_MUST_BE_OPR_TO_SS, ruser, MSG_JOB_PRIOINC));
+     //       answer_list_add(alpp, SGE_EVENT, STATUS_ENOOPR, ANSWER_QUALITY_ERROR);
+     //       DRETURN(STATUS_ENOOPR);   
+     //    }
+     // }
+
       /* ok, do it */
       if (uval!=old_priority) 
         *trigger |= PRIO_EVENT;



More information about the gridengine-users mailing list