Updated openstack/openstack
Project: openstack/trove  5f98abb9df7527754ec8736108711e4b7f44a323

Handle error from execute() when deleting non-existant file

Code inspection around an exception found a piece of code handling an
error from execute_with_timeout() in a problematic way. A call was
made to delete a file and if the file did not exist,
execute_with_timeout() would throw an exception. However, 'rm' is not
very friendly, and only returns 0, -1, +1 and not errno
(ENOENT). Therefore the code was (literally) looking in stdout for the
string 'No such file or directory'.

The recommended way of handling missing files with rm is to use the
command line '-f' option which will suppress errors on nonexistent
files. The mechanism of searching for a literal string is not good for
a couple of reasons but the most significant two are that it requires
a thrown exception (which would get logged as an exception), and that
in languages other than English, the error string would be something
else (not 'No such file ...').

A test to ensure that wipe_ib_logfiles() properly suppressed the
exception is now redundant and has been deleted.

Change-Id: Ie99a0843d1e388d508a904fca0a759ca8bcd9f26
Partial-Bug: #1346879