Commit Graph

180 Commits

Author SHA1 Message Date
f20859b435 Merge "Normalise RECLONE flag to True Or False." 2013-09-29 12:30:48 +00:00
d76b11f56e Merge "change git show to | head -1" 2013-09-26 04:54:57 +00:00
0c43c6a7b8 Merge "Clean up automated changes to requirements" 2013-09-25 17:12:13 +00:00
45a21f0e54 change git show to | head -1
git show uses default system pager, which for people that have
funky pagers, goes sideways. Pipe this through head -1 to ensure
we only get the single change line we care about.

Change-Id: Iff22612b555bf58fe12101701cfe593f37e8f8de
2013-09-25 10:27:27 -04:00
5a9609bed3 Merge "make git show not display a diff" 2013-09-25 13:22:04 +00:00
a8d41e3af7 Normalise RECLONE flag to True Or False.
RECLONE flag now uses function trueorfalse for flag handling.
Added more flag cases to normalisation function trueorfalse.

Fixes bug #1200382

Change-Id: I0738537c87634281c6a92fa93b7f84a6b0dad497
2013-09-25 13:34:09 +05:30
23033e0399 Merge "Colorize Neutron log output and refactor log setup code" 2013-09-24 21:59:07 +00:00
06d17eb54a make git show not display a diff
if the top commit includes actual content, this was being displayed
in the devstack log, which was just confusing. --quiet suppresses
this.

Change-Id: Id52604d3b2b9a1372746120cb5d8d741c35576b7
2013-09-24 07:06:16 -04:00
c3431bfdd9 Clean up automated changes to requirements
Some of us like to reuse sandboxes, and keep them up to date.  This
is very difficult to do if devstack leaves modifications to
requirements.txt files after a run, since 'git pull' may refuse to
overwrite those changes.

This modification has devstack undo the changes to the requirements
files, to leave the sandbox in a clean state again.

Change-Id: Ia2d928ade8141b59b56a2c4548d760bf6911a3e5
2013-09-23 17:14:49 -04:00
835db2fead print out git references for trees
in order to be sure we understand the environment that's running
in an upstream test, print out the git information for the tree.
This will hopefully address questions of "which commit of tempest"
is being used for particular tests.

Change-Id: Ief4e8a17fd75945f02982d2adf8625fe927d823d
2013-09-23 14:19:45 -04:00
b305eeea1b Merge "Only run chmod/chown for local files" 2013-09-15 14:05:25 +00:00
05ae833be2 Colorize Neutron log output and refactor log setup code
Bug 1214616

This patch adds colors to on-screen Neutron log output in the same way nova,
cinder, and heat engine do.
To this aim, colorized logging configuration has been moved to ./functions.
The reason for this refactoring is that these instruction are the same or
very similar for each project, with the only exception of the target
configuration file.

Change-Id: Idf0d1b842bb9ab046c9ef826de1dfc55b3f1df9d
2013-09-13 10:34:40 -07:00
abd1f24dd6 Merge "Added Trove (Database as a Service)." 2013-09-12 22:42:18 +00:00
0cccad43aa Added Trove (Database as a Service).
- Added changes to stackrc for the Trove Repos.
- Added support to devstack for "install", "configure",
  "init", and "run"

implements blueprint:trove-devstack-integration

Change-Id: Ib3f6daad33e629f764a174b80762c808ce8588e2
2013-09-11 23:48:07 +00:00
e700267e33 Only run chmod/chown for local files
When the /opt/stack directory is NFS mounted, chown to
the local user might not work. Create safe_chown and
safe_chmod functions that do nothing on NFS filesystems
to avoid spurrious errors.

Change-Id: Iaa68879e867a4426b1990d4d46164769177dc7cc
2013-09-10 15:15:58 -04:00
a6273b9378 Provide a means of setting vmdk custom properties via image filename
Custom properties for vmdk disk type, storage adapter type, and
networking adapter type can now be retrieved from a vmdk image's
filename. The filename format is defined as:

  <name>-<disk type>:<storage adapter>:<network adapter>

An example filename following this format would be
debian-2.6.32-i646-thin:ide:VirtualE1000. If the vmdk filename does not
match the above format then underlying nova driver will supply default
values.

Change-Id: I83483d20f984250bd8154d8e270b2e801d2df303
Closes-bug: #1221044
2013-09-05 16:49:20 -07:00
53d5b791fd Merge "Copy policy_add() from Grenade functions" 2013-09-04 16:47:04 +00:00
533e14d6a5 Copy policy_add() from Grenade functions
policy_all() was added to Grenade's functions file, which is notmally synced
from DevStack so we need to bring it over here before the next sync.

Change-Id: Ifd852e9d1ffe39fa23f6312d1ddf2874b5f2b9f0
2013-09-03 14:19:32 -05:00
1533a349da remove multi-host timeout
If you ran exercises with MULTI_HOST enabled, an additional sleep was
performed. This change removes that sleep to speed up tests.

