functions |
|
---|---|
Copyright 2015 Hewlett-Packard Development Company, L.P. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. functions - Grenade-specific functions The following variables are assumed to be defined by certain functions:
| |
Save trace setting | |
Include the common functions | |
just like source, except turn off tracing, as it just gets in the way | |
TODO: we'd really like to use the ping_check_functions that exist in devstack, however they are all wrapped up in lib/neutron gorp. Until that can be cleanly separated we need to keep our own copy here. ping_check_public $ip $timeout [False] - ping an machine on a public ip address. Should work with either neutron or nova-net. Also works to ensure the guest is not up if you pass False as last parameter. | |
Dump Console log if ping fails | |
save_data() dumps service datastores into SAVE_DIR for base or target release. | |
Setup Exit Traps for debug purposes | |
really important that this is the first line in this function, otherwise we corrupt the exit code | |
we don't need tracing during this | |
we have to turn off errexit at this point, otherwise we're going to exit from this function early when the while caller ends (with a bad exit) | |
unwind the call stack on failures | |
unset the constraints as it might have been set earlier by base or target test run | |
NOTE(yoctozepto): Grenade does not know about TEMPEST_VENV_UPPER_CONSTRAINTS, only DevStack does. This sources that one variable from it. | |
NOTE(gmann): If gate explicitly set the non master constraints to use for Tempest venv then use the same while running the tests too otherwise, it will recreate the Tempest venv due to constraints mismatch. recreation of Tempest venv can flush the initially installed tempest plugins and their deps. | |
NOTE: setting both tox env var and once Tempest start using new var TOX_CONSTRAINTS_FILE then we can remove the old one. | |
NOTE(gmann): we need to set the below env var pointing to master constraints even that is what default in tox.ini. Otherwise it can create the issue for grenade run where old and new devstack can have different tempest (old and master) to install. For detail problem, refer to the https://bugs.launchpad.net/devstack/+bug/2003993 | |
Force a shorter connect timeout, if networking has gone off the rails we could potentially be hanging around for minutes on every ssh attempt due to TCP timeouts/retries. Don't check or store host keys, which makes it easier for local dev when hosts come and go. Auto-accept whatever we connect to | |
Restore xtrace | |