252 Commits

Author SHA1 Message Date
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
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
John L. Villalovos
f568c3a141 Fix SIGITIN hang with apt-get
Fix an issue where apt-get consistently hangs due to a SIGTTIN being
received. This occurs on a 'vanilla' devstack-gate VM, when running an
ironic-grenade job.

Upstream has a bug related to this:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=555632

http://www.gnu.org/software/libc/manual/html_node/Job-Control-Signals.html
Macro: int SIGTTIN

    A process cannot read from the user's terminal while it is running
    as a background job. When any process in a background job tries to
    read from the terminal, all of the processes in the job are sent a
    SIGTTIN signal. The default action for this signal is to stop the
    process. For more information about how this interacts with the
    terminal driver, see Access to the Terminal.

Change-Id: I8b1f3dccf329bb88e017eff7492da5e701b4892c
Closes-Bug: #1532080
2016-01-08 15:01:05 -08:00
Federico Ressi
2babf3963f 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: Ia33bb98f47017f6ec00eb3b7261ed42d72efc573
Closes-Bug: #1522590
2016-01-08 15:30:02 +00:00
Federico Ressi
ecc1f41d50 Don't reinstall package just after installing.
Boolean logic used in install_package was wrong:
on nominal flow packages were actually installed twice.
This should fix it.

Change-Id: Ia465414936b272d04523a11f83d6ded378fe1daf
Closes-Bug: #1518544
2016-01-08 15:29:16 +00:00
Jenkins
7792bd2025 Merge "Remove uses of --os-url and --os-token" 2016-01-08 07:23:41 +00:00
Alexander Schmidt
a5ea08b752 Add distro support for KVM for IBM z Systems
Add "KVM for IBM z Systems" to the list of Fedora-like distros.

As the distribution does not have a dedicated kvm package,
prevent the installation of the kvm package during the libvirt
setup.

Change-Id: Ibb5c60797d6867264f9dea7fea85cdf1d7c72ded
2016-01-07 10:14:39 +01:00
Jenkins
feb2babd07 Merge "Make logfile symlinks with relative names." 2016-01-06 18:28:26 +00:00
Jenkins
c6dbfdeb6b Merge "Add 5 time measurement points" 2016-01-05 19:24:10 +00:00
Federico Ressi
e208d060e1 Preserve result returned by apt-get and pip
Change I855ffe9c7a75e9943106af0f70cf715c34ae25c5 and
I368fec44858bd97fc6a314fb20eed2b10932cbb1 added timing
infrastructure which hides the return value of
the main commands.  Restore the prior behaviour.

Change-Id: I4a536abefa7824ac6d42e7bbbf1079d9cc055984
Closes-Bug: #1518545
2016-01-05 08:21:05 +00:00
Jenkins
85c466c2d7 Merge "Fix get_plugin_packages when multiple plugins are in use" 2016-01-05 04:55:21 +00:00
Monty Taylor
f73263d47a Remove uses of --os-url and --os-token
Those were originally used to bootstrap with admin-token from keystone,
but the openstack client is fully configured now, leaving no reason to
not just use the actual users that are there.

Change-Id: I80bdee33a78a97f5d3910aa36dc331f19780d2f1
2016-01-04 09:12:05 -06:00
Jenkins
227f20ceb2 Merge "update create_heat_accounts, don't use os_url and os_token" 2016-01-04 13:59:56 +00:00
Dmitry Tantsur
5979f47a3d Fix get_plugin_packages when multiple plugins are in use
Due to missing space no plugin packages are installed in this case.

Change-Id: I56b105510e4d31a411f2531fdb20c4ddf1ebff20
Closes-Bug: #1530675
2016-01-04 11:53:31 +01:00
Steve Martinelli
4ce859ab2b update create_heat_accounts, don't use os_url and os_token
Currently, the function create_heat_accounts uses the OS_URL and
OS_TOKEN environment variables. This is a bad choice for several
reasons, most importantly we are sending the "ADMIN_TOKEN" value
as a header. There is also no reason to not use a standard admin
user to create these resources.

