20 Commits

Author SHA1 Message Date
Davanum Srinivas
8afbaa1c80 Support for running Nova with oslo.rootwrap daemon
Nova is being enhanced to use rootwrap as a daemon. For this effort,
we need an additional entry for nova-rootwrap-daemon in the
sudoers.d/ directory.

Needed by:
I57dc2efa39b86fa1fa20730ad70d056e87617c96

Change-Id: I80c7b9dd8e9e0f940aa4e54a95b241dfc40d3574
2015-05-15 04:26:04 +00:00
Ian Wienand
c678241308 Infer rootwrap arguments from project
We can infer the binary and configuration paths just from the project
name and expanding this to the known *_DIR & *_BIN_DIR variables.  A
similar thing is done for policyd settings

Change-Id: I7c6a9fa106948ae5cbcf52555ade6154623798f1
2015-05-15 14:01:20 +10:00
Ian Wienand
fa3e841286 Create config file in merge_config_file
Change If132a94e53545d9134859aa508da7b9819ede2f8 introduced a small
regression; it added an "inidelete" which looks in the config file to
delete rows.

However, at least for the test-case, the config file isn't created
yet.  The end result is that the test fails but we don't notice.

 2015-04-17 00:55:03.169 | merge_config_file test-multiline: sed: can't read test-multiline.conf: No such file or directory
 2015-04-17 00:55:03.195 | OK

So fix this up by creating the config-file if it isn't there.

Also, add "-e" to the test file so we catch things like this in the
future.

Change-Id: I43a4ecc247f19cccf51d5931dfb687adbd23d6b1
2015-04-17 13:23:25 +10:00
Amrith Kumar
9860876f5d perform install_infra sooner in stack.sh
The install_infra() call needs to be done earlier since
pip_install_gr() depends on it. Also the fact that python module names
are supposed to be lower case but some use camel case is a problem
(for example with XenAPI).

Change-Id: I7012d77134fa0d9c746d87e837934e7dcb337e5c
Closes-Bug: #1441820
2015-04-08 16:28:34 -04:00
Sean Dague
60996b1b60 introduce pip_install_gr
This creates a new pip_install_gr that installs from global
requirements allowed versions. Now that stable branches are getting
capped all of devstack needs to be fixed to do things like this.

Change-Id: I8fd0ef2bfc544ca2576fab09d3018f760b8848fe
2015-04-08 10:28:17 -04:00
Jenkins
9e63b59a8e Merge "Add inc/rootwrap" 2015-04-03 16:25:00 +00:00
Jenkins
d7c874bca6 Merge "Move back isset to the functions-common" 2015-03-30 15:05:59 +00:00
Dean Troyer
32d6bc6ad1 Add inc/rootwrap
Rootwrap shouldn't be a unique snowflake.  Plus the binaries tend
to be called assuming PATH will find them.  Not so with venvs
so we need to work around that brokenness.

Configure Cinder and Nova to use configure_rootwrap().

Change-Id: I8ee1f66014875caf20a2d14ff6ef3672673ba85a
2015-03-29 22:29:28 -05:00
Dean Troyer
41d6f858be Clean up additional INSTALL_TESTONLY_PACKAGES bits
The original removal is in https://review.openstack.org/#/c/167669/

Change-Id: I3c59f040523d2cd1453465e80280955218880634
2015-03-26 15:36:23 -05:00
Chris Dent
ebdd9ac5b4 Provide an option to force pip --upgrade
Make it possible for someone to config

  PIP_UPGRADE=True

in local.conf and thus force pip_install calls to upgrade. In
automated testing this is probably a bad idea, but in manual testing
or situations where devstack is being used to spin up proof of
concepts having the option to use the latest and greatest Python
modules is a useful way of exploring the health of the ecosystem.

To help with visibility of the setting, and section has been added
in configuration.rst near other similar settings.

Change-Id: I484c954f1e1f05ed02c0b08e8e4a9c18558c05ef
2015-03-26 14:27:54 +00:00
Attila Fazekas
1bd79596c3 Move back isset to the functions-common
isset function was moved to config file related functions by accident,
this change also simplfies the isset in a bash >=4.2 way.

All supported distro has at least bash 4.2. (RHEL6 used 4.1)

Change-Id: Id644b46ff9cdbe18cde46e96aa72764e1c8653ac
2015-03-26 14:00:02 +01:00
Sean Dague
eeb7bda510 eliminate TEST_ONLY differentiation
devstack is a development and test environment, but by default we were
only installing the runtime dependencies. We should install all the
testing required packages as well.

Change-Id: I7c95927b9daad15766aac9d1276b10ca62efb24c
2015-03-25 11:55:32 -04:00
Eli Qiao
6a83c423fc Fix pip install error
If we set mutiple proxy (ip or url), pip install will
treat the second proxy as a command.
Add quotation marks around proxy.
expecially for no_proxy

Change-Id: I38ad3f083ba5155cda0e5e2b8f5df64492b7fecd
2015-03-17 17:03:29 +08:00
Dean Troyer
bf2ad7015d Move configuration functions into inc/*
* config/INI functions from functions-common to to inc/ini-config
* local.conf meta-config functions from lib/config to inc/meta-config

Change-Id: I00fab724075a693529273878875cfd292d00b18a
2015-03-09 22:52:19 -05:00
Joe Gordon
cd8824ac04 Pass PIP_FIND_LINKS through sudo to pip
We weren't actually using the wheels since PIP_FIND_LINKS environmental
variable was getting lost during the sudo

Change-Id: I4a89a70df63772a16ee5a8c3f1cd86e9c7bb5242
2015-03-06 01:33:31 +00:00
Dean Troyer
8c2ce6ea72 Virtual environment groundwork
Introduce the tooling to build virtual environments.

* tools/build_venv.sh: build a venv
* introduce lib/stack to house functionality extracted from stack.sh that
  is needed in other places, such as Grenade; start with stack_install_service
  to wrap the venv install mechanics
* declare PROJECT_VENV array to track where project venvs should be installed
* create a venv for each project defined in PROJECT_VENV in stack_install_service()

Change-Id: I508588c0e2541b976dd94569d44b61dd2c35c01c
2015-02-18 20:19:38 -06:00
Jenkins
a6de7e962c Merge "Teach pip_install() about virtual envs" 2015-02-18 20:59:20 +00:00
Joe Gordon
d5ac785247 Add new function get_from_global_requirements
Instead of specifying the version of a library in devstack, use the version from
global-requirements

Add new function get_from_global_requirements and use it
where it makes sense.

Change-Id: I6b2f062761ac05ef72fc6cc9993bc204faf06fa5
2015-02-17 11:48:06 -08:00
Dean Troyer
2b564763aa Teach pip_install() about virtual envs
Set PIP_VIRTUAL_ENV to install the package(s) into an existing virtual
environment.  This works by simply using the pip command already
in the venv, and not using sudo.

Change-Id: I910e1752e58a666174f83b4f97e547851e66e655
2015-02-12 12:19:20 -06:00
Dean Troyer
490430dbe3 Split functions-common: python functions
Move Python-related functions into inc/python

Should be transparent to all callers as it is sourced from functions-common

Change-Id: I88043830cef9211b4e0baa91bfcc7a92125afa9f
2015-01-30 14:59:48 -06:00