Send terminal erase sequence on tripleo deploy

We're seeing some escape sequences being dropped when we run the
deployment via the undercloud. This causes a user to have to run a reset
after the undercloud installation in order to be able to use their shell
command line again.  We can avoid this if we send an terminal erase line
sequence to trim the rest of the line at the end of the deploy.

Change-Id: Ibb74bfebfaab2cd122abe1bc3cd5bbd2562ccfc5
Closes-Bug: #1833302
This commit is contained in:
Alex Schultz
2019-06-18 15:21:46 -06:00
parent 189281993b
commit e1a051d6ac
3 changed files with 29 additions and 10 deletions

View File

@@ -1924,3 +1924,10 @@ def check_file_for_enabled_service(env_file):
def check_deprecated_service_is_enabled(environment_files):
for env_file in environment_files:
check_file_for_enabled_service(env_file)
def send_cmdline_erase_sequence():
# Send's an erase in line sequence to the output
# https://www.vt100.net/docs/vt100-ug/chapter3.html#EL
sys.stdout.write(u'\u001b[0K')
sys.stdout.flush()