CDR Tickets

Issue Number 3316
Summary [Internal] Fix PublishingService.py
Created 2011-03-09 17:56:17
Issue Type Improvement
Submitted By Englisch, Volker (NIH/NCI) [C]
Assigned To Englisch, Volker (NIH/NCI) [C]
Status Closed
Resolved 2011-05-06 10:52:11
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.107644
Description

BZISSUE::5009
BZDATETIME::2011-03-09 17:56:17
BZCREATOR::Volker Englisch
BZASSIGNEE::Volker Englisch
BZQACONTACT::Alan Meyer

During the re-installation of MAHLER we've tried to identify a problem with publishing. The publishing service was supposed to pick up a submitted job for publishing but the job never got picked up.
It turned out that one of the first things the publishing job is doing is to write to a log file to indicate that the job is starting but the job didn't have permissions to write to the file.

We want to make a change to submit an error message by mail in case the publishing service is unable to write to the log files.

Comment entered 2011-04-21 11:47:47 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-04-21 11:47:47
BZCOMMENTOR::Volker Englisch
BZCOMMENT::1

I've modified the program PublishingService.py This program starts - as one might guess - the CDR publishing service and writes a status line in the log file publish.log using a cdr module called 'logwrite'. This module, however, does not report an error if the logfile cannot be written to.
I am now using another module written by Alan to write the logfile which does report an error in this situation.
The program will now submit an email to the 'Developers Notification' group if the publishing service is being started but the logfile isn't writable.

Comment entered 2011-04-21 16:30:59 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-04-21 16:30:59
BZCOMMENTOR::Volker Englisch
BZCOMMENT::2

I modified the Bug Summary to indicate which program had been modified.

The program is now submitting an email message to the users specified in the group
Developers Notification
The email with the following text will be submitted if the log file isn't writable:
Publishing Error Notification
The CDR publishing software is unable to open the log file.
Please check permissions for d:\cdr\log\publish.log

Error Message:
[Errno 13] Permission denied: 'd:/cdr/Log/publish.log'

The program has been copied to MAHLER and FRANCK:
PublishingService.py - R 10070

I will leave this on MAHLER and FRANCK for a little bit to ensure I didn't break anything before copying the changes to BACH.

Comment entered 2011-05-05 17:04:07 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-05-05 17:04:07
BZCOMMENTOR::Volker Englisch
BZCOMMENT::3

(In reply to comment #2)
> I will leave this on MAHLER and FRANCK for a little bit to ensure I didn't
> break anything before copying the changes to BACH.

FRANCK had been rebooted today and triggered the email to be submitted because the publish.log file was read-only at the time the publishing service had been started. That was a good test.

I've copied the changes to BACH and will close the issue tomorrow if the nightly publishing job finishes successfully.

Comment entered 2011-05-06 10:52:11 by Englisch, Volker (NIH/NCI) [C]

BZDATETIME::2011-05-06 10:52:11
BZCOMMENTOR::Volker Englisch
BZCOMMENT::4

The publishing job on BACH finished successfully.

Closing issue.

Elapsed: 0:00:00.001292