IOError: [Errno 13] Permission denied: '/var/log/ovirt-guest-agent/ovirt-guest-agent.log'

Bug #1609130 reported by David Galloway on 2016-08-02
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ovirt-guest-agent (Ubuntu)
Undecided
Unassigned

Bug Description

/var/log/ovirt-guest-agent/ovirt-guest-agent.log doesn't exist and the ovirtagent user doesn't have permission to create or write it after a fresh install of the ovirt-guest-agent package.

Description: Ubuntu 16.04.1 LTS
Release: 16.04

ovirt-guest-agent:
  Installed: 1.0.11.2.dfsg-1
  Candidate: 1.0.11.2.dfsg-1
  Version table:
 *** 1.0.11.2.dfsg-1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
        100 /var/lib/dpkg/status

3) What you expected to happen
ovirt-guest-agent is able to start after install

4) What happened instead
Service fails to start silently

Steps to reproduce:
1) Install Xenial
2) Install ovirt-guest-agent
3) Attempt to start ovirt-guest-agent service
4) Observe 'systemctl status ovirt-guest-agent' and /var/log/syslog output

David Galloway (djgalloway) wrote :

Aug 2 17:03:36 teuthology-new systemd[1]: Stopped oVirt Guest Agent.
Aug 2 17:03:37 teuthology-new systemd[1]: Starting oVirt Guest Agent...
Aug 2 17:03:37 teuthology-new systemd[1]: Started oVirt Guest Agent.
Aug 2 17:03:37 teuthology-new python[28310]: ERROR:root:Unhandled exception in oVirt guest agent!
Aug 2 17:03:37 teuthology-new python[28310]: Traceback (most recent call last):
Aug 2 17:03:37 teuthology-new python[28310]: File "/usr/share/ovirt-guest-agent/ovirt-guest-agent.py", line 131, in <module>
Aug 2 17:03:37 teuthology-new python[28310]: agent = OVirtAgentDaemon()
Aug 2 17:03:37 teuthology-new python[28310]: File "/usr/share/ovirt-guest-agent/ovirt-guest-agent.py", line 52, in __init__
Aug 2 17:03:37 teuthology-new python[28310]: logging.config.fileConfig(bio)
Aug 2 17:03:37 teuthology-new python[28310]: File "/usr/lib/python2.7/logging/config.py", line 85, in fileConfig
Aug 2 17:03:37 teuthology-new python[28310]: handlers = _install_handlers(cp, formatters)
Aug 2 17:03:37 teuthology-new python[28310]: File "/usr/lib/python2.7/logging/config.py", line 163, in _install_handlers
Aug 2 17:03:37 teuthology-new python[28310]: h = klass(*args)
Aug 2 17:03:37 teuthology-new python[28310]: File "/usr/lib/python2.7/logging/handlers.py", line 117, in __init__
Aug 2 17:03:37 teuthology-new python[28310]: BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
Aug 2 17:03:37 teuthology-new python[28310]: File "/usr/lib/python2.7/logging/handlers.py", line 64, in __init__
Aug 2 17:03:37 teuthology-new python[28310]: logging.FileHandler.__init__(self, filename, mode, encoding, delay)
Aug 2 17:03:37 teuthology-new python[28310]: File "/usr/lib/python2.7/logging/__init__.py", line 913, in __init__
Aug 2 17:03:37 teuthology-new python[28310]: StreamHandler.__init__(self, self._open())
Aug 2 17:03:37 teuthology-new python[28310]: File "/usr/lib/python2.7/logging/__init__.py", line 943, in _open
Aug 2 17:03:37 teuthology-new python[28310]: stream = open(self.baseFilename, self.mode)
Aug 2 17:03:37 teuthology-new python[28310]: IOError: [Errno 13] Permission denied: '/var/log/ovirt-guest-agent/ovirt-guest-agent.log'
Aug 2 17:03:37 teuthology-new systemd[1]: ovirt-guest-agent.service: Main process exited, code=exited, status=1/FAILURE
Aug 2 17:03:37 teuthology-new systemd[1]: ovirt-guest-agent.service: Unit entered failed state.
Aug 2 17:03:37 teuthology-new systemd[1]: ovirt-guest-agent.service: Failed with result 'exit-code'.

Gary Verhulp (gm0neyl0ve) wrote :

This is not happening correctly in the /etc/init.d/ovirt-guest-agent script

chown ovirtagent:ovirtagent /var/log/ovirt-guest-agent

Running that by hand fixes startup issue.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ovirt-guest-agent (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers