Bug 950903 - console logs not available for recipes running on dynamic VMs
Summary: console logs not available for recipes running on dynamic VMs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: scheduler
Version: 0.11
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 0.18
Assignee: matt jia
QA Contact: tools-bugs
URL:
Whiteboard: Cloud
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-11 07:38 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-09-10 07:02:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2013-04-11 07:38:13 UTC
Description of problem:
Serial console logs are not available for recipes running on oVirt/RHEV dynamic VMs.

Version-Release number of selected component (if applicable):
0.12.0

How reproducible:
always

Steps to Reproduce:
1. Schedule a recipe which is virtualisable
2. Watch it run
3. No console.log
  
Additional info:
The console log is necessary to diagnose many kinds of problems, including errors reported by Anaconda, problems with the boot images, a misconfigured VM, failures in the harness, network problems communicating with Beaker...

Comment 1 Dan Callaghan 2013-04-16 05:53:30 UTC
Part of this bug fix should be to fix beaker-watchdog not to look for /var/consoles/None while the VM is installing.

Comment 3 Dan Callaghan 2014-05-16 05:09:35 UTC
This will be an issue when we port to OpenStack as well.

Comment 4 Dan Callaghan 2014-06-23 00:55:57 UTC
OpenStack has an API for fetching the serial console log for an instance (it returns the entire thing). So the first draft of this feature:

* Make instances use the serial console (probably just need to add console=ttyS0 to kernel options for all OpenStack instances)

* Make beaker-watchdog aware of the instance ID for OpenStack instances, and some usable credentials to authenticate to OpenStack

* Instead of reading the console from /var/consoles beaker-watchdog should use the OpenStack API to fetch the entire console log, and run it through the usual processing (wipe control characters, check for panics and install failures, store a copy locally)

Bonus points for:

* Patching OpenStack to support fetching a range of bytes from the log, instead of the whole thing, so that we can more efficiently poll it

* Make it possible to log in to the console even when console=ttyS0 is passed (currently that will make the system use the serial console for /dev/console but OpenStack does not expose a writable serial console which leaves no way to log in)

Comment 5 matt jia 2014-07-07 02:03:37 UTC
I have opened a bug for OpenStack to support fetching a selecting range of console logs.

https://bugs.launchpad.net/nova/+bug/1337695

Cheers,Matt Jia

Comment 6 matt jia 2014-07-09 23:33:51 UTC
On gerrit

http://gerrit.beaker-project.org/#/c/3181/

Cheers, Matt Jia

Comment 7 matt jia 2014-07-13 23:51:36 UTC
OpenStack has a size limit for getting console logs.I have field a bug to increase this which should be big enough for us to get the whole thing.

https://bugs.launchpad.net/nova/+bug/1341363

In the future, we can switch to the interactive web-based serial consoles which they are currently working on.

https://review.openstack.org/#/c/86418/7/specs/juno/serial-ports.rst

Cheers,Matt Jia

Comment 8 matt jia 2014-07-22 06:34:51 UTC
I found a new issue when I upgraded the above fix to beaker-devel.Move back to ASSGINED To get this fix done.

Comment 9 matt jia 2014-07-22 06:48:51 UTC
On Gerrit:

http://gerrit.beaker-project.org/#/c/3215/

Cheers, Matt Jia

Comment 12 Dan Callaghan 2014-09-10 07:02:26 UTC
This was actually in Beaker 0.18.0.


Note You need to log in before you can comment on or make changes to this bug.