XenAPI needs to support server log

Registered by John Garbutt on 2013-05-02

xenapi-server-log can be implemented by using the logging that is part of xenserver:
https://github.com/jamesbulpin/xcp-xen-4.1.pq/blob/master/log-guest-consoles.patch

The above logs also need to be rotated.

Blueprint information

Status:
Complete
Approver:
Russell Bryant
Priority:
Medium
Drafter:
John Garbutt
Direction:
Approved
Assignee:
John Garbutt
Definition:
Approved
Series goal:
Accepted for havana
Implementation:
Implemented
Milestone target:
milestone icon 2013.2
Started by
John Garbutt on 2013-05-23
Completed by
John Garbutt on 2013-06-27

Related branches

Sprints

Whiteboard

You can activate console logging by:
xenstore-write /local/logconsole/@ "/tmp/console.%d
It appears not to affect vnc consoles

It is using this patch:
https://github.com/jamesbulpin/xcp-xen-4.1.pq/blob/master/log-guest-consoles.patch

However, the log file needs managing, because it will just grow for ever.

It has been attempted here:
https://review.openstack.org/#/c/17959/

We could look at mounting a loopback file to limit the log size, on top of using logrotate.

Gerrit topic: https://review.openstack.org/#q,topic:bp/xenapi-server-log,n,z

Addressed by: https://review.openstack.org/30301
    xenapi: implement get_console_output for XCP/XenServer

Addressed by: https://review.openstack.org/32928
    xenapi: script to rotate the guest logs

(?)

Work Items

Work items:
read logs from hypervisor: DONE
add script to configure logrotate (etc..) to ensure dom0 disk not filled up my malicious user: DONE

This blueprint contains Public information 
Everyone can see this information.