302 Commits

Author SHA1 Message Date
Ihar Hrachyshka
7b5c7dce53 Introduce PUBLIC_BRIDGE_MTU variable to set br-ex MTU
This variable can be used to accommodate for underlying infrastructure
that does not provide full 1500-sized traffic, or maybe instead gives
access to Jumbo frames.

Change-Id: I38a80bac18673a30842a7b997d0669fed5aff976
Related-Bug: #1603268
2016-07-17 00:14:43 +02:00
Jenkins
06ba4fb98b Merge "ploop: specify hypervisor_type=vz property for ploop images" 2016-07-11 23:38:55 +00:00
Jenkins
fb50134272 Merge "Modify the image property for aarch64" 2016-07-11 23:35:30 +00:00
Maxim Nestratov
d565d62efe ploop: specify hypervisor_type=vz property for ploop images
This is necessary to make it possible to filter out compute nodes,
which don't support such type of images.

Change-Id: I347953876e2057e6f3dca71c2f5e8b638b85aaf8
2016-07-11 22:37:13 +03:00
Kevin Zhao
a9cc38a198 Modify the image property for aarch64
In Aarch64, the default cdrom bus is scsi, and the default scsi
controller is virtio-scsi. The cdrom with virtio bus will not be
recognized by the instance.

Change-Id: Ib8cec79f9e9083239092fa7348793ee3b64a9c94
Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
2016-06-24 04:48:33 -04:00
Rob Crittenden
21e3d1e55b Make wait_for_service more robust by checking HTTP response
wait_for_service just checked to see if the remote service
was started, not that it was returning data. This caused
problems when the service was behind a proxy because the
proxy would respond quickly but the service may not have
fully started.

Wait for a non-503 HTTP response code and non-7 exit code
(connection error) from curl

Return an error if a successful connection cannot be made.

Change-Id: I059a12b1b920f703f28aca0e2f352714118dee97
2016-06-17 15:29:54 -04:00
Brian Haley
09604349f8 Change ovs_base neutron plugin to use vercmp
This plugin was using a deprecated function, vercmp_numbers(),
that wasn't actually working properly because the call to
'deprecated' at the beginning was causing garbage to be
returned to the caller.  For example, this was always in
stack.sh.log when using OVS:

.../lib/neutron_plugins/ovs_base: line 57: [: too many arguments

Update to use vercmp() like all other users in devstack, and
remove all the old code.

Change-Id: I352362cf59e492fa9f7725190f0243f2436ac347
2016-06-02 10:33:54 -04:00
Jenkins
1441242fcc Merge "Support decompressing bz2 image" 2016-05-19 01:07:39 +00:00
Jenkins
37f6ea619e Merge "Export the 'short_source' function & don't keep PS4 in sudo" 2016-05-10 21:42:54 +00:00
Hongbin Lu
3feceb0e4a Support decompressing bz2 image
CoreOS cloud image is compressed with bz2 extension [1]. In such
case, we need to decompress the image before uploading it to glance.

[1] https://coreos.com/os/docs/latest/booting-on-openstack.html

Change-Id: I705d0813d180aefaa2507c00d1ae40af07d12fcf
2016-05-06 21:07:18 -04:00
John L. Villalovos
daa7a41e21 Export the 'short_source' function & don't keep PS4 in sudo
Export the 'short_source' function so that it will be present in the
environment for child shell scripts. Do this because we are passing PS4
to the child shell scripts and it is using 'short_source'

Don't do an 'env_keep' in the sudoers file for PS4, since it is
difficult to also pass along the 'short_source' function.

Change-Id: I9781010d6eb336d02939c7fd47f18bedeae5ccc6
Closes-Bug: #1563443
2016-05-06 10:50:58 -07:00
Victor Ryzhenkin
878d7d8f13 Adjust region name for images, networks and volumes during deployment
In a multiregion installation of devstack, conflicts occur in the
creation of images, networks, or volume types, when the region is not
set.

This patch adjusts commands to include the region, and
also adjusts the region_name in the nova configuration section of
neutron.conf to include the region.

Change-Id: Ifedff6a124fa49d57cc7b2f35916d8d96f5e5f7a
2016-04-28 15:13:58 +00:00
Sean Dague
646085d701 Add colorful PS4
PS4 can include functions, so when running in the LOG_COLORS=True mode
provide a grey function line so that it's easier to visually
distinguish the content from the location.

Also make it so the main prompt chunks off all the common path, which
means we can printf to 40 characters and have a pretty reasonable and
readable PS4.

Change-Id: I4a10a49db97d413349bcfceeb8c4164936fbcc40
2016-03-23 07:37:44 -04:00
Jenkins
c3c91c4267 Merge "Minor fixes for bashate trunk" 2016-02-24 20:04:55 +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
Rafael Folco
72f530fd7a Set default properties for Power: virtual console and scsi driver
This patch enables the virtual console for Power systems /dev/hvc0
and sets scsi bus and virtio-scsi model as default.
The virtual console hvc0 enables full console including dmesg.
High performance virtio-scsi driver keeps the efficient design of
virtio-blk with effective SCSI passthrough.

Change-Id: I0b5cd4a15d30f06fc7993555d91d6907bd1acbd7
2016-02-11 05:47:41 -06:00
Jenkins
2d02d29e27 Merge "Add vercmp function" 2016-01-29 05:21:09 +00:00
Atsushi SAKAI
2ca8af45a7 Add 5 time measurement points
run_process           process starting time
test_with_retry       process starting time (for neutron legacy)
restart_apache_server Apache HTTPD restart time
wait_for_service      HTTP server waiting time
git_timed             git command execution time

example

========================
DevStack Components Timed
========================

run_process - 52 secs
test_with_retry - 3 secs
apt-get-update - 8 secs
pip_install - 76 secs
restart_apache_server - 9 secs
wait_for_service - 11 secs
git_timed - 127 secs
apt-get - 15 secs

Change-Id: I66140726617450cd9fe9b702092cacf053a20065
2015-12-17 20:28:54 +09:00
Ian Wienand
523f488036 Namespace XTRACE commands
I noticed this when debugging some grenade issues failures.

An include of grenade/functions stores the current value of XTRACE
(on) and disables xtrace for the rest of the import.

We then include devstack's "functions" library, which now overwrites
the stored value of XTRACE the current state; i.e. disabled.

When it finishes it restores the prior state (disabled), and then
grenade restores the same value of XTRACE (disabled).

The result is that xtrace is incorrectly disabled until the next time
it just happens to be turned on.

The solution is to name-space the store of the current-value of xtrace
so when we finish sourcing a file, we always restore the tracing value
to what it was when we entered.

Some files had already discovered this.  In general there is
inconsistency around the setting of the variable, and a lot of obvious
copy-paste.  This brings consistency across all files by using
_XTRACE_* prefixes for the sotre/restore of tracing values.

Change-Id: Iba7739eada5711d9c269cb4127fa712e9f961695
2015-11-27 15:36:04 +11:00
Ian Wienand
2ba36cda79 Add vercmp function
The existing vercmp_numbers function only handles, as the name says,
numbers.  I noticed that "sort" has had a version sort for a long time
[1] and, rather than re-implement it badly, use this as a version of
vercmp that works a bit more naturally.

This is intended to be used in an "if" statement as in

  prog_ver=$(prog_ver --version | grep ...)
  if vercmp $prog_ver "<" 2.0; then
     ...
  fi

A test-case is added to test the basic features and some edge-cases.

[1] http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=4c9fae4e97d95a9f89d1399a8aeb03051f0fec96

Change-Id: Ie55283acdc40a095b80b2631a55310072883ad0d
2015-11-19 09:37:33 +11:00
Atsushi SAKAI
33c9a67ead Fix typos on three comments and one message
Fixes typos on three comments and one message
in functions/functions-common

Change-Id: I2c926ca29b284afd4534b92860fa46f248676a83
2015-11-12 19:53:06 +09:00
Jenkins
d111182f21 Merge "Don't mix declaration and set of locals" 2015-10-14 02:43:52 +00:00
Sean Dague
72ad942796 use deprecated function instead of modifying global
It's safer to run this through a common function to let us make
changes later.

Change-Id: Ic661824027577e1946726c1843a29ac8325915bf
2015-10-07 15:15:16 -04:00
Ian Wienand
ada886dd43 Don't mix declaration and set of locals
Ia0957b47187c3dcadd46154b17022c4213781112 proposes to have bashate
find instances of setting a local value.  The issue is that "local"
always returns 0, thus hiding any failure in the commands running to
set the variable.

This is an automated replacement of such instances

Depends-On: I676c805e8f0401f75cc5367eee83b3d880cdef81
Change-Id: I9c8912a8fd596535589b207d7fc553b9d951d3fe
2015-10-07 17:03:32 +11:00
Peter Stachowski
5aeea6ae3e Removed unused TOKEN from upload_image
Changeset https://review.openstack.org/#/c/225426/ changed how images
were uploaded into Glance, however the (now) unused TOKEN variable
and function argument to upload_image remained.

These have been removed.

Change-Id: I9910c469f72d52e56111048cc24ea3c992c1d480
2015-09-22 19:40:40 +00:00
Monty Taylor
31c313d3a3 Use normal API not token/endpoint for image uploads
There is no reason to use keystone token bootstrapping for image
uploads. Glance is a service, and images can be uploaded to it normally
without special shenanigans.

Depends-On: If7b81c4a6746c8a1eb0302c96e045fb0f457d67b
Change-Id: I7092fb10cbe243e091789134263fab081af0c7f4
2015-09-21 15:45:33 -05:00
Jenkins
4d223251e8 Merge "Add header guard to functions/functions-common" 2015-08-17 19:38:05 +00:00
Maxim Nestratov
54ee8a82a8 Make it possible to upload ploop images
Add support of ploop images (*.hds extension) for both exe and hvm types.
In devstack we assume that images have '-exe' and '-hvm' suffixes in
their names correspondently.

Change-Id: I1c074876c530be0535a6e02e764d67a4ebcbbbe5
2015-07-15 11:53:12 +03:00
Ian Wienand
4ffb454145 Add header guard to functions/functions-common
To avoid sourcing this twice and getting globals mixed up,
particularly when using multiple plugins, add a "header guard" that
ensures we only source it once.

In general I don't think functions/functions-common have been written
or considered to be idempotent.  I don't think going down that path is
going to be a long-term solution as it's easy to break.

Change-Id: Idca49eb996d2b7ff3779ec27ed672a2da7852590
Closes-Bug: #1469178
2015-06-30 13:48:53 +10:00
Jenkins
9aad1b99fd Merge "refactor ping_check" 2015-04-20 13:39:33 +00:00
Sean Dague
af9bf8663b refactor ping_check
Encapsulate all the neutron specific things you have to do ping a
neutron guest into a separate script. Refactor the main ping_check so
all logic is contained within it.

Change-Id: Ic79d8e3a2473b978551a5635a11dba07e1020bb2
2015-04-17 07:39:28 -04:00
Clark Laughlin
fcc3f6ee98 Add support for arm64 images
This patch enables proper support for arm64 images by disabling VNC support
and adding several properties to the image in glance that are necessary to
boot correctly:
  hw_cdrom_bus=virtio
  hw_machine_type=virt
  os_command_line='console=ttyAMA0'

Change-Id: I68c9a5e0e083af2f92875c3bdf70df750f6e4d8f
2015-04-09 08:55:56 +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
dc97cb71e8 Mostly docs cleanups
Fix documentation build errors and RST formatting

Change-Id: Id93153400c5b069dd9d772381558c7085f64c207
2015-03-28 14:35:12 -05: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
sridhargaddam
b5ab6468c9 Fix curl issue when SERVICE_HOST is defined to IPv6 address
When SERVICE_HOST is defined to literal IPv6 address
(i.e., [fdf8:f53b:82e4::179]) we will have to include
--globoff option for curl to be able to reach the various
openstack services. Using globoff works for both IPv6 and
IPv4 urls, so its safe to include this option for all curl
statements in devstack.

Closes-Bug: #1424943
Change-Id: I2afc16f2f94d7d7069b0ba61bc8348c03413e4e7
2015-03-02 07:42:36 +00: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
Sean Dague
537532931d Make changes such that -o nounset runs
This makes a bunch of variable cleanups that will let -o nounset
function, for the time being we hide nounset behind another setting
variable so that it's not on by default.

Because this is bash, and things are only executed on demand, this
probably only works in the config it was run in. Expect cleaning up
all the paths to be something that takes quite a while.

This also includes a new set of unit tests around the trueorfalse
function, because my change in how it worked, didn't. Tests are good
m'kay.

Change-Id: I71a896623ea9e1f042a73dc0678ce85acf0dc87d
2015-01-15 13:06:14 -05:00
Attila Fazekas
057d6ae225 wget less verbose
wget is too verbose in devstack logs [1] on image download.

Changing the progress bar style to giga, in order
to be less verbose.

http://logs.openstack.org/73/146573/2/check/
check-tempest-dsvm-full-juno/41ba988/logs/devstacklog.txt.gz#_2015-01-13_11_34_15_330

Change-Id: Ic5304893f4c97c50e7a2f29ad5cd77dba3d5a9dd
2015-01-13 14:01:26 +01:00
Jenkins
d09a1db5a4 Merge "add shebang lines to all lib files" 2014-12-10 20:32:15 +00:00
Sean Dague
e263c82e48 add shebang lines to all lib files
With gerrit 2.8, and the new change screen, this will trigger syntax
highlighting in gerrit. Thus making reviewing code a lot nicer.

Change-Id: Id238748417ffab53e02d59413dba66f61e724383
2014-12-10 11:28:05 -05:00
Sabari Kumar Murugesan
88cde0b3da VMware: add default image metadata for hw_vif_model
During glance image-create we are currently setting a null value
for the hw_vif_model, if we are unable to introspect from the vmdk
file.

This patch adds a default value if not found.

Change-Id: I6d0f551b18f03e2a799ae14c3347652a285693f0
2014-12-04 20:33:41 -08:00
Jenkins
e5dbec252a Merge "Fix docs build errors" 2014-10-08 22:14:51 +00:00
Dean Troyer
3324f19f5a Fix docs build errors
Fix shocco errors during docs generation

Closes-Bug: 1362691
Change-Id: I2b7fb008c89f0b4e7280b2d0a054320765e83e47
2014-10-02 15:30:50 -05:00
Joe Gordon
944b28280b Drop workaround for pip < 1.4
Now that we are on pip 1.5.6 lets drop the workaround to make pip 1.4
work. As this is a development/testing tool requiring a newer pip
shouldn't be an issue. Also stack.sh installs pip by default.

Work around introduced in https://github.com/pypa/pip/issues/709

Change-Id: I0e7aad1d21f4fce4c020ce36685bb56893c66bdc
2014-10-01 19:52:23 -07:00
Rob Crittenden
18d4778cf7 Configure endpoints to use SSL natively or via proxy
Configure nova, cinder, glance, swift and neutron to use SSL
on the endpoints using either SSL natively or via a TLS proxy
using stud.

To enable SSL via proxy, in local.conf add

ENABLED_SERVICES+=,tls-proxy

This will create a new test root CA, a subordinate CA and an SSL
server cert. It uses the value of hostname -f for the certificate
subject. The CA certicates are also added to the system CA bundle.

To enable SSL natively, in local.conf add:

USE_SSL=True

Native SSL by default will also use the devstack-generate root and
subordinate CA.

You can override this on a per-service basis by setting

<SERVICE>_SSL_CERT=/path/to/cert
<SERVICE>_SSL_KEY=/path/to/key
<SERVICE>_SSL_PATH=/path/to/ca

You should also set SERVICE_HOST to the FQDN of the host. This
value defaults to the host IP address.

Change-Id: I36fe56c063ca921131ad98439bd452cb135916ac
Closes-Bug: 1328226
2014-09-24 18:36:37 -04:00
Noboru Iwamatsu
b4495eb410 Use mod_version to clean-up apache version matching
This change uses mod_version (shipped by default on everything we care
about) to set-up version-specific config within apache rather than
within devstack scripts.

Clean up the horizon and keystone config file generation to use the
internal apache matching.

Since I6478db385fda2fa1c75ced12d3e886b2e1152852 the apache matching in
'functions' is actually duplicated.  just leave get_apache_version in
lib/apache as it is used for config-file name matching in there.

Change-Id: I6478db385fda2fa1c75ced12d3e886b2e1152852
2014-09-08 15:59:29 +10:00
Jenkins
a3ecab6618 Merge "Modify glance image-create commands to use openstackclient" 2014-08-15 00:50:41 +00:00
Alessandro Pilotti
ca8239449f Adds support for Hyper-V image formats
Adds support for VHD and VHDX image formats, including gz compression.

Change-Id: I9b143c9883b947397b435a671f13703f78019d23
Closes-bug: #1353726
2014-08-07 19:30:34 +03:00
Steve Martinelli
8d3ac2df58 Modify glance image-create commands to use openstackclient
Change `glance image-create` commands to use `openstack image create`,
in an effort to unify the CLI.

Change-Id: I96cef118daf931b648c0483525ac7d2287fec2e0
2014-08-02 23:47:15 -04:00