Change-Id: I70b41d69917b9e53ad09c2c61e022ef09a50acfd
2015-12-20 01:27:30 -05:00
Jim Rollenhagen
47367071cd Remove ironic code from tree
This removes all of the ironic code from the devstack tree, in favor of
the devstack plugin in Ironic's tree.

Depends-On: I659e3de5c64df798441798ff48ba5c9c0506585a
Depends-On: I2c52bc014f1b0dbc6b0ae22a4deb4132b4c28621
Change-Id: I5125fce295c79600781469c2f48bea80e7600081
2015-12-18 17:26:02 +02: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
Jenkins
fe25a2a734 Merge "remove generic extras.d support" 2015-12-15 12:47:54 +00:00
Philipp Marek
af0801de3c Make logfile symlinks with relative names.
Using absolute names for the symlink breaks in quite a few ways;
 * when creating a tar file of the logs,
 * when serving via NFS,

or any other case where the directory gets transferred to
a different machine.

So just create the symlink with relative names, then they'll work
in any location.

Change-Id: I432a69754985fc71feb0068b7adca01066d7bc1b
2015-12-09 13:52:05 +01:00
Sean Dague
41d01104b1 remove generic extras.d support
This removes the generic extras.d support, which we said we'd do at
Mitaka-1. In tree extras.d continues to function as before, though we
need stories to get ceph and ironic into plugins, and a better
solution for Tempest.

Change-Id: I8b134446dc08a2c3852423ca71af2f469f85496e
2015-12-03 08:12:23 -05:00
Sean Dague
88ee8ce468 create apt_get_update to try to work around broken mirrors
Ubuntu's apt mirroring mechanism produces inconsistent mirrors pretty
regularly. The devstack-gate apt-get update model seems to have been
more effective getting past this than what we did in devstack. Adopt
that method for our updates.

Change-Id: I97c7896ef38b275aacb4f933fc849acee1bab858
2015-12-03 07:44:15 -05: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
Jenkins
3bc6f042e4 Merge "Remove multi-region workaround" 2015-11-16 05:15:49 +00:00
Jenkins
0f1a4aba5e Merge "Fix typos on three comments and one message" 2015-11-12 22:06:23 +00: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
Tony Breeds
9329290183 Update comments to reflect current USE_SCREEN usage
In a couple of places the tracking of USE_SCREEN has drifted from the
comments.

Correct that.

Change-Id: I63bdd5ca4de49bf653f5bc8f8e0e5efe67ef605c
2015-11-12 09:56:21 +11:00
Jenkins
7eaeefac80 Merge "Allow screen without logging to disk" 2015-11-11 05:13:07 +00:00
Jenkins
6a9641753c Merge "Add check for get_packages argument" 2015-11-10 22:04:51 +00:00
Tony Breeds
536b8c1d2c Allow screen without logging to disk
In some niche setups it is desirable to run OpenStack services under
screen, but undesirable to automatically keep a persistent log from
each service.

Add a new variable SCREEN_IS_LOGGING that controls if screen logs each
window to disk automatically.

Ideally screen itself would be configured to log but just not activate.
This isn't possible with the screerc syntax.  Temporary logging can still
be used by a developer with:
    C-a : logfile foo
    C-a : log on

Change-Id: I2a3abf15dea95ae99ddbdfe1309382df601b7d93
2015-11-11 06:21:45 +11:00
Jenkins
fff4d8ef9d Merge "Write clouds.yaml to only /etc" 2015-11-09 18:37:15 +00:00
Ian Wienand
7d515b5db8 Add check for get_packages argument
Add a quick check so we don't reintroduce bad arguments as in
Ie1b8d09369281059d21da61b2725a457f708ae9e

