I think a good end result would be this:

* Use quotes in the wiki2 syntax to avoid the "#" issue.
* Have the moab folks update their wiki specification to allow quotes,
or at least find out why it doesn't already support quotes.
* Update the slurm docs to replace "Use Moab version 5.0.0 or higher"
with whatever version of moab supports quotes in wiki.

In the meantime, I'm going to try to figure out what version of moab we
need to upgrade to for when we upgrade to slurm newer than April 2012 on
production clusters. It's probably overdue to make a push for upgrading
from 5.3.5 anyway.

-Jon

On 06/06/2012 01:12 PM, Moe Jette wrote:
> 
> My recollection is this change was made to address someone submitting  
> a job in which the working directory contained a "#". When Moab read  
> job state information from SLURM, it interpreted the "#" as a job  
> separator and could not parse anything after that point. Quoting the  
> working directory name fixed the problem. This same problem could  
> happen with several other fields that could contain a "#". Removing  
> this patch will restore this parsing problem.
> 
> Moe
> 
> 
> Quoting Jon Bringhurst <[email protected]>:
> 
>>
>> I'd like to propose backing out a patch, as well as removing quotes from
>> SUBMITHOST in wiki2.
>>
>> <http://bugs.schedmd.com/show_bug.cgi?id=29>
>>
>> <https://github.com/SchedMD/slurm/commit/6cd20848dc3ed5375b637cbf34a6ba6af5fe9653>
>>
>> It's breaking several things when used with moab 5.3.5, including
>> classes and accounts.
>>
>> For example, we're getting this error:
>>
>> "NOTE:  job violates constraints for partition slurm (partition
>> slurm does not support requested class "standard")"
>>
>> note that ""standard"" should be "standard".
>>
>> Here's a patch to back it out as well as remove the quotes from SUBMITHOST:
>>
>> diff --git a/src/plugins/sched/wiki2/get_jobs.c
>> b/src/plugins/sched/wiki2/get_jobs.c
>> index 3b6153e..ec5d75b 100644
>> --- a/src/plugins/sched/wiki2/get_jobs.c
>> +++ b/src/plugins/sched/wiki2/get_jobs.c
>> @@ -326,7 +326,7 @@ static char *       _dump_job(struct job_record
>> *job_ptr, time_t update_time)
>>
>>         if (!IS_JOB_FINISHED(job_ptr) && job_ptr->details &&
>>             job_ptr->details->work_dir) {
>> -               snprintf(tmp, sizeof(tmp), "IWD=\"%s\";",
>> +               snprintf(tmp, sizeof(tmp), "IWD=%s;",
>>                          job_ptr->details->work_dir);
>>                 xstrcat(buf, tmp);
>>         }
>> @@ -335,17 +335,17 @@ static char *     _dump_job(struct job_record
>> *job_ptr, time_t update_time)
>>                 xstrcat(buf, "FLAGS=INTERACTIVE;");
>>
>>         if (job_ptr->gres) {
>> -               snprintf(tmp, sizeof(tmp),"GRES=\"%s\";", job_ptr->gres);
>> +               snprintf(tmp, sizeof(tmp),"GRES=%s;", job_ptr->gres);
>>                 xstrcat(buf, tmp);
>>         }
>>
>>         if (job_ptr->resp_host) {
>> -               snprintf(tmp, sizeof(tmp),"SUBMITHOST=\"%s\";",
>> job_ptr->resp_host);
>> +               snprintf(tmp, sizeof(tmp),"SUBMITHOST=%s;",
>> job_ptr->resp_host);
>>                 xstrcat(buf, tmp);
>>         }
>>
>>         if (job_ptr->wckey) {
>> -               snprintf(tmp, sizeof(tmp),"WCKEY=\"%s\";", job_ptr->wckey);
>> +               snprintf(tmp, sizeof(tmp),"WCKEY=%s;", job_ptr->wckey);
>>                 xstrcat(buf, tmp);
>>         }
>>
>> @@ -373,7 +373,7 @@ static char *       _dump_job(struct job_record
>> *job_ptr, time_t update_time)
>>         else
>>                 pname = "UNKNOWN";      /* should never see this */
>>         snprintf(tmp, sizeof(tmp),
>> -               "QUEUETIME=%u;STARTTIME=%u;RCLASS=\"%s\";",
>> +               "QUEUETIME=%u;STARTTIME=%u;RCLASS=%s;",
>>                 _get_job_submit_time(job_ptr),
>>                 (uint32_t) job_ptr->start_time, pname);
>>         xstrcat(buf, tmp);
>> @@ -407,7 +407,7 @@ static char *       _dump_job(struct job_record
>> *job_ptr, time_t update_time)
>>
>>         if (job_ptr->account) {
>>                 snprintf(tmp, sizeof(tmp),
>> -                       "ACCOUNT=\"%s\";", job_ptr->account);
>> +                       "ACCOUNT=%s;", job_ptr->account);
>>                 xstrcat(buf, tmp);
>>         }
>>
>> -Jon
>>
> 

Reply via email to