This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).
Change-Id: I604718b2ec740780a762c5c2dcc2cce0d317f55d
Update the resource data in the StackDefinition in unit tests where
required to simulate how the real code works, e.g. after creating or
updating a resource.
Change-Id: Ie4aad264b8a776a323dcfd1843357c5a7eac094e
In some tests the template we provide for the Stack does not match the
actual resources we are testing. This never happens in reality, and it
makes the tests brittle when other legitimate changes occur in the engine.
This makes the integration testing more realistic.
Change-Id: I777309f310e18f8a16b5ae675419d7eeeffa09ee
We ought to iterate over the dependency list in the validate_template call,
to check for any circular dependencies. This check was removed by
d12cbe7959 in order to avoid trying to
calculate implicit dependencies added by resource plugins (as e.g. many
Neutron resources do) at a time when we don't have sufficient data to do a
good job of it anyway.
However, the previous patch d12cbe7959 split
apart the calculation of explicit and implicit dependencies, so we can
easily do this while still checking for circular references in the
explicit dependencies. This patch splits the dependency calculation into
two phases - the first using only data available from the template, and the
second querying the resources for implicit dependencies.
Use strict_validate = False as the criterion for when to avoid calculating
implicit dependencies, since this corresponds exactly to when we don't have
enough data to do so.
Change-Id: I21c63dcc8d1cad20dbc237b472670753779b0ff8
Closes-bug: #1691575
While create a resource, we might retry to create or delete that resource.
Within every action properties validate was act as pre-function before
actually call any action. While the first creat run, if anything goes wrong
during property validation, a validation error will raise right away. Which
will definitely riase in the very first action run. But if it successed,
it still required to revalidate each time an action triggered (whatever is
creat or delete). This patch will ignore properties validate if it's not
the first create run.
Closes-Bug: #1691672
Change-Id: Ibf592a254a862613eddb77ea5933ec6ba0cd2d1a
When we choose only validate resource template, and external resource
id was set, we should consider that external resource template is
valid (since we only required `external_id` from that resource
template format). So the result of this validate will be None
(template validate passed).
Closes-Bug: #1702977
Change-Id: I8b33c957a7185a0f52356f412b13609ba1a7b469
When requesting the NodeData for a Resource, generate placeholder values if
the resource has not been created yet. Currently, all attributes are given
a value of None (consistent with how the get_attr intrinsic functions
substitute them when the resource state indicates that the attributes are
not valid now). Reference IDs are generated as usual (since the logic for
what to return when the state indicates the data are not valid is contained
in the resource plugins).
In future, this will allow us to add placeholder NodeData for all resources
to the StackDefinition prior to validation. In the long term, that should
help us to remove the state-checking logic from the intrinsic functions. In
the short term, it will allow us to validate template data that is parsed
against the StackDefinition (rather than the Stack), since it gives us a
list of valid attribute names. In the medium term, this should give us a
place to substitute in more sophisticated placeholder values to do better
validation.
Change-Id: Ife69f563a3748c6cb611ca02f826229e76bee4d0
Partially-Implements: blueprint stack-definition
When we signal a resource, we want the signal to be interpreted in the
context of the properties of the resource as they were set at the last
stack update, not based on any attributes of other resources that may have
changed.
We already store the properties for comparison during updates. This patch
freezes the properties while we call handle_signal(), in a similar way to
how we freeze the properties during handle_update() (see bug 1584623).
Also make sure that when a ScalingPolicy adjusts an autoscaling group, it
also uses the group's stored properties so that e.g. the definitions of
existing members cannot change on a scale up.
Change-Id: I7e248ad82f2334b1a580655efa3a302e7d84fbd8
Partially-Implements: blueprint stack-definition
When we read from the LaunchConfig in order to e.g. scale up an
InstanceGroup or AWS AutoscalingGroup, we want to use the properties as
they were last set by a stack update. We don't want to re-resolve functions
using live data, since any changes would result in changes to existing
members when we generate the template for scaling up, and that can possibly
result in the replacement of said existing members.
Instead, use the property values that are stored in the database from the
last update. In the case of a stack update in convergence, we need to load
them when doing Stack.resource_by_refid(), since they're not included in
the cache_data.
Change-Id: I9da5efb2559f10b2dfe44281e2ba1e615a8c618b
Partially-Implements: blueprint stack-definition
When checking that a resource has been updated with the correct values,
look at the stored properties data rather than live resolving the current
properties.
Change-Id: I4b1a179be0b1e3e352d30f3ef6696180e11d0a70
When showing the resource list during a stack update, the patch
5ce238fb17 inadvertently raises a KeyError
when a resource in the new template hasn't been created yet. This resolves
the problem.
Change-Id: If0784156211b21d8ef7047a7082d1b48e977252d
Related-Bug: #1703703
Closes-Bug: #1705170
For py35, message attribute in exception seems removed.
We should directly get the string message from exception object
if message attribute not presented. And since get message attribute
already been deprecated. We should remove sopport on
exception.message after we fully jump to py35.
Partial-Bug: #1704725
Change-Id: I3970aa7c161aa82d179779f1a2f46405d5b0dddb
When a resource reference is used __getitem__() returns empty
string before a resource is created and the validation fails.
Check for None value instead which would be the case when the
property is not specified.
Change-Id: Ida4b32c3611d1638b9c0eb78cb2b31a32f112fa9
Closes-Bug: #1705052
When doing a non-batched create we call create_with_template(),
where we pass `self.stack.timeout_secs()` as `timeout_mins` which
increases the timeout by 60 times.
Change-Id: I225ece0d8e4b6cb4eba2d3a748bd3ce5cda4f5c9
Closes-Bug: #1705009
Adds a new section 'permutations' for 'repeat'
function to decide whether to do nested loops
to iterate over all the permutations of
the elements in the given lists, the default value
is True if no specify and keep the same behavior as
before.
For example:
repeat:
template:
network: %net%
port: %port%
ip: %ip%
for_each:
%net%: [n1, n2]
%port%: [p1, p2]
%ip%: [ip1, ip2]
permutations: False
Will be resolve to:
[{network: n1, port: p1, ip: ip1},
{network: n2, port: p2, ip: ip2}]
Change-Id: I2a008400fb71453f6a78656f2e041ae2efa098a2
Blueprint: improve-repeat-function
It seems for py35 job barbicanclient is installed from source.
Ib91e7049de007f4d4254abcd4c125b4dc7e03c55 has made some backward
incompatible changes.
This also changes to upload images using $IMAGE_URLS, so
the images are stored locally and then uploaded.
Change-Id: I9d3d9dabdfca0442bd17f93ce69ef9753049dc23
Closes-Bug: #1704725
Starting with python-mistralclient 3.0.0, the Client object no longer
has http_client as an attribute. Instead get it from the
ExecutionManager.
To ensure backward compatibility with earlier client versions, look for
either the HTTPClient or the Client as an attribute of the
ExecutionManager.
Change-Id: I507284727039476acfdb1c9c8a26a360edc42417
Closes-Bug: #1704883
- Fix authpassword middleware
- Pass user_domain/project_domain all through. user_domain
is required whenever authenticating a user with 'username'
and creating the 'password' auth_plugin.
Change-Id: I692639a16be42b755628695d89731aa23eb9221b
Closes-Bug: #1699418
The Cinder volume 'attachments' and 'attachments_list' attributes are
dynamically built lists and must be queried from the Cinder API on each
request. There are several factors that may change the contents of this
list that are unknown to Heat. Caching should be prevented for these
attributes.
Closes-Bug: #1703605
Related-Bug: #1703387
Co-Authored-By: Paul Bourke <paul.bourke@oracle.com>
Change-Id: I1a646e567b2d88f2acf09b3077c205c5b061d4bc