^M characters appearing in console output
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Chuck Short |
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_
=======
WARN: /etc/rc3.
____ ____ ____^M
/ __/ __ ____ ____ / __ \/ __/^M
/ /__ / // __// __// /_/ /\ \ ^M
\___//_//_/ /_/ \____/___/ ^M
http://
^M
^M^M
login as 'cirros' user. default password: 'cubswin:)'. use 'sudo' for root.^M
cirros login:
=======
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(
Should ^M characters be added to this list - will this adversely affect anyone?
Changed in nova: | |
milestone: | none → grizzly-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | grizzly-3 → 2013.1 |
I can see ^M characters in the actual file output from kvm/virsh/libvirt layers
dims@dims- desktop: ~$ find /opt -name console.log data/nova/ instances/ instance- 00000003/ console. log data/nova/ instances/ instance- 00000002/ console. log
/opt/stack/
/opt/stack/