229 Commits

Author SHA1 Message Date
Jenkins
227f20ceb2 Merge "update create_heat_accounts, don't use os_url and os_token" 2016-01-04 13:59:56 +00: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
Jenkins
fe25a2a734 Merge "remove generic extras.d support" 2015-12-15 12:47:54 +00: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
Chris Dent
c6d470142e Perform additional disable_service checks
With the advent of plugins and their settings files it has become
possible to disable_service in local.conf only to have the service
re-enabled in a plugin settings file. This happens because of
processing order.

To get around this the disable_service function now aggregates
service names into a DISABLED_SERVICES variable which is then checked
during enable_service. If something tries to enable something that
was previously disabled, a warning is produced in the log and the
service is not enabled.

Then after all configuration has been sourced a final check is to
done by verify_disabled_services to confirm that something has not
manually adjusted ENABLED_SERVICES to overcome a previously called
disable_service. If something has, the stack dies with an error.

Change-Id: I0f9403f44ed2fe693a46cd02486bd94043ce6b1a
Closes-Bug: #1504304
2015-10-09 16:34:32 +00:00
Ian Wienand
e82bac0498 Detect blank variable in trueorfalse
As a follow-on to I8cefb58f49dcd2cb2def8a5071d0892af520e7f7, put in
some detection around missing variable-to-test arguments in
trueorfalse.

Correct a couple of places where we were passing in blank strings,
resulting in the default always being applied.

Add test-cases and enhance the documentation a little.

Depends-On: I8cefb58f49dcd2cb2def8a5071d0892af520e7f7
Change-Id: Icc0eb3808a2b6583828d8c47f0af4181e7e2c75a
2015-10-09 19:07:50 +11:00
Jenkins
e3fe3fd838 Merge "Don't set xtrace directly in local call" 2015-10-08 11:45:17 +00:00
Jenkins
d111c2174e Merge "add big warning for extras.d usage" 2015-10-08 05:42:48 +00:00
Jenkins
17491f37d7 Merge "Revert "Revert "Convert identity defaults to keystone v3 api""" 2015-10-07 19:30:18 +00:00
Sean Dague
1de9e330de add big warning for extras.d usage
This adds a warning for extras.d usage. This will give us something to
keep an eye on in logstash to build up the list of projects that will
break at Mitaka-1.

This also makes the deprecated handling done through a function, which
will hopefully make it more consistent in the future.

Change-Id: Icd393bc3e7095fe58be0fd13ef74fece3aa5c5f1
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
Ian Wienand
433a9b10dd Don't set xtrace directly in local call
Ia0957b47187c3dcadd46154b17022c4213781112 detects setting local
variables with subshell commands.

Although this is a particuarly benign case, it trips the test.  Rather
than putting in an ignore for this, we can easily change it to make
the test pass.  This seems better than putting in special work-arounds
to bashate, etc.

Change-Id: I37c3967c0f2d780a636a7d26cda83755085c5c69
2015-10-07 16:54:29 +11:00
Dan Smith
ce7246a34b Workaround potential failure to shutdown services
Kill them twice to make sure they're good'n'dead. There is a supposed
fix to oslo-incubator code, but we're working around that here in the
meantime with this change.

This returned in Liberty.

Change-Id: I02a7af995dc7de857c4efcf2cef2f95d357c007a
Related-Bug: #1446583
(cherry picked from commit 953baa7998f253681ed31013fd18bd8aa8098b34)
2015-10-02 06:27:43 -04:00
Steve Martinelli
050a0d5b30 Revert "Revert "Convert identity defaults to keystone v3 api""
This reverts commit f768787bdd6dddf2790f83a884618d29677ca77c.
And sets OS_AUTH_VERSION so swift CLI doesn't fall flat when
not using v2 keystone

Change-Id: If44a7e0d85e48020a3c90d8c5c027513129f0f3b
2015-09-29 19:52:28 +00:00
Jenkins
f5255eb1c7 Merge "Improve ERROR_ON_CLONE message" 2015-09-28 21:06:08 +00:00
Jenkins
dae0e463b8 Merge "Fix return value of get_or_add_user_project_role" 2015-09-28 21:05:58 +00:00
Jenkins
f845b22a45 Merge "Remove ceilometer in favor of plugin" 2015-09-28 17:49:32 +00:00
James E. Blair
ebe63d826b Improve ERROR_ON_CLONE message
In case ERROR_ON_CLONE is true and triggers a failure for a missing
project, suggest a remedial action.  On their own, people have
come up with remedies that include altering the value of ERROR_ON_CLONE
which rather defeats the purpose.

Change-Id: I28d7f2c184f8440b774fefaa8ec7002d6708db95
2015-09-24 09:26:01 -07:00
Roxana Gherle
50821bed08 Fix return value of get_or_add_user_project_role
get_or_add_user_project_role function was always returning an
empty user_role_id because the role assignment command does not
return any output. Added a command to get the user_role_id after
the assignment happens.

Closes-Bug: #1498599
Change-Id: If1b77eef0d4f0ebdcdf761ecb5e2011484f73871
2015-09-22 11:11:36 -07:00
Jenkins
debd216a73 Merge "Fix is_service_enabled when using multiple arguments" 2015-09-22 13:03:54 +00:00
Jenkins
c64b16ce7f Merge "Fix typo: falure => failure" 2015-09-22 07:18:01 +00:00
Monty Taylor
7224eecb98 Extract writing clouds.yaml to function
It's a bit wordy to be directly in stack.sh and not in a function.

Change-Id: Ibddfd8018d861191f1b1dc3270e0e81c274733cd
2015-09-21 15:45:23 -05:00
Wei Jiangang
e3340f1fe6 Fix typo: falure => failure
Change-Id: Ic1a53eec71d5e20194505aa8655a99b2fedd7632
2015-09-21 17:53:08 +08:00
Christian Schwede
3db0aad63c Fix is_service_enabled when using multiple arguments
is_service_enabled might actually fail to return the expected result if
there is a is_${service}_enabled function available and multiple
services are checked.

For example, if one defines swift as a service but disables glance, the
following check fails:

 if is_service_enabled swift glance horizon; then
     install_swiftclient
 fi

This is because the second for-iteration resets the local "enabled" var
again to 1 and finally exits with 1 as a return code.

This patch fixes this.

Change-Id: Ic76b72897efe9597d1412470353895001a1a4c66
2015-09-10 11:31:55 +00:00
Chris Dent
e9a4750fe1 Remove ceilometer in favor of plugin
The ceilometer project is moving to using a devstack plugin rather
than having ceilometer in the base devstack. This is to allow
greater control and flexibility.

Change-Id: I413ab159474b7d7231ad66d3a482201f74efe8a8
2015-09-09 16:44:29 +00:00
Lucas Alvares Gomes
f768787bdd Revert "Convert identity defaults to keystone v3 api"
This change have broke the Ironic tests. Reverting to unblock the Ironic
gate.

This reverts commit 4b115ad526df7e12bbdc71e0280b3c691e53ed04.

Closes-Bug: #1492216
Change-Id: I03acfdf47caf435cede1df08fd79b288a6662435
2015-09-04 15:35:01 +01:00