393 Commits

Author SHA1 Message Date
Rob Crittenden
38245da0b8 Fix typo in local variable name in time_stop
This didn't break functionality but it would use a global instead
of a local variable so nested calls to time_* might have issues.

Change-Id: If61ef07c4ce15f1a356975a0b0611fdf5e49109a
2016-05-26 17:55:14 -04:00
Kashyap Chamarthy
247e44625c functions-common: Use systemctl when applicable
We live in a new systemd world, use the native commands to talk to it
if available.

Change-Id: Iccdc35f0c9da2997f9e672bc1d24ca15d3403d98
2016-05-24 11:21:01 -04:00
Jenkins
1df67b9dd8 Merge "Added RHEL rebuild ScientificLinux to supported distributions" 2016-05-20 13:46:35 +00:00
John Kasperski
7b3ae53328 Update is_service_enabled
The nova check in is_service_enabled() is loading the nova repo
when ENABLED_SERVICES=ovn-northd.  Add a comma before each of the
checks to prevent this error with any of the other services.

Change-Id: I9deee735812cde44ea5140b1ad76848f02576609
Closes-Bug: #1574431
2016-04-27 12:13:16 -05:00
Mike Trimm
1da4e790eb Added RHEL rebuild ScientificLinux to supported distributions
Change-Id: I8b3844bf28b11254e7cc9a96126bd66efbd1212e
2016-04-27 11:40:25 -05:00
Matt Riedemann
ae4578bed9 Revert "Don't check for existing endpoints"
This reverts commit 7d1ec430046256ac3f536f4920a43936e28ef0c4.

This broke the sahara and layer4 dsvm jobs. The layer4 job
is voting on tempest changes so tempest is also broken.

Change-Id: Ide69f10cd85bf7ff0d86bc8cba56dedd26850362
Partial-Bug: #1573868
2016-04-23 01:45:40 +00:00
Sean Dague
7d1ec43004 Don't check for existing endpoints
We really should only have code that create endpoints once, making all
osc calls get_or_set adds 3 seconds per call for no really good
reason.

This also stops creating the internal endpoints in the service
catalog. It's a pattern that we're trying not to propogate, so lets
not have it in devstack any more.

Change-Id: Ia8cefe43753900d62117beae330db46deb6a9fc9
2016-04-22 10:44:10 -04:00
Jenkins
54f331969f Merge "remove clouds.yaml in clean.sh" 2016-04-21 20:01:54 +00:00
Jamie Lennox
cbcbd8f33c Allow putting service users in a seperate domain
Make it possible to construct the service users in their own seperate
domain. Changing this away from Default will not work for everyone yet,
though it does work for basic service interaction however enabling it
will allow us to start testing and hopefully gating that services aren't
relying on v2 only concepts.

Change-Id: I7e73df5dd1caabf355783da2bc0f3007ade92fba
2016-04-18 09:59:52 +10:00
ZhiQiang Fan
0b4a009e56 remove clouds.yaml in clean.sh
devstack failed to install because glance:
Could not determine a suitable URL for the plugin

patch I618ea8e27b49af360c905df85af06d9b1eef8407 tries
to fix this problem, but with a wrong way because path is not
correct, the clouds.yaml is not under /path/to/devstack/~/.config/openstack/
but ~/.config/openstack.

patch I8af6bd465f74099c560dddba6b5221dd79cbc965 tries to
fix this problem, but with a worng way to specify the path,
~$STACK_USER/.config/openstack/clouds.yaml will not expand with
a variable, only const string can.

$ whoami
zqfan
$ touch ~/.config/openstack/clouds.yaml
$ export STACK_USER=zqfan
$ rm -rf ~$STACK_USER/.config/openstack/clouds.yaml
$ ls ~/.config/openstack/
clouds.yaml

Change-Id: I549817d2f4638be615991c1726b39d270ba71357
ref: I618ea8e27b49af360c905df85af06d9b1eef8407
2016-04-15 02:27:35 +08:00
Fernando Ribeiro
4e6f8ca670 Add installation support for Oracle Linux 7
This removes Oracle Linux 6 support ("OracleLinux") which, like RHEL6,
is now unsupported.  "OracleServer" matches Oracle Linux 7.

Change-Id: I35b1c7d0b103c509283dba0f6551453e7d8ac4cc
Closes-Bug: #1568634
2016-04-14 07:14:04 +10:00
Ian Wienand
908a3a9523 Add total timings
Printing the total makes it easier to compare runs at a glance.  Clean
up the output a little, and use some consistent, name-spaced globals
while we're there.

Note the total runtime is at the top to avoid giving the impression
that it is the sum of the components below, since you can nest/overlap
timers (I made that mistake in a prior change :).  It might be a fun
exercise in tree building to one day track the overlaps and present a
nice nested breakdown.

Change-Id: I878ce03813d21138df493b82bceff3aaa7f83064
2016-03-30 19:49:13 +00:00
Jenkins
467dbf7703 Merge "Fix RHEL7 vendor detection" 2016-03-18 20:23:53 +00:00
Jenkins
a4d67cd033 Merge "yum_install_package: fix errexit and retry" 2016-03-18 20:22:59 +00:00
tengqm
78d3739dbe Fix RHEL7 vendor detection
When detecting os_VENDOR, the lsb_release output may be different
from what is expected today. This patch fixes the detection.

Change-Id: I850ad1acbc2397c73e7cc85c1765cba6ba2f98d4
2016-03-15 23:08:00 -04:00
Jenkins
082399ef18 Merge "Remove rejoin-stack.sh" 2016-03-14 18:55:23 +00:00
Jenkins
fa3cc77aee Merge "Use "command -v" instead of "which" to find path" 2016-03-11 00:55:25 +00:00
Jenkins
73af0de40c Merge "Ignore errors when uninstalling a pkg with zypper" 2016-03-11 00:55:17 +00:00
Jenkins
b57ec243c9 Merge "Also detected failed packages in dnf/yum wrapper" 2016-03-11 00:55:08 +00:00
Dean Troyer
9ba49cd826 Remove rejoin-stack.sh
This command has never completely worked to restart DevStack.
It periodically prompts attempts to work around this brokenness
in ways that harm other functions.  Let's finally remove it.

Requiring a complete re-run of DevStack after a reboot has always
been intentional.

TODO: follow-up cleaning all of the screen hackage if this merges.

Change-Id: I2f61bb69cc110468a91dcaa4ee7653ede7048467
2016-03-10 15:48:13 -06:00
Jenkins
61ba1b3353 Merge "Add some notes on DISTRO setting" 2016-03-07 14:30:31 +00:00
Jenkins
c72f8d318f Merge "Introduce Virtuozzo distribution" 2016-03-07 14:09:03 +00:00
Thomas Bechtold
c15d59157c Ignore errors when uninstalling a pkg with zypper
I.e. when trying to uninstall python-pip and it's not installed,
don't exit.

Change-Id: I21ac715a0090ad01811af47f23c61823dfa65629
2016-03-04 16:06:24 +01:00
Thomas Bechtold
dab3901d9a Use "command -v" instead of "which" to find path
If /usr/bin/which is not available, the current code
doesn't detect i.e. /usr/bin/zypper . Using "command -v" solved
the problem.

Change-Id: I1c281c3184d69cd9dc2418295b6a392d8e5693e0
2016-03-04 09:14:04 +01:00
Jenkins
ba71f0ead7 Merge "Fix is_suse() check for openSUSE distros" 2016-03-04 01:48:10 +00:00
Evgeny Antyshev
718512c4d2 Introduce Virtuozzo distribution
Virtuozzo is a RHEL-based distribution serving as a platform OS
to host proprietary container virtualization
(formerly, Parallels Cloud Server).

We moved away from CloudLinux distribution, which has actually
no support in Devstack (no such clause in is_fedora).
As it was us who introduced CloudLinux, by this patch
we replace it with Virtuozzo distribution.

More info on Virtuozzo company here: http://virtuozzo.com

Change-Id: Ib8a77e4611ebc05bc0aa50bb83ab79c412e21c74
2016-03-03 14:56:59 +00:00
Thomas Bechtold
899dfeef46 Fix lsb installation for SUSE
zypper has a "-n" (non-interactive) switch. "-y" is not known
as a global option.

Change-Id: I6537529e91c12c5f0d15a9faa2cca8aedaf7d956
2016-03-03 11:27:53 +01:00
Ralf Haferkamp
37dddb73fd Fix is_suse() check for openSUSE distros
We need to do a substring match on the vendor here. As most releases return
"openSUSE project" for the vendor.

Change-Id: Ia05db8d93b5e3f42cb6a9c8d77616ca9f7c32039
2016-03-02 15:34:06 +01:00
Ian Wienand
1b1cc8c1d4 yum_install_package: fix errexit and retry
Since I93e9f312a94aeb086925e069a83ec1d3d3419423 yum_install isn't safe
under errexit.  This means it really only works when called by
tools/install_prereqs.sh because for some reason, we don't set that
there.

However, there is a problem with the retry logic when detecting failed
installs.  A failed package install should stop further progress, but
with the current retry logic it just goes ahead and retries the
installation, which then incorrectly passes.  You can see this
happening in a test like [1].

In our detection scripts, make a failed package or missing packages
exit with error-code 2, and "die" when we see this to correctly stop.

[1] http://logs.openstack.org/81/285881/1/check/gate-tempest-dsvm-platform-fedora23-nv/a83be30/logs/devstacklog.txt.gz

