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 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
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
1. Add a HOT template version 'heat_template_version.2016-10-14'
2. Add Newton version '7.0.0' in doc
Change-Id: I8194adbe9a27f982a6b123dda78849d6e5b33eeb
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
If we use unicode as resource name or parameter,
we are likely to encounter unicode problems.
This patch aims to fix unicode problems, and
there are several things to be clear:
1. For the class wrap with six.python_2_unicode_compatible, in
python2 their original __str__ function will map to __unicode__,
and new __str__ function comes from __unicode__.encode.
So we should always return unicode in __str__() if wrap
with python_2_unicode_compatible.
2. python_2_unicode_compatible will not handle __repr__,
__repr__ should return str in all versions of python.
Co-Authored-By: Ethan Lynn <xjunlin@cn.ibm.com>
Closes-Bug: #1524194
Change-Id: Ib4af43d153e0edf9d66308bf8e7b93a3be501d2e
Return HTTPBadRequest error from API instead of
HTTPInternalServerError when immutable parameters are modified.
Change-Id: I37ff6dd7295292b8cd08a7a5085590b654a7e4f2
We don't have strong ordering of events enforced, so there is no need to
test that events arrive in order, and it actually make tests fail
intermittently. Let's relax that check.
Change-Id: I73be763df5ddf863e29df1b9ac8792f05700e006
Closes-Bug: #1549264
Add a new functional test using Zaqar as a target for event sinks. This
fixes the behavior when convergence is on.
Change-Id: I4bbdec55b98d0a261168229540a411d423e9406d
After changing to use yaml.safe_load, some of the tests are failing
locally with unicode error. Though we've not noticed these issues
at the gate, it's better to use safe_dump to avoid them.
Change-Id: I84cf921afe76b3bed44e84230a71b244bb886cce
Closes-Bug: #1547399
Heat integration test test_encryption_vol_type will not work in environments
where admin user is named differently or does not have the same password as
that of the demo user.
The admin credentials is now made available via heat_integrationtests.conf.
The tests which require admin privileges should be run only if admin
credentials are available and use the same.
Change-Id: I5f329be6d4c4249763e0aec8696fb87605a0812a
Closes-Bug: #1546993