← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1108820] Re: ^M characters appearing in console output

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => grizzly-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1108820

Title:
  ^M characters appearing in console output

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  When retreiving the console output through the os-console-output API
  in ^M characters appear in the output. Sometimes ^M characters appear
  without a corresponding linefeed character.  As a side-effect this
  causes  the tempest test test_get_console_output to sometimes fail.
  This occurs when the tests run slowly compared to a booting instance
  and the console output looks like this (the tempest test has requested
  10 lines of console output):

  ================START====================
   WARN: /etc/rc3.d/S99-cloud-userdata failed^M
    ____               ____  ____^M
   / __/ __ ____ ____ / __ \/ __/^M
  / /__ / // __// __// /_/ /\ \ ^M
  \___//_//_/  /_/   \____/___/ ^M
   http://launchpad.net/cirros^M
  ^M
  ^M^M
  login as 'cirros' user. default password: 'cubswin:)'. use 'sudo' for root.^M
  cirros login: 
  ==================END================

  During conversion from XML the lxml/etree module ends up coverting
  ^M/LF characters to LF but also ^M characters by themselves are also
  converted to LF. This ends up with effectively 12 lines of output and
  so the test fails as it is only expecting 10 lines. The test passes if
  the instance is slow to boot as the excerpts from earlier in the boot
  process do not contain consecutive ^M characters.

  Whilst this is fixable on the tempest side test I'm wondering if this
  is the behaviour that we expect from Nova. Firstly it is a a bit of a
  surprise that we are generating ^M characters on linux booting a linux
  instance. Does anyone know where these are coming?

  The console-output extension currently filters out a few characters
  before passing back the console output:

          # XML output is not correctly escaped, so remove invalid characters
          remove_re = re.compile('[\x00-\x08\x0B-\x0C\x0E-\x1F]')

  Should ^M characters be added to this list - will this adversely
  affect anyone?

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