Change-Id: I9dfd61cbb9415bd5e8fd1e40f4e41512be2ae0d2
2013-08-30 14:10:52 +01:00
5584709fa8 Merge "Fix is_package_installed() check with dpkg" 2013-08-29 04:51:52 +00:00
bc11e0a0bc Merge "xenapi: devstack support for raw tgz image upload" 2013-08-29 02:17:23 +00:00
666fe5fd9f Merge "Adds new tag for testonly packages in package lists" 2013-08-29 01:17:45 +00:00
04762cd823 Fix is_package_installed() check with dpkg
is_package_installed() incorrectly returned '0' for packages that
had 'un' status in the dpkg database.

Change-Id: I81b77486c2ed7717ed81cb2c2572fe6c4b394ffc
2013-08-27 17:48:49 -05:00
bc2ef929ed xenapi: devstack support for raw tgz image upload
Devstack will recognise the .xen-raw.tgz extensions, and upload them to
glance as raw tgz images with xen pv_mode. This change also adds "tgz" to
the recognised container formats of glance. The changes for raw tgz
support are:

    https://review.openstack.org/#/c/40908/
    https://review.openstack.org/#/c/40909/
    https://review.openstack.org/#/c/41651/

related to blueprint xenapi-supported-image-import-export

Change-Id: I077564587d4303291bb4f10d62bb16380b574106
2013-08-27 11:12:28 +01:00
71d5630c4a Adds new tag for testonly packages in package lists
Also introduces a new parameter INSTALL_TESTONLY_PACKAGES
in the stackrc with False as default value. Setting it to
True stack.sh will install all packages tagged with the tag
testonly in the package lists.

Includes needed packages for Ubuntu and Fedora

fixes bug #1203680

Change-Id: I911a6601819a34262853bba0658f6751148bfbec
2013-08-21 14:15:20 -05:00
68044c0245 Merge "Redirect dpkg -l stderr to /dev/null" 2013-08-20 04:01:32 +00:00
41815cdc7b Echo service start failures.
* functions: Previously screen_it would log service start failures by
touching a file, this isn't very useful when working with Jenkins.
Switch to echo'ing that a service failed to start and pipe that through
tee so that we can keep the old behavior of touching a file (note this
behavior is slightly modified and the touched file will now have
contents).

Change-Id: I2d3f272b9a65a9d64dbbc01373a02fccf52f56a8
2013-08-16 14:57:38 -07:00
4a5963f2fe Merge "Added functions for get a ip on an instance" 2013-08-16 02:55:11 +00:00
af1c7f564e Merge "Add XenServer to GetDistro's logic" 2013-08-15 16:13:47 +00:00
6769b166b1 Added functions for get a ip on an instance
The cause of some gating failure looks like
because of getting ip address on instance.
However current exercise didn't log the return value.
In this commit, we add get_instance_ip function with
error hanlding support, and apply it on the execise.

Change-Id: I8e17ba68093faafe58a98eb780a032368eea38aa
2013-08-13 17:08:47 -07:00
4669122dc8 Add XenServer to GetDistro's logic
This is primarily to satisfy the expectations of various scripts that os_*
variables are defined, and will result in a distro similar to "xs6.1.0-59235p"

Fixes bug 1211001

Change-Id: I951e1eb3a5e25f4d8773a11b15cf38157b6492fe
2013-08-13 21:51:41 +01:00
cfb708d9c5 Redirect dpkg -l stderr to /dev/null
Fixes bug 1211413

Change-Id: I33a7e1e8fb3755c69ca0570e333e4908cb6f3da4
2013-08-13 14:35:07 -04:00
99405a45aa Pip install fails because of --use-mirrors parameter
Having --use-mirrors parameter in pip commands causes pip to hang on
some distros.

Pypi uses CDN for long time already, so there's no point to keep this
parameter no more.

Wipe PIP_USE_MIRRORS out of the "function" file.

Change-Id: I70adaf6591834af2482e09eb7f8f9f60df8e7692
Closes-Bug: #1069309
2013-08-12 09:39:52 -04:00
334c3a71bd Merge "misleading source filename in error message" 2013-08-09 01:30:50 +00:00
b690a8f00e Merge "Add tools/install_pip.sh" 2013-08-08 21:23:27 +00:00
dedc4617a7 Merge "Add call trace in error message" 2013-08-08 15:45:49 +00:00
62d1d698a0 Add tools/install_pip.sh
Install a known working recent version of pip that handles installation
dependencies more correctly than before.  Extract to a separate script
so it can be used apart from stack.sh.

* Install distro setuptools if it not already present
* Install pip from source tarball as get-pip.py proved to be unreliable
* Remove python-distribute and python-pip from all prereq files,
  move python-setuptools to 'general'
* Remove the earlier unfubar_setuptppls() call that attenpted to fix this
* Only update requirements.txt when no changes in repo

Tested on Precise, F18 and CentOS6.
* Fedora and RHEL allow pip to install packages ON TOP OF RPM-installed
  packages.  THIS IS BROKEN.  And is one reason we have to be so picky
  about order and so forth.

