303 Commits

Author SHA1 Message Date
Jenkins
4a5963f2fe Merge "Added functions for get a ip on an instance" 2013-08-16 02:55:11 +00:00
Jenkins
af1c7f564e Merge "Add XenServer to GetDistro's logic" 2013-08-15 16:13:47 +00:00
Nachi Ueno
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
Bob Ball
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
Lorin Hochstein
cfb708d9c5 Redirect dpkg -l stderr to /dev/null
Fixes bug 1211413

Change-Id: I33a7e1e8fb3755c69ca0570e333e4908cb6f3da4
2013-08-13 14:35:07 -04:00
Roman Gorodeckij
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
Jenkins
334c3a71bd Merge "misleading source filename in error message" 2013-08-09 01:30:50 +00:00
Jenkins
b690a8f00e Merge "Add tools/install_pip.sh" 2013-08-08 21:23:27 +00:00
Jenkins
dedc4617a7 Merge "Add call trace in error message" 2013-08-08 15:45:49 +00:00
Dean Troyer
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
Jenkins
206a2ac312 Merge "Some bash versions don't support negative lengths" 2013-08-06 19:36:00 +00:00
Jenkins
1b11fa58f5 Merge "Re-enble pip -e in setup_develop" 2013-08-06 15:56:28 +00:00
Jenkins
48e4a2b9f2 Merge "Ensures cross compatibility for zsh and bash." 2013-08-06 13:59:39 +00:00
Monty Taylor
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
Bob Ball
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
Sean Dague
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
James Kyle
3f1d0e2688 Ensures cross compatibility for zsh and bash.
Fixes bug #1207853

Change-Id: I8ab3959ac8dbb5bb199e325bfdfdc513b4327410
2013-08-05 09:31:04 -07:00
Monty Taylor
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
Kui Shi
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
Kui Shi
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
Jenkins
9cdc0a17ce Merge "Fix get_pip_command()" 2013-08-02 03:45:27 +00:00
Dean Troyer
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
Sreeram Yerrapragada
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
Christian Berendt
a7a219ab76 renamed deprecated glanceclient parameter
According to the sources the parameter --public in python-glanceclient
should be removed after only using the new parameter --is-public in
Devstack.

Change-Id: I25fbb23f4823b3766db647dd50a5b538aad3e55a
2013-07-30 18:28:13 +02:00
Chris Behrens
c62c2b9b66 Fix various things when n-cell is enabled
1) Use the newer cell_type configuration option instead of overriding
the compute_api_class.

2) A nova-cells service is started for both the API cell (region) and
the compute cell (child).  The screen names were both 'n-cell' which
caused both services to log to the same log file.  The screen names have
been changed to n-cell-region and n-cell-child.

3) Security groups are not supported with cells.  Multiple exercises are
patched to use the 'default' security group instead of creating a new
one.  Additionally, if one uses the 'default' security group, do not try
to delete it, as one can never delete the default.

4) Disable the floating_ips and aggregates exercises when n-cell is
enabled, as they are not supported by cells.

5) Related to #4, disable the floating_ips tests within euca.sh

6) Update the README.md.  No services need to be disabled, and one only
needs to enable the n-cell service.

Change-Id: I9782d1e3cda3c9dd3daefa15c043f5b06473cb87
2013-07-26 11:11:25 -07:00
Jenkins
5011c03d03 Merge "Remove python-netaddr requirement" 2013-07-25 11:10:40 +00:00
Dean Troyer
d4f69b21f5 Remove python-netaddr requirement
Remove python-netaddr as a DevStack (stack.sh) requirement,
this does not change any individual project requirements.

Specifically it replaces address_in_net() and adds cidr2netmask()
and maskip() functions.

Change-Id: Ic604437fde2e057faced40a310ab282f3eb27726
2013-07-24 12:25:35 -05:00
Ian Wienand
31dcd3e7ab Use unique build dir for pip installs
There is a bug in pip [1] where it will choose to install a package
from an existing build-dir if it exists over the version actually
requested.

