[pod, feature, b1] Enable console logging to disk by default on KVM Pod VM's.

Bug #1713556 reported by Jason Hobbs on 2017-08-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Low
Newell Jensen

Bug Description

Sometimes console output is required to debug issues (see bug 1707999). MAAS should configure VMs it creates to log console output to disk, otherwise console output is ephemeral and can't be collected for debug.

Related branches

Andres Rodriguez (andreserl) wrote :

Marking this as duplicate of #1688066 (although it is probably invalid).

MAAS creates VM's with console logging, but you need to add console=ttyS0 to the kernel command line. What you are looking for is probably spice, wich is why I duplicated this bug.

Andres Rodriguez (andreserl) wrote :

FWiW, MAAS defines the console on the libvirt domain. Activation is specified in [1].

[1]http://wiki.libvirt.org/page/Unable_to_connect_to_console_of_a_running_domain

Andres Rodriguez (andreserl) wrote :

Marking this bug as invalid. 2.3 enables KVM output and for console, you need to follow the instructions above.

Changed in maas:
status: New → Invalid
Jason Hobbs (jason-hobbs) wrote :

It's not a duplicate. I'm not after a spice connection, which does not help always.

For instance, I had a pod created VM fail to commission this morning. I connected to it with spice, and it shows the Ubuntu login, but I can't see any console log history, just the login prompt, so I don't have any way to debug why it didn't commission successfully.

Adding kernel command line parameters is also not sufficient, because MAAS automatically commissions pods whenever they're created - there is no way for me to add kernel command line parameters prior to that.

MAAS needs to handle enabling console logging to a file automatically every time a pod is created.

Changed in maas:
status: Invalid → New
Jason Hobbs (jason-hobbs) wrote :

For some more perspective, OpenStack created VMs do this every time - they always have console logging to file enabled. You don't have to do anything extra to get it because it's always a good idea.

Andres Rodriguez (andreserl) wrote :

Again, as per comment #2, if you want console you need to enable it by passing a kernel parameter as described in [1]. MAAS already adds the 'pty' configuration when the VM is created.

[1]: http://wiki.libvirt.org/page/Unable_to_connect_to_console_of_a_running_domain

Changed in maas:
status: New → Incomplete
tags: added: pod pods
tags: removed: pods
summary: - pods: MAAS created VMs don't log console output
+ [FeatureRequest] Log console by default on MAAS created VMs
Changed in maas:
milestone: none → 2.4.x
importance: Undecided → Low
importance: Low → Undecided
summary: - [FeatureRequest] Log console by default on MAAS created VMs
+ [FeatureRequest] Enable console by default on KVM Pod VM's.
summary: - [FeatureRequest] Enable console by default on KVM Pod VM's.
+ [FeatureRequest] Enable console logging to disk by default on KVM Pod
+ VM's.
Jason Hobbs (jason-hobbs) wrote :

Why is this marked incomplete? It sounds like you agree it's a valid request. I don't want to use global kernel command line parameters because that changes behavior on all of my systems.

Changed in maas:
status: Incomplete → New
Changed in maas:
importance: Undecided → Low
status: New → Triaged
milestone: 2.4.x → 2.4.0alpha1
Jason Hobbs (jason-hobbs) wrote :

Andres says we may be able to modify the template used to create pod vms to make it do this.

Jason Hobbs (jason-hobbs) wrote :

To be clear, the VM template definitely needs to be modified to log to a disk, and the kernel command line parameter also needs to be added. There is no way to modify the VM template via the API right now. The kernel command line parameter could be set globally, but that's not idea as it affects all systems, not just VMs.

Changed in maas:
milestone: 2.4.0alpha1 → 2.4.0alpha2
Changed in maas:
milestone: 2.4.0alpha2 → 2.4.x
Changed in maas:
assignee: nobody → Newell Jensen (newell-jensen)
summary: - [FeatureRequest] Enable console logging to disk by default on KVM Pod
- VM's.
+ [pod, FeatureRequest] Enable console logging to disk by default on KVM
+ Pod VM's.
Changed in maas:
milestone: 2.4.x → 2.4.0beta1
summary: - [pod, FeatureRequest] Enable console logging to disk by default on KVM
- Pod VM's.
+ [pod, feature, b1] Enable console logging to disk by default on KVM Pod
+ VM's.
Changed in maas:
milestone: 2.4.0beta1 → 2.4.0beta2
Changed in maas:
milestone: 2.4.0beta2 → 2.4.0beta3
Changed in maas:
status: Triaged → In Progress
status: In Progress → Triaged
Newell Jensen (newell-jensen) wrote :

Jason,

Currently MAAS logs to libvirt host for each VM and these logs can be found at:

/var/log/libvirt/qemu/{machine-name}.log

Are these logs not sufficient for you?

Newell Jensen (newell-jensen) wrote :

Jason,

Disregard the above question as this is not the console output. Working on a solution for you.

Thanks,

Newell

Changed in maas:
status: Triaged → In Progress
Changed in maas:
status: In Progress → Triaged
Changed in maas:
milestone: 2.4.0beta3 → 2.4.0beta4
Changed in maas:
milestone: 2.4.0beta4 → 2.4.x
Changed in maas:
status: Triaged → In Progress
Changed in maas:
milestone: 2.4.x → 2.5.0beta2
tags: added: sprint track
Changed in maas:
status: In Progress → Triaged
Changed in maas:
milestone: 2.5.0beta2 → 2.5.0rc1
Changed in maas:
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 2.5.0rc1 → 2.5.0beta4
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers