Bug 765922

Summary: [Beaker] Serial consoles no longer work as expected when provisioning Fedora 16
Product: [Retired] Beaker Reporter: Jeff Burke <jburke>
Component: schedulerAssignee: Bill Peck <bpeck>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 0.7CC: bpeck, dcallagh, dkovalsk, jstancek, jtluka, mcsontos, philipp, rmancy, stl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-08 17:28:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 593663    

Description Jeff Burke 2011-12-09 17:21:55 UTC
Description of problem:
 When provisioning Fedora 16 systems in Beaker the serial console no longer
works as expected. 

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

How reproducible:
always

Steps to Reproduce:
1. Provision a system with Beaker attach to console
  
Actual results:
No data to serial console.

Additional info:
I believe this is because of fundamental OS changes with grub2 and systemd.
Beaker needs to be update to work with/pass in command to enable consoles.

I have set this BZ to high because Fedora 16 is the initial test platform for the RHEL7 alpha kernel.

Comment 1 Bill Peck 2011-12-09 17:47:42 UTC
Hi Jeff,

Did you check with the anaconda group about this?  Were passing console=ttyS0 on the install line.  In the past anaconda has passed this along.

I also just checked that grubby still does the right thing, so worst case if anaconda is changing its behaviour (yet again) then you can add console=ttyS0,115200 to kernel options post.

Comment 2 Jan Stancek 2011-12-09 18:28:21 UTC
I wonder if this has something to do with it.
At the bottom of install.log:
grubby fatal error: unable to find a suitable template
grubby: doing this would leave no kernel entries. Not writing out new config.

Comment 3 Bill Peck 2011-12-09 18:58:09 UTC
I wonder what is causing that since when I run it manually on my Fedora-16 box it seems to work fine..

/sbin/grubby --update-kernel=`/sbin/grubby --default-kernel` --args="console=ttyS0,115200"

Comment 4 Jan Stancek 2011-12-09 19:16:28 UTC
Grepping through anaconda sources brought me to:
serial - Turns on serial console support.

I'm trying another job with "serial" in ks_meta.

Comment 5 Jeff Burke 2011-12-09 19:40:03 UTC
Bill,
 I did not talk to the Anaconda folks. I did run a test in Beaker. I added the console options to the Kernel Options (Post). Once I did that, I did see the kernel boot message on the serial console. But I was unable to get a login prompt on the serial console.

 I was able to get a login prompt on the serial console after I manually added ttyS0 to /etc/securetty then did a systemctl status serial-getty
But I was unable to successfully log into the console.

 I never saw any sort of grub menu on the serial console. I am not sure if that is because of the grubport option needs something additional as Jan suggested.

 I was able to get the grub menu on the serial console when I manually added 

GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"

to /etc/default/grub 
then I ran grub2-mkconfig -o /boot/grub2/grub.cfg

Comment 6 Jan Stancek 2011-12-09 19:45:45 UTC
(In reply to comment #4)
> Grepping through anaconda sources brought me to:
> serial - Turns on serial console support.
> 
> I'm trying another job with "serial" in ks_meta.

kernel_options is what I wanted. After putting "serial" in there, serial console worked and anaconda generated console-related stuff to grub config:

# cat /etc/default/grub 
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Fedora"
GRUB_DEFAULT=saved
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=9600"
GRUB_CMDLINE_LINUX="rd.lvm.lv=vg_amddinar03/lv_swap rd.md=0 rd.lvm.lv=vg_amddinar03/lv_root rd.luks=0 console=ttyS0,115200n81 LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16  KEYTABLE=us rd.dm=0"

I tried also connecting to conserver, that worked to.

Comment 7 Bill Peck 2011-12-09 20:00:05 UTC
So they changed from console to serial?  I imagine we will still have problems with grubport since we were doing that.

Comment 8 Jan Stancek 2011-12-09 20:22:18 UTC
I tried another host, console works since moment kernel boots. I couldn't see grub menu. GRUB_SERIAL_COMMAND in comment 6 looks wrong.

This is from anaconda-16.25-1.fc16 sources:
--------------------------------------------------------------------
    def serial_command(self):
        command = ""
        if self.console and self.console.startswith("ttyS"):
            unit = self.console[-1]
            speed = "9600"
            for opt in self.console_options.split(","):
                if opt.isdigit():
                    speed = opt
                    break

            command = "serial --unit=%s --speed=%s" % (unit, speed)

        return command
--------------------------------------------------------------------

"115200n81" is not a digit.

Comment 9 Jan Stancek 2011-12-14 19:31:46 UTC
I filed bug regarding GRUB_SERIAL_COMMAND for anaconda on Fedora16: Bug 767745

Comment 10 Bill Peck 2012-05-08 17:28:48 UTC
closing since this is now an anaconda issue + eng-ops issue (adding "serial" to kernerl_options).