[openstack-dev] Catching shell scripting errors
akostrikov at mirantis.com
Wed Jan 27 15:16:56 UTC 2016
I also would like to add `set -o pipefail` to the list as in a fantastic
Youtube talk 'The Functional Tao of Bash - Garrett Smith'.
On Tue, Jan 26, 2016 at 1:09 PM, Dmitry Bilunov <dbilunov at mirantis.com>
> Recently we had a typo, which caused BVT random failures. We have a
> setting up mcollective configuration file that is called
> (sequentially) from rc.local
> after another script, which makes sure that network interfaces are named
> in an
> expected way.
> This typo rendered the renaming procedure slow, leaving mcollective
> unconfigured for
> a while. Depending on random events, these events made tests to fail
> exposing the root cause in the logs, so it took much time to deal with it.
> We can possibly avoid such situations by declaring "set -eu" in our
> bash scripts.
> It raises two issues:
> 1. set -u is a bashism;
> 2. scripts need to be refactored to work with set -eu.
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
35b/3, Vorontsovskaya St., 109147, Moscow, Russia
Tel.: +7 (495) 640-49-04
Tel.: +7 (925) 716-64-52 <%2B7%20%28906%29%20740-64-79>
E-mail: akostrikov at mirantis.com <elogutova at mirantis.com>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev