20 Commits

Author SHA1 Message Date
Jenkins
5894db323f Merge "Move some comments of variables to right place" 2014-03-01 13:11:14 +00:00
Jenkins
3208d7ad43 Merge "Handle non-zero exit code from git diff" 2014-02-28 17:30:35 +00:00
Jenkins
2cf03d2469 Merge "make service_check fatal" 2014-02-28 07:33:42 +00:00
Jenkins
dad6e4114d Merge "Enforce function declaration format in bash8" 2014-02-28 06:32:20 +00:00
Masayuki Igawa
d20f632a70 Move some comments of variables to right place
setup_develop*() in functions has been moved to functions-common. But
some comments about the variables are still left.
This commit moves it to the right place.

Change-Id: Ic360454f1ee72f51c9979d0468dee0913e9b32e4
2014-02-28 10:35:49 +09:00
Jenkins
a340d68b1b Merge "Fix comments about System Functions" 2014-02-27 22:38:33 +00:00
Sean Dague
1237922b65 make service_check fatal
if we fail service check, we should do so in a fatal way, because
something is not right. This will be very useful in grenade.

Change-Id: I18811b0d8e6d06f364685c366cdc8f5dda3b8f7e
2014-02-27 17:16:46 -05:00
Ian Wienand
aee18c749b Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
2014-02-28 07:59:03 +11:00
Dean Troyer
83b6c99b50 Handle non-zero exit code from git diff
The check for a changed repo in setup_develop() 'git diff --exit-code'
returns a status of 1 when the repo has changes; trap that so errexit
does not abort the script.

Bug-Id: 1285780
Change-Id: Ic97e68348f46245b271567893b447fcedbd7bd6e
2014-02-27 12:41:32 -06:00
Jenkins
0ed4af02da Merge "enable -o errexit" 2014-02-27 14:57:43 +00:00
Jenkins
003a6a3e10 Merge "Move setup_develop() to common" 2014-02-27 12:32:54 +00:00
Sean Dague
09bd7c8fd5 enable -o errexit
devstack should run under -o errexit to ensure that we fail early
when something has gone wrong, otherwise determination of the root
failure location is often quite challenging.

this clears all the normal use cases for devstack, there could be
tests which now die early, which we're going to have to check for
later.

Change-Id: Ibd828c4f4fd95a60d3918d3d7ae90e10649479ab
2014-02-27 06:30:37 -05:00
Jenkins
cf7237c505 Merge "Add GIT_TIMEOUT variable to watch git operations" 2014-02-27 04:31:40 +00:00
Dean Troyer
a25a6f6d80 Unbuffer log output
* Force-flush log output so we don't lose log output in certain error cases.
* Slow down exit paths: add sleep to die(), wait until last moment to
  kill child processes (including the awk log output filter)

Change-Id: I1620fd33b89b237d9c2bb6206f3de2c81719f676
2014-02-26 13:17:36 -06:00
Sean Dague
45917cc4d9 xtrace less
we are xtrace happy, however that's just generating bulk in log
files that are mostly ignorable. For the basically bullet proof
functions we should not xtrace.

Change-Id: Iab4e6d270c1546e0db2a06395cefcdf7f7929c3c
2014-02-25 06:25:14 -05:00
Dean Troyer
af616d9341 Move setup_develop() to common
It's in the wrong place for current Grenade

Change-Id: Ia670198332af5945a56d708cd83d9239df0c2287
2014-02-24 10:38:18 -06:00
Ian Wienand
d53ad0b07d Add GIT_TIMEOUT variable to watch git operations
During my CI testing of each devstack change I can often see git get
itself stuck and hang indefinitely.  I'm not sure if it's transient
network issues, or issues at the remote end (seen with both github.com
and git.openstack.org) but it hits fairly frequently.  Retrying the
command usually gets it going again.  Searching for "git hanging" and
similar shows its not entirely uncommon...

This adds a watchdog timeout for remote git operations based on a new
environment variable GIT_TIMEOUT.  It will retry 3 times before giving
up.  The wrapper is applied to the main remote git calls.

Change-Id: I5b0114ca26b7ac2f25993264f761cba9ec8c09e1
2014-02-24 09:35:19 +11:00
Masayuki Igawa
f6368d3eac Fix comments about System Functions
This commit fixes comments about "System Functions".
 * Add a missing comment about System Functions in the header
 * Fix singular to plural like others

Change-Id: I3feb94cd11a6683ca80093574d60fdf7420e3af2
2014-02-20 13:34:28 +09:00
Dean Troyer
abc7b1d765 Backport Grenade updates
Backport changes made in Grenade's copy of functions since the last sync:
* d0654b9,i 4c7726e - get_release_name_from_branch()
* 7907766 - edits to install_package()

Change-Id: I0714c0b1072f1360c3c08fe24225e65e2a550fad
2014-02-12 12:10:32 -06:00
Dean Troyer
dff49a242e Split functions
Move shared and non-DevStack-specific functions to `functions-common`.  This is
a code move only with some updated comments.  The functions are now
sorted alphabetically within function groups, eg. all git-related functions
are grouped together.  The groups are listed at the top of the file.

'functions' sources 'functions-common' so no additional changes are required
for backward-compatability.

All functions shared with Grenade have also been moved.

functions-common was created from commit e0ed8ea038299952826b27a16753775472f108d8

Change-Id: I73bf7134fd6a60ec1ea44a5bfab08b0569b60ded
2014-02-12 12:10:11 -06:00