Bug 1278084 - kernel logs (/dev/console) are not routed to /dev/ttyS0
Summary: kernel logs (/dev/console) are not routed to /dev/ttyS0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: GA
: 5.6.0
Assignee: Joe Vlcek
QA Contact: Jeff Teehan
URL:
Whiteboard: openstack:security
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-04 16:46 UTC by Jaroslav Henner
Modified: 2016-10-03 16:18 UTC (History)
5 users (show)

Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-29 15:02:26 UTC
Category: ---
Cloudforms Team: Unknown
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1065007 0 high CLOSED /dev/console doesn't ouput to ttyS0 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1075125 0 high CLOSED /dev/console doesn't ouput to ttyS0 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Internal Links: 1065007 1075125

Description Jaroslav Henner 2015-11-04 16:46:52 UTC
Description of problem:

The kernel logs and logs from other facilities are routed to /dev/console (like echo "Hello world" > /dev/console), including the cloud-init. 

OpenStack is buffering the outputs to /dev/ttyS0 and can display the log for purpose of debugging for example, but the appliance is not configured so that the /dev/console writes are writing to /dev/ttyS0, but only to /dev/tty0 (terminal).

Please set the kernel commandline so that the logs will go to the /dev/ttyS0.


Version-Release number of selected component (if applicable):
ManageIQ-devel-201510300944-3f219bbd63


How reproducible:
always


Steps to Reproduce:
1. boot the instance. In case of OpenStack boot:
nova boot --image ManageIQ-devel-201510300944-3f219bbd63 --flavor m1.medium --key-name jhenner test --user-data test_data --nic net-id=bbc9a15a-4cc3-4310-b37c-6d439d9ef995 

2. ssh to the appliance, execute "date > /dev/console"
3. nova console-log test

Actual results:
no output

Expected results:
kernel boot process and other logs
+ actual date

Additional info:

Comment 2 Jaroslav Henner 2015-11-04 16:58:49 UTC
Fix is to add this to the kernel cmdline

console=tty0 console=ttyS0,115200n8

Comment 3 Jaroslav Henner 2015-11-09 20:08:20 UTC
The above is not actually a complete fix. The init process is not writing to /dev/console for some reason. I have no idea why. I am systemd noob.

Comment 4 Jaroslav Henner 2015-11-19 16:31:27 UTC
The other actions I did in order to display more info was to remove some configs like 

/etc/cloud/cloud.cfg.d/05_logging.cfg
/etc/cloud/cloud.cfg.d/10_miq_logging.cfg

and remove the rhgb and quiet from the kernel cmdline.

Comment 5 Joe Vlcek 2016-02-23 20:00:40 UTC
This bug was originally reported here:
  https://bugzilla.redhat.com/show_bug.cgi?id=1104230

but was blocked by:
  https://bugzilla.redhat.com/show_bug.cgi?id=1139262

Now that the blocking BZ, 1139262, has been resolved this
BZ can be resolved by adding the following the the base-rhos.ks:

-bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet"
+bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet console=tty0 console=ttyS0,115200n8"

Comment 7 CFME Bot 2016-03-01 19:20:20 UTC
New commit detected on ManageIQ/manageiq-appliance-build/master:
https://github.com/ManageIQ/manageiq-appliance-build/commit/60416340f27e3c8f34276ad8eb6ec106c3bd9cb8

commit 60416340f27e3c8f34276ad8eb6ec106c3bd9cb8
Author:     Joe VLcek <jvlcek>
AuthorDate: Mon Feb 29 16:37:16 2016 -0500
Commit:     Joe VLcek <jvlcek>
CommitDate: Mon Feb 29 16:37:16 2016 -0500

     Direct /dev/console to /dev/ttyS0 for openstack
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1278084

 kickstarts/base.ks.erb                     | 3 +--
 kickstarts/partials/main/bootloader.ks.erb | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)
 create mode 100644 kickstarts/partials/main/bootloader.ks.erb

Comment 8 CFME Bot 2016-03-01 22:50:14 UTC
New commit detected on cfme_productization/master:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=cd35c43ddf2ccd6588f94c99b6e3116d2d771d3f

commit cd35c43ddf2ccd6588f94c99b6e3116d2d771d3f
Merge: 09504cb 2bc09e2
Author:     Jason Frey <jfrey>
AuthorDate: Tue Mar 1 17:34:18 2016 -0500
Commit:     Jason Frey <jfrey>
CommitDate: Tue Mar 1 17:34:18 2016 -0500

    Merge branch 'bz_1278084' into 'master'
    
    Direct /dev/console to /dev/ttyS0 for openstack
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1278084
    
    https://github.com/ManageIQ/manageiq-appliance-build/pull/100
    
    See merge request !193

 manageiq-appliance-build/productization/kickstarts/base.ks.erb         | 3 +--
 .../productization/kickstarts/partials/main/bootloader.ks.erb          | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

Comment 9 CFME Bot 2016-03-01 22:50:18 UTC
New commit detected on cfme_productization/master:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme_productization.git;a=commit;h=2bc09e2a1791d214c1a7d6ab5f2dc2ba58d9407b

commit 2bc09e2a1791d214c1a7d6ab5f2dc2ba58d9407b
Author:     Joe VLcek <jvlcek>
AuthorDate: Tue Mar 1 17:04:04 2016 -0500
Commit:     Joe VLcek <jvlcek>
CommitDate: Tue Mar 1 17:12:30 2016 -0500

    Direct /dev/console to /dev/ttyS0 for openstack
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1278084
    
    https://github.com/ManageIQ/manageiq-appliance-build/pull/100

 manageiq-appliance-build/productization/kickstarts/base.ks.erb         | 3 +--
 .../productization/kickstarts/partials/main/bootloader.ks.erb          | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)
 create mode 100644 manageiq-appliance-build/productization/kickstarts/partials/main/bootloader.ks.erb

Comment 10 Jeff Teehan 2016-04-28 18:20:40 UTC
Verified with 5604 on 10.16.6.70

Comment 12 errata-xmlrpc 2016-06-29 15:02:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1348


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