Updating a stack where the only resource needs replacement but is
restricted from being replaced is *very* fast. Since the test framework
relies on seeing a change in the updated_time timestamp, which has only 1s
resolution, it can easily be missed causing the test to timeout. This adds
a 1s sleep between updates that have the same expected status to ensure
that the timestamp changes.
Change-Id: Ief845a21108e925325b1b3e8f090038ccdf73b8e
Closes-Bug: #1554375
Related-Bug: #1583630
This allows admin super user (user with admin role in admin_project)
to do stack operations across all projects.
Change-Id: Ifbf56fde02b89248ee788e6a212ef9d11e665dc0
Partial-Bug: #1466694
We seem to be running all jobs with convergence
enabled. We should run the orig jobs without
convergence.
Change-Id: I0dfdc319c25e5eb1da15eea83b5e77ee44c44461
Depends-On: I775fe499546ae8adfd2a8a1c062b5754ab71b50c
We don't seem to be passing the right env to test_replace,
when we want to test with both update and replace restricted.
Change-Id: I895389c1727321f328e6b7bd7c712796257993f1
Fix some integration tests checking port behavior, as the assumptions we
were making were wrong, and that changed recently.
Closes-Bug: #1591177
Change-Id: I4338eee40d092148831b3e20f8a42a1b3d3ea8bf
The Nova v2 API code has been completely removed from Nova by
change[1]. Although Nova still supports v2 compatible API with the
legacy endpoint, it is better to switch to use Nova v2.1 in Heat.
This change sets version='2.1' when init novaclient
instance, then we can use novaclient v2 and will
use nova api v2.1.
[1] https://review.openstack.org/#/c/311653/
Change-Id: I428abb4ca05847da8ffc2da7157aa5c34263a205
Closes-Bug: #1588155
Partial-Bug: #1588171
We try to be careful when filtering resources from stack, to not load
all of them, but unfortunately it breaks as soon as you have
dependencies with resources that are not returned. To be on the safe
side we need to load them all and filter them afterwards.
Change-Id: I399545a6a4fd77d9707505ec9c4058d384877dec
Closes-Bug: #1585931
Add a 1 second pause to test_stack_update_from_failed_patch. If a stack is
updated more than once per second, there is a possibility for busy waiting if
_verify_status neither returns nor raises an exception.
Please see
https://github.com/openstack/heat/blob/master/heat_integrationtests/common/test.py#L277
for _verify_status.
Closes bug: 1583630
Change-Id: Ifa9a5e9d69b47fe07fbc9ffcbe8f03479a24bb6c
Adds default policy rule for resources which are limited to
administrator, to forbid non-admin to create these resources
at the very start.
Change-Id: I9e1ef86f0c44bce5bde3f9e26e1f2b9cb3aef06d
Closes-Bug: #1582187
Make sure nova server be created in correct security groups
if user specified subnet and security_groups when create/update
server.
Change-Id: Ic93cad4def90f3da25390d871d6a8c14ffe1c5ae
Closes-Bug: #1571975
ResourceChain was using the old properties when trying to build the new
template in updates. Let's rebuild the properties so that it works
properly.
Change-Id: I5ba78995819ec2e1d398a02dad9979575bba05b1
Closes-Bug: #1571638
This is causing issues with tripleo failures
with ValueError, when trying do stack-preview as
part of policy enforcement for stack DELETE.
This reverts commit a8accbba98b5fc15562864030f49d20570bf8412.
Change-Id: I366316f27f24c650bd435e67dd17abd8676cedf4
Closes-Bug: #1561172
Currently we have retry logic with random period of delay.
There is a chance, when we have several re-try attemts with maximum
timeout, so it can be a root cause of floating fails, when we have not
enough time for getting all signals.
Also decrease number of signals from 30 to 25, due to small risk, when
one of signals goes to ConcurrentTransaction error.
Note, that all these changes are made in corresponding functional test
and don't affect main code.
Change-Id: I9ca85c4378d0f62e316f4f40ff73597ffaaabadf
Related-Bug: #1497274
The problem of integration tests was that they use their own
requirements.txt that is unable to auto-sync with global requirements.
This patch removes dedicated requirements.txt and replaces it with a
stub file listing names (and possibly versions) of the packages needed.
Then a special script parses this stub file, and for every package
that is present in main project requirements files it pulls the versions
from main project requirements, generating and installing requirements
for the integration tests on the fly.
This will help keeping requirements for the integration tests always in
sync with main project requirements.
Change-Id: Ie79338cc10cc101fbf15b51c7923e3a7b8e4fbb4
Closes-Bug: #1490866
Make use of the new lbaas v2 resources.
This is an experimental gate job.
Will use the lbaas v2 namespace-haproxy driver instead of octavia. Octavia
requires nested vms which is very slow and causes timeouts in devstack gates.
Change-Id: I7ea6e50a1da46622bdddcfccaf82203f473bfacc
1. Add a HOT template version 'heat_template_version.2016-10-14'
2. Add Newton version '7.0.0' in doc
Change-Id: I8194adbe9a27f982a6b123dda78849d6e5b33eeb
Use OS_USER_DOMAIN_NAME and OS_PROJECT_DOMAIN_NAME
env variables as the defaults for keystone v3 in
integration tests.
Change-Id: Idb58431cf95988a91504ccac5116e0f8e339578f
Closes-Bug: #1560032
We seem to be using hardcoded region in some inline
templates of fucntional tests. They would fail if
the region name is different. This changes to use
it from the config.
Change-Id: Iafd1251545e00c6cba292b042352b1ef34da81e0
Closes-Bug: #1560585
This fix is based on changes introduced in patch
Ibf9dd58a66a77d9ae9d4b519b0f11567977f416c.
Follow changes were done in this patch:
- According previous item code for calculating metadata of
wait_condition_handle was moved to separate method -
normalise_signal_data().
- Same method was implemented for BaseWaitConditionHandle class, which
returns original signal data without changes.
- handle_signal method for BaseWaitConditionHandle class was updated:
* all code related with updating and verification metadata was moved
to merge_signal_metadata internal method, which will be called from
metadata_set method.
* if/else block was changed to raise error in case, when metadata has
wrong format, so else section was deleted.
- corresponding tests for waitcondition resource, which expect several
signals was added.
Change-Id: Ia25146a742ce79dbb0480d9053131216037e5305
Co-Authored-By: Zane Bitter <zbitter@redhat.com>
Closes-Bug: #1497274
When updating a stack with the existing flag, we keep the parameters
from the old template to be used against the new version. Sometimes
parameters will get remove and won't make sense anymore, and keeping
them would break update with a 'Parameter was not defined' error. This
filters out such parameters so that the updates succeed.
Change-Id: I6f2aa77da28d271dd001a137bb574b5470292f15
Closes-Bug: #1558610
This prevents stacks with forbidden resources start
to create/update or stuck in DELETE_IN_PROGRESS state,
if delete the stack with admin resources in nested stacks.
Also we need to allow get id of resource that in SUSPEND
state, because of we use stack preview in SUSPEND state.
Change-Id: I328891e62b4f4bcf620c52ef9d4d8ab60801a651
Closes-Bug: #1539145
For lbaas v2, the scenario tests are on hold until bug:
https://bugs.launchpad.net/octavia/+bug/1557184 can be
resolved for octavia in devstack.
This patch will change the octavia drivers to no-op to
allow functional testing against the heat lbaas v2
resources. These tests will run under 5 minutes.
Change-Id: I96890725d0b5c498815873b068613ab00f2cbac8
Race condition appears in next situation:
1. First thread calls _set_config_value for one section.
2. Second thread calls _set_config_value for another section.
3. First thread. Config option value set, calls
open(self.config_file, 'wb'), which erases all file content.
4. Second thread. In previous point moment second thread tries to
set config option value to self.config_file, which is empty (see 3).
So, NoSectionError exception raised.
This patch adds ten retries for setting option value, if NoSectionError
raised, i.e. try to wait until self.config_file is busy.
Change-Id: Ic54ea287ebe4724511f75d42677cae5dfdec4e57
Closes-bug: #1535766
Don't execute translation rule for property that contains
a GetParam function that can't be resolved at the moment.
Such situation happens when we try to resolve get_param function
that refer to parameter with None value. We receive parameter value
from parent stack, where this value is a reference to some resource
without resource_id, so this situation is legal for stack preview
and we shouldn't fail. Note, that we can reproduce this behaviour
only with resources with hidden parameters and overrided get_resource_id
method, that returns None if resoruce creation has not been started yet.
Change-Id: Ia1097940db983721c8b5116db7ee0a2c4c45339d
Closes-Bug: #1548802
Provide ca_file option to pass the ca certificate to verify https
connection. Also pass verify parameter to the test cases which
directly call requests library methods.
Change-Id: I4a81047136d6a64b151180e95c254edea8165349
Closes-Bug: #1553898