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
=== modified file 'src/provisioningserver/kernel_opts.py'
--- src/provisioningserver/kernel_opts.py 2012-10-02 18:50:59 +0000
+++ src/provisioningserver/kernel_opts.py 2012-10-09 15:47:19 +0000
@@ -158,8 +158,8 @@
158 if (params.arch, params.subarch) == ("armhf", "highbank"):158 if (params.arch, params.subarch) == ("armhf", "highbank"):
159 return ["console=ttyAMA0"]159 return ["console=ttyAMA0"]
160 else:160 else:
161 # On Intel send kernel output to both console and ttyS0.161 # On Intel there are no working sane console= defaults (LP: #1061977)
162 return ["console=tty1", "console=ttyS0"]162 return []
163163
164164
165def compose_kernel_command_line(params):165def compose_kernel_command_line(params):
166166
=== modified file 'src/provisioningserver/tests/test_kernel_opts.py'
--- src/provisioningserver/tests/test_kernel_opts.py 2012-10-02 18:50:59 +0000
+++ src/provisioningserver/tests/test_kernel_opts.py 2012-10-09 15:47:19 +0000
@@ -138,7 +138,7 @@
138 # and install command lines.138 # and install command lines.
139 get_ephemeral_name = self.patch(kernel_opts, "get_ephemeral_name")139 get_ephemeral_name = self.patch(kernel_opts, "get_ephemeral_name")
140 get_ephemeral_name.return_value = "RELEASE-ARCH"140 get_ephemeral_name.return_value = "RELEASE-ARCH"
141 expected = ["console=tty1", "console=ttyS0", "nomodeset"]141 expected = ["nomodeset"]
142142
143 params = make_kernel_parameters(143 params = make_kernel_parameters(
144 purpose="commissioning", arch="i386")144 purpose="commissioning", arch="i386")