Change-Id: I4ea5515fa8e82a66aefa3ec3a48b823b645274f7
2016-03-01 13:14:39 +11:00
Ian Wienand
3c60168532 Also detected failed packages in dnf/yum wrapper
As seen in [1]; dnf can output a "Failed:" section when installation
issues with a package are detected.  This does not, however, trigger
an exit failure code when running with "-y".  So add this to our
checking wrapper.

[1] http://logs.openstack.org/49/280449/1/check/gate-tempest-dsvm-platform-fedora23-nv/dc70ca8/logs/devstacklog.txt.gz#_2016-02-28_22_42_45_145

Change-Id: I12f7b3bc9e9cf5a97114082d3a634a42742843d5
2016-02-29 15:15:39 +11:00
Jenkins
c3c91c4267 Merge "Minor fixes for bashate trunk" 2016-02-24 20:04:55 +00:00
Jenkins
a91d7d8d05 Merge "Ironic: Update is_ironic_hardware function" 2016-02-24 19:40:46 +00:00
Ian Wienand
1ff75ff87f Always strip package comments
In the "I can't believe I missed this" category -- the existing strip
method removes shortest match (%); which fails when you put another #
in the comment (like "refer to bug#1234").  Change to the longest
match which should strip everything from the first "#" to the end
(since that's going to be the longest).

Change-Id: I47f5e710ebd87b0f54549732e7d64cf42c7a6b65
2016-02-19 14:39:45 +11:00
Lucas Alvares Gomes
8a4dea24fa Ironic: Update is_ironic_hardware function
The DevStack module of Ironic added a new configuration variable called
IRONIC_IS_HARDWARE that can be set to True/False to indicate that we are
setting up devstack to deploy physical or virtual machines (see the
depends flag). Prior to that, the devstack code assumed that if the
driver name loaded is != *_ssh then it's a physical hardware but now we
need to kill this assumption because we have means (see the virtualbmc
utility) to test drivers such as pxe_ipmitool and agent_ipmitool using
virtual machines.

Depends-On: I5edc51c7fc8b6f0bb7fe4ca129596709a32eb93e
Related-Bug: #1544642
Change-Id: I8b6363bbe280ddd2720c570851bc40e2804a40e2
2016-02-18 15:58:32 +00:00
Jenkins
4bcf6529d5 Merge "Keystone support deploy in uwsgi" 2016-02-18 06:50:18 +00:00
Ian Wienand
7ae97298c5 Minor fixes for bashate trunk
We don't have a new bashate release yet, but this fixes some minor
issues when used with bashate trunk.

The only two things triggered are stricter checking of assignment in
local declartions (catches quotes) and one instance of evaluating
arithmetic result in tools/xen/functions.

Therefore, hopefully, this change has no effect!

Change-Id: I3fd5d55236e90c2f2c25243af87adaf0c1b763e2
2016-02-16 14:50:53 +11:00
ptoohill1
96006658be Add LinuxMint to distro check
Adds LinuxMint to the distro checking. This allows linux mint with
the FORCE option to run. This will not fix for other distros that
do not pass the checks.

Change-Id: I42599c1bd851d2b61a56a3960f42ad051aab1727
Closes-Bug: #1545864
2016-02-15 18:41:14 -06:00
Ian Wienand
ed92e43178 Add some notes on DISTRO setting
It was pointed out in I42599c1bd851d2b61a56a3960f42ad051aab1727 that
after I46a2c36d95327087085df07cb797eb91249a893c we now die if we can't
determine DISTRO, rather than take a guess.

After some consideration, I don't consider this a regression.  This
default matching was basically only working for LinuxMint, because we
already have some matching there for setting os_PACKAGE that makes us
know the platform is Ubuntu-ish.

However, I would certainly agree it is not particularly clear as to
why.  This just adds some comments explaining why we can not just add
a default DISTRO fall-through and directs implementors on how to add
support for their platform.

Change-Id: I4b07259be1427d86a7154906646073d08dd07294
2016-02-16 10:56:56 +11:00
Brant Knudson
edc11c2f83 Keystone support deploy in uwsgi
Keystone is going to remove support for eventlet. Rather than only
have one way to run keystone (in Apache Httpd with mod_wsgi), we
should continue to gate on multiple wsgi containers to ensure that
keystone remains container-agnostic. The suggested alternative
container is uwsgi.

To run keystone in uwsgi rather than httpd or eventlet, set the
following env var in local.conf:

 KEYSTONE_DEPLOY=uwsgi

There's a lot of options to uwsgi. Here's some protips:
http://uwsgi-docs.readthedocs.org/en/latest/ThingsToKnow.html

Change-Id: If3b49879ce5181c16f0f0ab0db12fa55fe810a41
2016-02-15 08:45:22 -06:00
Jenkins
5073896cc9 Merge "Only use lsb_release for distro tags" 2016-02-14 14:42:43 +00:00
Jenkins
4723e618cc Merge "Don't die when yum fails." 2016-02-08 23:07:29 +00:00
Clark Boylan
e20cb43fd6 Set different cloud name for alt_demu user
Having multiple clouds with the same name in clouds.yaml confuses
openstack client config and it may not choose the intended cloud.
Unfortunately the new alt_demo user's clouds.yaml config used a
duplicate name creating confusion for clouds.yaml consumers.

Correct this by using a unique cloud name, devstack-alt, for use by the
alt_demo user.

Change-Id: I2cb8f10ab5abfedf76ead309f237730ce8ce2ad4
2016-02-05 12:00:18 -08:00
Sean Dague
c67d22e2ed make the alt_demo user during normal install
For testing reasons it's typically very useful to have a second non
admin user to cross check that it can't do a thing to the first
user. It was useful enough we always created it with tempest (though
we didn't always use it).

This makes devstack always create an alt_demo user, which is available
in occ as devstack-alt. This will help us unwind some of the keystone
v3 breaks with functional tests using keystone cli to build this
second user.

Change-Id: Iaaf02469180563e2d8c413fee0ee66ada2296cfa
2016-02-02 05:51:14 -05:00
Monty Taylor
74379df11f Remove leftover homedir clouds.yaml files
We don't write files here anymore, but it's higher in the precedence
order than the /etc/openstack/clouds.yaml file we do write. Some
developers who have long-lived devstacks who update infrequently have
been bitten by the leftover file.

Change-Id: I8af6bd465f74099c560dddba6b5221dd79cbc965
2016-01-21 10:20:08 -05:00
Federico Ressi
5dcbf7aeff Don't die when yum fails.
Not all yum failures has to be considered
catastrofic failures also because install_package
function should implement the same behavior in Fedora,
CentOS and Ubuntu. Let return the error to be solved at higher
level.

Change-Id: I93e9f312a94aeb086925e069a83ec1d3d3419423
Closes-Bug: #1522590
2016-01-20 09:06:55 +00:00
Jenkins
c461db4a2f Merge "Fix SIGITIN hang with apt-get" 2016-01-15 21:49:15 +00:00
Davanum Srinivas (dims)
ed9487a885 Revert "Don't die when yum fails."
This reverts commit 2babf3963f4eea8558b0c287c51e6faeb7069c70.

This breaks oslo.messaging jobs:
http://logs.openstack.org/32/265932/1/check/gate-oslo.messaging-dsvm-functional-amqp1-centos7/f5f3eb9/console.html#_2016-01-11_20_03_33_162

@kgiusti reports that PIPESTATUS[0] is always 1 on his centos7 box

Change-Id: I013c22a3545f22c79a0616b4a98622d41bb17d77
2016-01-12 18:57:37 +00:00
Ian Wienand
7710e7fc27 Only use lsb_release for distro tags
The existing GetOSVersion has a lot of unused code which is wrong in
several ways

 - the only path tested in upstream CI is with lsb_release, because
   it's pre-installed on all nodes

 - the /etc/redhat-release checking probably still works, but is
   unnecessary

 - If using lsb_release, os_UPDATE has never actually been set.

 - the /etc/SuSE-release branch checking is broken if the lsb package
   is actually installed.  lsb checking does not set os_UPDATE but yet
   the SuSE DISTRO setting relies on this to set a patch level (and so
   does some of the rpm tags).  SuSE 11 is up to update 3, but the rpm
   matching is stuck hard-coded to update 2.  I'm guessing
   installation is actually broken there.

 - the debian checking branch is broken.  The VERSION tags have been
   removed and were not supposed to be relied on anyway (see notes in
   [1])

This simplifies things:

 - remove OSX checking (moved here after discussions in
   I31d0fdd30928ecc8d959a95838b1d3affd28ac6f)

 - only use the output of lsb_release.

 - A small best-effort check to pre-install lsb packages if not
   detected (that avoids chicken-egg-problem of package-install
   wrappers relying on os_* flags).

 - The unset os_UPDATE is removed.  It's only previous use was for
   setting separate suse versions in the DISTRO element for matching
   during package installs (since removed)

 - DISTRO setting is modified to use the parts of os_RELEASE it wants.
   Per-above, this is the correct place to parse out specifics.

 - Call out the is_* functions, which are a better way to detect
   platforms

 - Export the variables as read-only, since they shouldn't be reset

[1] http://sources.debian.net/src/base-files/7.5/debian/changelog/

Change-Id: I46a2c36d95327087085df07cb797eb91249a893c
2016-01-12 09:23:35 +11:00
Jenkins
2cb3db338a Merge "Don't die when yum fails." 2016-01-11 17:01:33 +00:00
Jenkins
8df31a107d Merge "Assign admin role for admin user on default domain" 2016-01-09 07:49:35 +00:00