Thus if a prior component has installed a later version of the
package, the unpacked code is already in /tmp/$USER-pip-build; it gets
re-installed and manifests in a confusing error along the lines of

---
 Downloading/unpacking requests>=1.1,<1.2.3
   (from -r /home/stack//python-cinderclient/requirements.txt (line 5))
   Running setup.py egg_info for package requests
   Requested requests>=1.1,<1.2.3 (from -r
   /home/stack/python-cinderclient/requirements.txt (line 5)),
    but installing version 1.2.3
...
  error: Installed distribution requests 1.2.3 conflicts with
    requirement requests>=1.1,<1.2.3
---

I believe pip 1.4 fixes this problem, but it should always be safe to
specify a unique build-directory for pip installs to avoid picking up
old versions.

We also add a cleanup_tmp function for clearing out anything that
stack.sh might leave around when un-stacking, and add a catch-all for
the pip-build dir.

[1] https://github.com/pypa/pip/issues/709

Change-Id: I7ce919cddfd6d6175ae67bd864f82e256ebc7090
2013-07-19 10:44:50 +10:00
Jenkins
2076647e21 Merge "update for name change to Neutron" 2013-07-07 21:32:23 +00:00
Mark McClain
b05c876994 update for name change to Neutron
Note: Nova and Horizon are not updated until those projects have
migrated.

Change-Id: I256ef20e7caadd9c96e6dd908c5d8b69ca5c4aeb
2013-07-07 00:15:11 -04:00
Monty Taylor
e7e51ac5e6 Directly install requirements with pip
Rather than parsing then feeding the pip requirements file to pip,
just have pip consume it directly.

Change-Id: I17bbe4324e6957c7165bc0f340ddae1e51039471
2013-07-04 16:09:46 -04:00
Steven Dake
3039657688 Enable Fedora 19 on DevStack
Fedora uses a special PROMPT_COMMAND for screen terminal types,
which are the default with DevStack.  The PROMPT_COMMAND interacts
in a negative way with the -t and -X and -p flags, causing DevStack
not to work.  To solve this problem, this patch forces PROMPT_COMMAND
to default to /bin/true, triggering no changes to the window title
used within screen.  Also this patch enables F19 as a non-FORCE
distribution.

Change-Id: I2414d9e28dd95b69272e132163b29ed83f73b2f6
Fixes: bug #1196340
2013-06-30 16:13:00 -07:00
Martin Vidner
4f9b33d077 Fix python exec prefix on SUSE.
https://bugs.launchpad.net/devstack/+bug/1068386
"sudo python setup.py develop" installs to /usr/bin on SUSE

Otherwise it fails with "stack.sh:191 g-api did not start".

Change-Id: I1258240ce2a5a765188353fbc8a2e085d0b02fec
2013-06-27 17:57:22 +02:00
Daniel Jones
fa868cb59c Disable vnc on Power Systems
Power systems don't have graphics adapters, so we can't simulate a VNC
console. This patch removes that from the default nova configuration
if the system architecture is ppc64.

Change-Id: I129d180b712115e5c275241740d34805fea23e8b
2013-06-18 18:20:41 -05:00
Kyle Mestery
51a3f1f636 Fix the OVS version check to work with upstream master versions of OVS.
This patch adds two functions to check version strings in the toplevel
functions file. The openvswitch_agent then uses these to compare versions
when checking for tunneling support. The tunneling version check now
also takes into account upstream master versions of Open vSwitch, which
the previous version check always failed on.

Fixes bug #1190734

Change-Id: I0102fb57f8ce5529169025efa21a0996ad68bef1
2013-06-14 10:01:15 +00:00
Dean Troyer
1a6d4492e2 Periodic formatting cleanup
This is the semi-irregular comment and docs cleanup.

No functional changes should be here although some code is moved in a
small attempt to sort functions and get things where they need to be.

Change-Id: Ib4a3e2590c6fbd016c391acc7aef6421e91c0dca
2013-06-11 14:39:27 -05:00
Ian Wienand
535a8148cc Install EPEL for rhel6 if not detected
Simple check to see if EPEL repo is enabled for RHEL6 and, if not,
automated install of the repo RPM.

Also adds an additional sanity check which checking for pip.  In the
prior case of EPEL being disabled, a RHEL6 host may not have access to
python-pip.  Although this shouldn't happen, its a good sanity check.

Change-Id: I4e8a4dda9475b75d071534d4eef469198502a048
2013-05-30 16:33:30 +10:00
Jenkins
a20fb6d383 Merge "Basic check for homedir permissions" 2013-05-13 00:09:24 +00:00
Émilien Macchi
b2ef890db3 Add Debian OS support in DevStack
Fix bug #1176216

Change-Id: Ia94c332f02a921a936db249dc3b4a7ae4eff0400
2013-05-09 00:18:37 +02:00
Ian Wienand
0488edda8a Basic check for homedir permissions
Several guides suggest using data directories under your homedir,
rather than the default /opt area.  This is fine, but on RHEL6 and
similar distros homedirs are very restrictive 0700 permissions which
doesn't allow things like httpd to pass through to serve up files.

Even though stack.sh is taking over the host, changing permissions
automatically is not a nice idea.  So we just warn when it looks like
this is happening.

Change-Id: I9cd70e7fe90638a2a5c3b8fd94756afacac7c7be
2013-05-08 11:30:51 +10:00
Ian Wienand
d67dd87bfb Skip pip mirrors for RHEL
The RHEL6 version of pip doesn't have support for mirrors, so skip
asking for them.

Change-Id: Iaf2900067bb4b41f88d8fe82ea16b6b53d6bcc60
2013-04-19 09:45:19 +10:00
Jenkins
a1c183b4ef Merge "Add err()/err_if_not_set()" 2013-04-09 20:14:29 +00:00
Dean Troyer
cc6b443545 Formatting cleanups, doc updates and whatnot
Change-Id: Ica8298353be22f947c8e8a03d8dc29ded9cb26dd
2013-04-09 14:05:32 -05:00
Derek Morton
4a8496eca6 Linux Mint support
This patch allows DevStack installation on Linux Mint. Installations
on Linux Mint previously failed since its distribution ID did not
match any of the package installation methods and defaulted to using
rpm packages. Linux Mint is a Ubuntu derivative and such does not have
native support for rpm packages.

This change adds "LinuxMint" to the distribution matching options along
with Debian and Ubuntu.

Change-Id: Ice6a201cabe07373a9c1354699777835addeac53
Fixes: bug #1166422
2013-04-08 23:56:22 -05:00
Dean Troyer
896eb666e8 Add err()/err_if_not_set()
* err() and err_if_not_set() do error-like reporting without aborting the script
* die_if_not_set() now properly dies
* add is_running() from Grenade

Change-Id: I38b88112415a3c07e35bbc2dc65ad839c4d63fce
2013-04-05 15:08:05 -05:00
Ian Wienand
d857f4b4a4 Add rhel to DISTRO match
Match RHEL and CentOS and provide them as a DISTRO prefix of "rhel"

Change-Id: Ida19130ce9499d4d1fd2360fadc6b870b24bbc95
2013-04-04 08:59:51 +11:00
Ian Wienand
2c678ccf63 Use sudo to remove packages
yum and others need root to remove packages

Change-Id: I556505636c41296f9188c248dff13b85616c667c
2013-04-02 13:47:05 +11:00
Sean Dague
584d90ec56 add emacs shell-script tagging
for files that don't start with a #! or end in .sh, the added tags
are nice for emacs users to automatically switch to the right mode.

Change-Id: If4b93e106191bc744ccad8420cef20e751cdf902
2013-03-29 14:36:49 -04:00
Jonathan Michalon
0680204b1f Add support for iso files as glance images
Change-Id: Id1731c1a0a579fab44bb3944d2369b3feecf15d2
2013-03-27 14:05:30 +01:00
Jenkins
b28581baf8 Merge "Add run_process() to start services without screen" 2013-03-20 18:10:36 +00:00