[Bug 1061977] Re: Machine fails to commission when console=ttyS0 is present on kernel opts

Scott Moser smoser at ubuntu.com
Fri Oct 5 14:37:23 UTC 2012


It seems that what we need to do is make this configurable (bug 1044503)
and then possibly default to no 'console=' parameters.

** Description changed:

- http://paste.ubuntu.com/1261109/ shows the /var/lib/cloud/instance/userdata.txt
- http://pastebin.ubuntu.com/1261098/ shows /var/log/cloud-init.log
- http://paste.ubuntu.com/1261129/ shows the output when running "cloud-init --debug modules --mode=final" manually.  In this case it finishes and successfully commissions.
+ Maas is pxe booting systems.  The first time a system is booted, maas knows nothing about it, so we need some default kernel parameters.  The primary target for these systems is datacenter, where there is at least some likelyhood that /dev/ttyS0 is logged (or could be logged).  On boot of the system, we want to see log messages.  So, we were passing to the kernel cmdline:
+    console=tty1 console=ttyS0
+ The hope was that kernel messages would go both places, and /dev/console (which is opened by upstart) would go to ttyS0 if it was present and /dev/tty1 otherwise.  It seems that the kernel is not at all smart about how it does this, though.  On a system without a serial device, /dev/console gets hooked up, but writes to it fail with "Input/output error".
+   Cloud-init uses 'console output' in upstart as it wants data to be viewable on the console.  This causes an error, though, as writes to /dev/console fail in this case.
+ 
+ Additional information:
+  * upstart closes all file descriptors (stdin/stdout/stderr) and re-opens them, explicitly setting /dev/console as its stdin, stdout, stderr.  So, even an attempt to redirect /sbin/init output elsewhere (such as to /dev/tty0 if /dev/ttyS0 did not exist) from the initramfs would be unsuccessful.
+  * kexec'ing with different parameters from inside the initramfs (removing the bad console=) really isn't an option, as the kernel/initrmafs is pxebooted, and we dont even have simple access to those.
+ 
+ Relative links:
+  * kernel serial console doc: http://www.kernel.org/doc/Documentation/serial-console.txt 
+  * thread about re-assigning /dev/console: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg246433.html
+ 
+ Other info from system:
+  http://paste.ubuntu.com/1261109/ shows the /var/lib/cloud/instance/userdata.txt
+  http://pastebin.ubuntu.com/1261098/ shows /var/log/cloud-init.log
+  http://paste.ubuntu.com/1261129/ shows the output when running "cloud-init --debug modules --mode=final" manually.  In this case it finishes and successfully commissions.
  
  Running:
  sudo start cloud-final
  shows:
  start: Job failed to start
  
  Also:
  $ runlevel
  N 2
  $ sudo status rc
  rc stop/waiting

** No longer affects: cloud-init (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1061977

Title:
  Machine fails to commission when console=ttyS0 is present on kernel
  opts

To manage notifications about this bug go to:
https://bugs.launchpad.net/maas/+bug/1061977/+subscriptions



More information about the Ubuntu-server-bugs mailing list