Change-Id: Ibb4b42119dc2e51577c77bbbbffb110863e5324d
2013-08-07 20:28:56 -05:00
206a2ac312 Merge "Some bash versions don't support negative lengths" 2013-08-06 19:36:00 +00:00
1b11fa58f5 Merge "Re-enble pip -e in setup_develop" 2013-08-06 15:56:28 +00:00
48e4a2b9f2 Merge "Ensures cross compatibility for zsh and bash." 2013-08-06 13:59:39 +00:00
b5bbaac09a Re-enble pip -e in setup_develop
We had a bad merge somewhere along the way which reverted the pip -e
part of things. Replace it.

Change-Id: I620bea80eac7ad53b5bfb79dd2b21c29ad1b2267
2013-08-06 10:35:02 -03:00
46287d8d71 Some bash versions don't support negative lengths
Fix to make the service string work on these versions of bash too

Change-Id: Ibb9868ea7bf44480be76a8ea9d7d9fbc278a8ef3
2013-08-06 14:32:53 +01:00
6c84463071 Update projects to global requirements before setup
We've agreed that we should be using global requirements, so
force projects to be updated to global requirements before we
test them.

Co-Authored-With: Monty Taylor <mordred@inaugust.com>

Change-Id: I0652f639673e600fd7508a9869ec85f8d5ce4518
2013-08-05 16:22:32 -04:00
3f1d0e2688 Ensures cross compatibility for zsh and bash.
Fixes bug #1207853

Change-Id: I8ab3959ac8dbb5bb199e325bfdfdc513b4327410
2013-08-05 09:31:04 -07:00
408a4a7d1c Install things in setup_develop with pip -e
We have some complex logic in here to try to do the right things with
the requirements before doing the install of the package which still
winds up being wrong in some cases. Since having written this code,
we've learned that the logic we're trying to achieve is actually what
pip install -e does. So just use that. We have to follow up with a chown
of the resulting egg-info directory, because the sudo command will cause
it to be written by root, which prevents subsequent commands from
operating without privilege in the directory.
Change-Id: Iffd068c94ef84475ebb30758bcf612075d225bea
2013-08-02 18:40:02 -04:00
17df0775ed misleading source filename in error message
when ./stack.sh encounters error, the output may look like this:
[ERROR] ./stack.sh:698 nova-api did not start

The source filename is wrong. Actually, it should be like this:
[ERROR] /<path_of_devstack>/lib/nova:698 nova-api did not start

stack.sh uses bash as interpreter, which define "Shell Variables"
BASH_SOURCE:
    An array variable whose members are the source filenames where
    the corresponding shell function names  in  the  FUNCNAME  array
    variable  are  defined.   The  shell  function
    ${FUNCNAME[$i]}  is  defined  in  the  file ${BASH_SOURCE[$i]}
    and called from ${BASH_SOURCE[$i+1]}.

The function "err" is called by function "die" ( and "err_if_not_set",
and "err_if_not_set" is not used at all). ${BASH_SOURCE[2]} will
ignore the deepest two call entries, which corresponding to the shell
functions: "err" and "die".

In one sentence, this change will print the source filename where the
function is defined and exits via function "die".

Fixes bug #1207658

Change-Id: I2aa6642c5cf4cfe781afe278b3dec3e7cba277fa
2013-08-02 17:55:41 +08:00
5e28a3e2d2 Add call trace in error message
Call trace can help user to locate problem quickly.

stack.sh uses bash as interpreter, which defines a series of
"Shell Variables":
BASH_SOURCE:
An array variable whose members are the source filenames

BASH_LINENO:
An array variable whose members are the line numbers in source
files where each corresponding member of FUNCNAME  was  invoked.

FUNCNAME:
An array variable containing the names of all shell functions
currently in the execution call stack.

run "man bash" and search the variable name to get detailed info.

In function backtrace, it gets the call deepth from
${#BASH_SOURCE[@]}, then print the call stack from top to down.

In function die, backtrace is called with parameter "2" to ignore
the call trace of function "die" and "backtrace".

I add a broken function in lib/database, and call it in stack.sh,
the output looks like this:

[Call Trace]
./stack.sh:104:broken
/home/kui/osd/devstack/lib/database:24:die
[ERROR] ./stack.sh:24 It is broken

Fixes bug # 1207660

Change-Id: I04d0b3ccf783c769e41582c20f48694c19917334
2013-08-02 17:47:03 +08:00
9cdc0a17ce Merge "Fix get_pip_command()" 2013-08-02 03:45:27 +00:00
d2cfcaa576 Fix get_pip_command()
Be more flexible in finding pip, especially after we start replacing it

Change-Id: I14b0ac1584aab99c2fe58a78e3a43196ae8130ca
2013-08-01 14:17:30 -05:00
cbaff86b02 Add support for vmdk files as glance images
* Adds support for vmdk files as glance images in upload_image function
* Set default image url to use for vsphere driver in stackrc
* Now using a more stable url

Change-Id: If6d45bc8dfd3c812ded5e1bcf69ad7ebd9b64f34
2013-07-31 18:55:10 -07:00