Merge lp:~smoser/maas/drop-ttyS0-kernel-opt into lp:~maas-committers/maas/trunk

Proposed by Scott Moser
Status: Merged
Approved by: Scott Moser
Approved revision: no longer in the source branch.
Merged at revision: 1241
Proposed branch: lp:~smoser/maas/drop-ttyS0-kernel-opt
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 27 lines (+3/-3)
2 files modified
src/provisioningserver/kernel_opts.py (+2/-2)
src/provisioningserver/tests/test_kernel_opts.py (+1/-1)
To merge this branch: bzr merge lp:~smoser/maas/drop-ttyS0-kernel-opt
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+128747@code.launchpad.net

Commit message

on intel, do not send 'console=ttyS0' (or console=tty1)

as described in LP: #1061977, passing console=ttyS0 to a system that does not
have serial hardware can result in writes to /dev/console failing. During
enlistment and commissioning, that can also cause those stages to fail as
the enlistment/commissioning process tries to write to stdout, which is attached
to /dev/console by upstart.

This change gives evidence to the requirement for LP: #1044503, as the
only way a user can now add 'console=ttyS0' is by editing files in
/usr/share/pyshared/provisioningserver/pxe which will be overwritten on
package upgrade.

Description of the change

on intel, do not send 'console=ttyS0' (or console=tty1)

as described in LP: #1061977, passing console=ttyS0 to a system that does not
have serial hardware can result in writes to /dev/console failing. During
enlistment and commissioning, that can also cause those stages to fail as
the enlistment/commissioning process tries to write to stdout, which is attached
to /dev/console by upstart.

This change gives evidence to the requirement for LP: #1044503, as the
only way a user can now add 'console=ttyS0' is by editing files in
/usr/share/pyshared/provisioningserver/pxe which will be overwritten on
package upgrade.

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

looks good to me

Revision history for this message
Andres Rodriguez (andreserl) :
review: Approve
Revision history for this message
Dave Walker (davewalker) wrote :

What about situations that DO have a serial console (specifically IPMI
linked ones, are of most interest.)

Revision history for this message
Scott Moser (smoser) wrote :

The templates for pxe boot or the python code itself will have to be modified by the end user.

Revision history for this message
MAAS Lander (maas-lander) wrote :

No commit message specified.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/provisioningserver/kernel_opts.py'
2--- src/provisioningserver/kernel_opts.py 2012-10-02 18:50:59 +0000
3+++ src/provisioningserver/kernel_opts.py 2012-10-09 15:47:19 +0000
4@@ -158,8 +158,8 @@
5 if (params.arch, params.subarch) == ("armhf", "highbank"):
6 return ["console=ttyAMA0"]
7 else:
8- # On Intel send kernel output to both console and ttyS0.
9- return ["console=tty1", "console=ttyS0"]
10+ # On Intel there are no working sane console= defaults (LP: #1061977)
11+ return []
12
13
14 def compose_kernel_command_line(params):
15
16=== modified file 'src/provisioningserver/tests/test_kernel_opts.py'
17--- src/provisioningserver/tests/test_kernel_opts.py 2012-10-02 18:50:59 +0000
18+++ src/provisioningserver/tests/test_kernel_opts.py 2012-10-09 15:47:19 +0000
19@@ -138,7 +138,7 @@
20 # and install command lines.
21 get_ephemeral_name = self.patch(kernel_opts, "get_ephemeral_name")
22 get_ephemeral_name.return_value = "RELEASE-ARCH"
23- expected = ["console=tty1", "console=ttyS0", "nomodeset"]
24+ expected = ["nomodeset"]
25
26 params = make_kernel_parameters(
27 purpose="commissioning", arch="i386")