Change-Id: Ibebc71791f2743eef64d6f7c2596d54a73ea92aa
2015-11-09 15:04:32 +11:00
Jenkins
6b0a3c6745 Merge "Turn off tracing for service functions" 2015-11-05 21:46:38 +00:00
Daniel Gonzalez
0ec8080273 Remove multi-region workaround
When keystone API v3 was introduced, filtering regions when listing
endpoints was not supported (see [1]). This caused multi-region devstack
deployments to fail (see [2]). A workaround was introduced to devstack
to enable for multi-region deployments until region filtering would work
in keystone API v3.
Now that the bug related to region filtering in keystone is resolved,
the workaround should be removed.

[1]: https://bugs.launchpad.net/keystone/+bug/1482772
[2]: https://bugs.launchpad.net/devstack/+bug/1483784

Closes-Bug: #1511745
Related-Bug: #1483784
Related-Bug: #1482772
Change-Id: I52d13c3f5e7b77a7f8fb1be4dcea437988ebddfe
2015-10-30 15:01:46 +01:00
Jenkins
2cee71865f Merge "Remove sudo from mkdir in $STACK_USER folder" 2015-10-29 05:04:55 +00:00
Ian Wienand
5cdee8dd33 Update to bashate 0.3.2
Bashate 0.3.2 has a few new checks -- firstly make sure some of the
plugins have #!/bin/bash, and fix up a couple of "local" changes that
were missed by I9c8912a8fd596535589b207d7fc553b9d951d3fe

Change-Id: I9e4b1c0dc9e0f709d8e76f9c9bf1c9478b2605ed
2015-10-29 11:30:20 +11:00
Monty Taylor
ee9bb76647 Write clouds.yaml to only /etc
After having migrated the copies of clouds.yaml to just consume from
/etc, remove the duplicate copy.

Change-Id: I036704734785958c95d2234917d7b40bd797a375
2015-10-28 14:28:28 +11:00
Lenny Verkhovsky
313ddaee61 Remove sudo from mkdir in $STACK_USER folder
This fails in the environment where sudo does not have permissions to
write in /home/$USER folder, e.g. [1]

Also clean-up the comment/variable usage a bit; the location isn't
actually variable at all (and that's fine, but we don't need a global
here)

[1] http://144.76.193.39/ci-artifacts/228979/10/Nova-ML2-Sriov/console.html.gz

Change-Id: I6807eae9d1c27219aa7c19de29f24fa851aa787c
2015-10-28 12:18:24 +11:00
Monty Taylor
8f385dde22 Write clouds.yaml to /etc as well
There are more than one user that need to access clouds.yaml values
in tests. Rather than copying the file everywhere, simply output
it to /etc/openstack.

However, we have things copying it at the moment, so output to
both places. A follow up patch will remove the homedir version.

Change-Id: I21d3c2ad7a020a5ab02dc1ab532feae70b718892
2015-10-20 11:54:00 +11:00
Jenkins
6e9bee1ae5 Merge "Detect blank variable in trueorfalse" 2015-10-15 02:56:19 +00:00
Ian Wienand
8043bfaf5e Turn off tracing for service functions
These functions commonly externally called (as part of stackrc
inclusion, even) and do a fair bit of iteration over long
service-lists, which really fills up the logs of devstack and grenade
with unnecessary details.

The functions are well tested by unit-tests, so we are very unlikely
to need to debug internal issues with them in a hurry.  Thus turn
logging down for them.

Change-Id: I63b9a05a0678c7e0c7012f6d768c29fd67f090d2
2015-10-14 16:36:08 +11:00
Jenkins
d111182f21 Merge "Don't mix declaration and set of locals" 2015-10-14 02:43:52 +00:00
Sean Dague
95c33d532f add timing infrastructure to devstack
this adds a timing infrastructure to devstack to account for time
taken up by set of operations. The first instance of this is
accounting the time taken up by doing apt_get calls.

Change-Id: I855ffe9c7a75e9943106af0f70cf715c34ae25c5
2015-10-12 23:08:56 +00:00
Dmitry Tantsur
64be3210e6 Don't assume that $i variable won't be overriden in extras.d plugins
This causes an incorrect warning about ironic jobs putting an unexpected
file in extras.d.

Change-Id: I57acf91fba3fe13b3cc8dd739034e146a0b237c4
2015-10-12 13:36:30 +02:00