In convergence, if stack state_set returns None, it indicates failed
concurrent update.
Fix rollback logic to follow convergence code path while saving the
stack state in DB, so that convergence post stack action code is
executed.
Change-Id: I9c4910c9fa56aa0070c752fc419e5e5fa7f13e99
Closes-Bug: #1544949
In current code, the sequence is listed as below:
Liberty Series Release Notes
Current Series Release Notes
Mitaka Series Release Notes
Here the current release notes should be always at
then end and this patch takes care of it.
Change-Id: Ic4419aee3b441d4dd4125d7c971351f3396e6d23
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
If enable re-auth, we will use the stored context
instead of request context, then we can't create
ceilometer alarm resource. There are two problems
when create ceilometer client:
1. the stored context has no domain info, an error
raised from keystone: BadRequest: Expecting to find
domain in project. So this patch will retrive the
user/project domain ids from the auth_ref.
2. after fix the first problem, then another error
raised from keystone: Forbidden: You are not authorized
to perform the requested action. Due keystone doesn't
allow to create a token by a trust-scoped token when
get aodh endpoint. So this patch will pass 'aodh_endpoint'
to ceilometer client to avoid this.
Change-Id: I44ed5c10b6dec6f39714f4f74cf51a10ef6104a6
Closes-Bug: #1531406
Now we do launchconfig reference check for
AWS::AutoScaling::AutoScalingGroup and OS::Heat::InstanceGroup
resources only in handle_create(), this patch moves the
check to validate(), then the validation will work when
resource update.
Change-Id: I727c7155ce708a11184aad6fea36a365f1022c92
Closes-Bug: #1554311
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
This changes OS::Nova::Server resource to use
translation rules to resolve name_id properties.
As most of the tests in test_server.py and
test_rackspace_cloud_server.py are impacted by this
change, this also changes all the tests to use mock
library. Though the change is very big, it's mostly
mox to mock conversion for the tests.
This reduces the LOC drastically. Some of these test
modules have become very big to manage. We can split
them into smaller ones in the future.
Change-Id: Iaa630ab3b013dfb65e9131b1f265e846c8274037
Partial-Bug: #1514680
Blueprint: mox-to-mock-conversion
Heat architecture document has hyperlink to external document
such as AWS cloudformation and it was not formatted properly.
So this patch fixes it.
Change-Id: Ia5bc06b0c2045cd6732039d76204ced89eeecc3e
Make sure to create stack successful if 'deletion_policy'
section using function 'get_param':
1. Allow Function as valid type when 'deletion_policy'
section validation.
2. Resolve 'deletion_policy' data before deletion_policy
checking when rsrc_defn init.
Change-Id: Idee0ed90c34cfbfb09546969b144496d757195d8
Closes-Bug: #1556790
We seem to be raising oslo_db execptions wrapping custom
heat exceptions and using them with oslo_db.wrap_db_retry.
Rather, we should use retrying module directly.
Change-Id: Iad6abcf129b75f7b56fe5bb2f2f05f04d56ba86b
If a parameter has a default value, that must mean that its
not sensitive enough to be hidden. So don't hide it by encryption.
Change-Id: Iec209ba6f6778f728a7938b2ab1fd8b4c5b69bd0
Closes-Bug: #1489157
Closes-Bug: #1488679
The default values needed for heat's implementation of cors
middleware have been moved from paste.ini into the configuration
hooks provided by oslo.config. Furthermore, these values have been
added to the default configuration parsing. This ensures
that if a value remains unset in heat.conf, it will be set
to use sane defaults, and that an operator modifying the
configuration file will be presented with a default set of
necessary sane headers.
Change-Id: Ie3791007b33788829417ce508a3c719ae626bbce
Closes-Bug: 1551836
This patch removes specific DeploymentConcurrentTransaction exception
and adds one common ConcurrentTransaction exception. New exception may
be re-sed for another cases with concurrent transactions with different
error message.
Change-Id: Iaa82732702ad6035a7784eb6689c2536535142f9
Ignore image and flavor validations, if they are not yet
created. This would happen in cases where user with
sufficient privileges have them in the same template
with server.
Change-Id: I3450e85ee85fd40d96bc7d0506db6a2417ffec09
Closes-Bug: #1556317
We used to create the Stack object for the backup stack with the same name
as the actual stack, but store it in the database with an asterisk appended
to the name. This meant that a backup stack loaded from the database would
have an asterisk at the end of its name (e.g. in log messages), but one
newly created would not. Resolve this inconsistency by appending the
asterisk to the name at the time the Stack object is created, and don't
change it when we store it in the database.
Change-Id: I4eafddc7555fb148b160bdbe5a10ef649d4e27f2
Now, we set 'fixed_ips' to [] for server ports when prepare
for server replacement, but the ports are still in-use if only
set 'fixed_ips' to []. So this patch will to detach the ports from
nova server to make sure same ports can be attached to new one in
prepare_for_replace(). Also, when restoring server, we need to detach
ports from existing server, and then to attach them to previous
server.
We check the interface attach/detach complete by list the
server.interfaces, this change will use 'retry' wrapper to re-poll
the server interfaces for several times (by new config option
'max_interface_check_attempts', default is 10), then will raise
exception if the attach/detach still not complete.
Closes-Bug: #1533076
Change-Id: I7b322f9cf16c100dcd0365bc3091c289f00f0548
Previously we were ignoring the stack name when comparing a PhysName, since
that part can be shortened. That allowed a lot of code to get changed that
made the stack name out of sync with the one printed by the PhysName
object. This brings everything back into sync and starts comparing for
equality against the shortened stack name.
This also introduces a semi-correct implementation of __hash__.
Change-Id: I184cc7b0b746b1b7cddff231a90b7337ca42d35b
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
There are many neutron and nova resource has in-built
dependencies by using add_dependencies() method. Its not
required to validate them while valding the user template,
as
1. user interest will be validaing their template
2. in-built dependencies are not known to user.
Co-Authored-By: Rabi Mishra <ramishra@redhat.com>
Change-Id: I4a3043fd17b69a346d447dfbd17488040cf9b387
Related-bug: #1554380
We can completely remove 'RESOLVE' translations involving client
lookups in resource init. As we are doing translation before create
and update, it seems we can avoid it.
However, we would need other translations, like 'REPLACE' for property
vaidations(ex. required properties that would be replaced by deprecated
properties). This would be done only when strict_validate=True to avoid
this with template-validate.
Change-Id: Ie80bdd10726a8fc8a8787b78db93acffd333137f
Closes-Bug: #1554927
Partial-Bug: #1554380