IOError: [Errno 13] Permission denied: '/var/log/utah/magners-orchestra-ssh.log'

Bug #1109257 reported by Paul Larson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
UTAH
Won't Fix
Medium
Max Brustkern

Bug Description

Saw this after an upgrade that was just performed. Here's the job log with the details:
https://jenkins.qa.ubuntu.com/view/Raring/view/Power/job/power-raring-desktop-i386-power-test-1/84/console

Specifically:
+ run_test_cobbler.py --name power-test-1 -i /var/lib/jenkins/isos/ubuntu-server/raring-server-i386.iso /var/lib/jenkins/jobs/power-raring-desktop-i386-power-test-1/workspace/qa-power-testing/master.run -p preseed/power.cfg
+ tee log
Traceback (most recent call last):
  File "/usr/bin/run_test_cobbler.py", line 111, in <module>
    run_test_cobbler()
  File "/usr/bin/run_test_cobbler.py", line 65, in run_test_cobbler
    configure_logging(args.debug)
  File "/usr/lib/python2.7/dist-packages/utah/run.py", line 278, in configure_logging
    ssh_file_handler = logging.handlers.WatchedFileHandler(config.ssh_logfile)
  File "/usr/lib/python2.7/logging/handlers.py", line 386, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/__init__.py", line 897, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 916, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/var/log/utah/magners-orchestra-ssh.log'

Related branches

Revision history for this message
Max Brustkern (nuclearbob) wrote :

I think it would be nice if permissions errors on any logfiles could be caught and logged to the console as warning or error without disrupting the process, but maybe we should be stopping on those errors. I'm not sure what the better default behavior is.

Also, right now in the new ssh log, I don't see an obvious way to differentiate which process or system is sending the log messages. We may want to add the pid or the machine name or something. We may also want this for other logging types.

Changed in utah:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Javier Collado (javier.collado) wrote :

I think this is more a configuration issue than a UTAH problem. The script to
generate smoke testing jobs (see linked branch) creates a configuration file
for each job to make sure all log files are written to the workspace. This way,
there's no reuse of log files and there are no collisions depending on which
user run the UTAH script the last time.

Anyway, I'm in favor of adding to the logs the permissions of the file for
which the problem has been found to provide a more complete information.

Revision history for this message
Javier Collado (javier.collado) wrote :

The update in the jenkins jobs (see related branch) to write logs directly to
the workspace instead of to a location shared by all jobs fixed this problem.
Hence, I'm setting this as "Won't Fix" since is no longer an issue. I can be
re-opened later if it's a problem in some other environment though.

Changed in utah:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.