| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I02bf9a0f7b62edfa4dc49d73750ce3dd83a723d7
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Extend the approach from 1cfde62b2ff8a60c8cc3a9ef4926e5f4a7116aee of
ignoring ValueErrors in the _previous_ properties when doing an update to
also ignoring TypeErrors.
Change-Id: Ic08165fe031e1764cfb34eaf782d3e105f04fee3
Closes-Bug: #1538551
Related-Bug: #1543685
(cherry picked from commit 79c410d92326e63c8bf3752922c35abf6264e211)
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix raw_template purge query on MySQL, and handle stack tags before
removing stacks. This also removes a bunch of race conditions where we
deleted incorrect data.
Change-Id: I7b7a1d94acefbaeeed86f1833c979819361c8988
Closes-Bug: #1524387
(cherry picked from commit 6cece5bb7e9e10dfb33596c32319e7ad9b81fbff)
|
|\ \ \
| | |/
| |/| |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When an update fails on a template resource, we still store the template
in the stack environment. Retrying the update will fail because of
missing parameters, but we can ignore those as they should be harmless
and only matter in this broken case.
Change-Id: I859ea72b1cc95162b6f498b6af65e4d9fdd9458f
Closes-Bug: #1543685
(cherry picked from commit 1cfde62b2ff8a60c8cc3a9ef4926e5f4a7116aee)
|
| |
| |
| |
| | |
Change-Id: I406d339e67c35b7edf0eebc77bf4d4f9bcd0a660
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| | |
Change-Id: Ib33616489ca53cb65ea44b34840f09954008ea28
Closes-Bug: #1538646
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Clear an active user hook when an exit exception occurs (e.g. the thread is
cancelled). Previously we only caught Exception so exit exceptions were
excluded.
To also cover the case of an unclean exit (e.g. kill -9), don't wait on a
hook that is left over from some previous stack operation - only start the
hook if it is set in the current environment.
Change-Id: Ie894f416a898edeca3b6a123392853213893ff74
Closes-Bug: #1538733
(cherry picked from commit cee2aa07625be2bdacf0cd6abce65a5f641b4a13)
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When adding dependencies, we can ignore ValueError.
Change-Id: Iaca3d364d0f68f50eb3ce5243b5aa33cc54072e6
Closes-Bug: #1536515
(cherry picked from commit 0c0c497a330ebbfd5703b1677ca07141da199adb)
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The RPC API call describe_stack_resource is used by two separate ReST API
calls and one CFN API call: Resource.show and Resource.metadata in heat-api
and StackController.describe_stack_resource. The metadata call in
particular throws away all of the results of the describe_stack_resource
output except for the metadata itself. Either this call or the cfn one
(depending on configuration) is also used very, very often: it's the one
that every instance running os-collect-config polls for information about
software deployments (so, to a first approximation, every server in every
stack will be calling this once every 30s).
Since blueprint detailed-resource-show merged in
6d8a5cb35cec81b23a71e8c6fa692f8e7b4dca1c, every call to the RPC
describe_stack_resource API has resulted in Heat fetching the attribute
values for every single attribute in the resource from its corresponding
OpenStack API (including those calls originating from a request for just
the metadata, or from the cfn API which similarly discards the attribute
values).
This is insanely inefficient (we're making OpenStack API calls to fetch
data that we don't even return to the user). It's quite possibly a
substantial part of the reason why we've had so much difficulty scaling up
Heat to deal with large numbers of servers polling it for config. And it
tends to leave a lot of annoying warnings in the log messages, not just of
Heat but also the other services it is polling, since polling the metadata
generally happens using the heat_stack_user's credentials, not those of the
actual owner of the resource - it can't actually find the resource and
returns a 404.
The fix is to change the default "with_attr" value in the RPC client to
False, and only pass None (the previous default) or a list of extra
attributes to include in the specific case where the ReST API will actually
return the attribute values to the user and not just discard them. Since
the server previously treated any falsey value for the parameter (e.g.
None, False or []) as equivalent, and since nothing was previously passing
False, this change is safe to backport to stable branches. The api and
engine can be updated in any order without change in behaviour until a new
api is talking to a new server (at which point the bug is fixed).
This change also updates the ReST API unit tests to accurately reflect the
data returned from the engine.
Change-Id: Ifffeaa552d3205ca06a79adda09d35a77099a2bf
Closes-Bug: #1507568
(cherry picked from commit f0fa7312a024266cf6a51638a9ea772128bc3b89)
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It's valid to switch the network name for an ID referencing the
same network, and vice-versa so allow that behavior when using the
network property which can accept either name or ID.
Neutron port allow switching between network_id and network
The network_id property is deprecated, so we should tolerate switching
to the not-deprecated network property without replacing the port.
Conflicts:
heat/engine/resources/openstack/neutron/port.py
(cherry picked from commit ab3c52543493ec2aa7e1d9f8d189a62034f342b7
with manual fallback for NETWORK_ID due to the lack of
translation_rules in stable/kilo)
Partial-Bug: #1514680
Change-Id: I0889ff8fc277dc9703d30b7e42fd799cfb57e975
|
|\ \ \ \
| |_|/ /
|/| | | |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Downstream test environments are frequently having failing stacks with
error messages like:
MessagingTimeout: resources[0]: Timed out waiting for a reply to
message ID ...
These environments generally have 1 or 2 cores, so only spawn one or two
engine workers. This deadlocks with stacks that have many nested stacks
due to engine->engine RPC calls.
Even our own functional tests don't work reliably with less than 4
workers, and the workaround has been to set that explicitly in
pre_test_hook.sh.
This change sets the default minimum number of workers to 4, but still
matches workers to cores for larger servers.
This change also moves the default evaluation to heat.cmd.engine so that
generated configuration doesn't get a inappropriate default value.
Change-Id: Iae6b3956bad414406d901bb2213c9ec230ff4304
Closes-Bug: #1526045
(cherry picked from commit adb21217955e59fce5fb194635b36b5b40d6d8c8)
|
|/ /
| |
| |
| | |
Change-Id: I157ff8ca94521bf07b5766c68d7639f144bcdf49
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Modify get_class to ensure that user-defined resources cannot result in
reads from the local filesystem. Only resources defined by the operator
in the global environment should read local files.
To make this work, this patch also adds a separate
get_class_to_instantiate() method to the Environment.
We were previously using get_class for two different purposes - to get a
resource plugin on which we could perform introspection to obtain the
properties and attributes schema, and to get a resource plugin we could
instantiate to create a Resource object. These are both the same except in
the case of a TemplateResource, where having two different use cases for
the same piece of code was adding considerable extra complexity. Combining
the use cases in this way also made the error handling confusing (leading
to bug 1518458).
This change separates out the two cases.
Change-Id: I845e7d23c73242a4a4c9c40599690ab705c75caa
Closes-Bug: #1496277
Related-Bug: #1447194
Related-Bug: #1518458
Related-Bug: #1508115
(cherry picked from commit 06a713c4456203cd561f16721dc8ac3bcbb37a3
and 26e6d5f6d776c1027c4f27058767952a58d15e25)
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To get attribute instead of return None if resource
is in SNAPSHOT or CHECK action.
This patch allow to get_attr for hot template version
'2013-05-23' also.
Change-Id: I318f4c158ebe0a4afbb3f0bcbe9d856d90f0a4bb
Closes-Bug: #1505054
(cherry picked from commit 20825d991e77c5aad6c596240143c48dd9e205c6)
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For an update that involves e.g. stepping through the whole graph and
verifying that nothing needs to be updated, we spend a lot of time sleeping
unnecessarilty. Every task will exit without yielding (i.e.
it will be complete after calling TaskRunner.start()), yet the
DependencyTaskGroup yields after each set of tasks so the minimum sleep
time in seconds is the maximum path length in the graph minus one.
This change fixes that by removing nodes from the graph immediately if they
are done immediately after having been started. Since the _ready() call
returns an iterator, this allows any later tasks that were blocking only on
this one to start immediately. To ensure that any tasks that are only
blocking on this one _do_ appear later, iterate over the graph in
topologically sorted order.
The potential downside to this would be any time that actions complete
quickly (i.e. without yielding), but we still need to throttle them. An
obvious case might be a resource type with no check_create_complete()
function - creating a lot of these in a row could result in quota failures
on the target API. However, the Resource.action_handler_task() task always
yields at least once even if there is no check, so this patch should not
change its behaviour.
Change-Id: I734561814d2784e710d0b9ec3ef7834f44f579b2
Closes-Bug: #1523303
(cherry picked from commit d66d57f187c7d8623526e9f928ae76d2cca9ecf9)
|
|/ /
| |
| |
| |
| |
| | |
Change-Id: I75f58885a91d11e52ed3737a806b5920774d586c
Closes-Bug: #1466748
(cherry picked from commit a7c4b2332f9d1accaa89b51fbc3b09014995983a)
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
We were trying to validate deprecated neutron properties with
properties.data, which work when you have a reference, but not a
parameter. Instead, compare it None which is what's the value when it's
not set at all.
We can't backport the original patch because it uses the new translation
mechanism for deprecating properties.
Change-Id: Ifa96a1cf94ced833afaf4b7ca306a953987548b6
Closes-Bug: #1518676
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The initial backport of I1739ccbdf75af35aac5be16b99200975df58b8e2 failed
to take into account the different method arguments required by the
thread_lock method, so reset_stack_status doesn't work without this
change.
Change-Id: Id11cf0c7d651433cb8331a20552435fbbf822f92
Closes-Bug: #1514615
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The change Ic948c2fe5baf23c9c4ced33060f672ca9c278a19 aim
to prevent the stacks hanging in IN_PROGRESS, but the code
is incorrect, this patch fix them.
Closes-Bug: #1521881
Related-Bug: #1492433
(cherry picked from commit 63141b20bcb5fe0b7941a6d8578936e42c485242)
Conflicts:
heat/tests/test_stack.py
Change-Id: I0e9655b5a931452d810c38b7ddf6a2ce742bb7ed
|
|/
|
|
| |
Change-Id: I486af5234f2e016f567085546d2b21e18dc26796
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Having a stack which is wedged UPDATE_IN_PROGRESS due to another bug,
restarting heat-engine should have resulted in the stack being reset to
UPDATE_FAILED. However the reset was skipped because the lock engine_id
was None.
This change removes the engine_id check since it is possible in practice
for an UPDATE_IN_PROGRESS stack to not be locked.
Since it is possible for the stack to change state in the unlocked
window, a check is added that the stack is still IN_PROGRESS before the
reset is performed.
Change-Id: I1739ccbdf75af35aac5be16b99200975df58b8e2
Closes-Bug: #1514615
(cherry picked from commit 44b2f0965dd329cf45a151705b0648819acff8c7)
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When an update fails, we currently update the environment of the stack
to contain both the new and old parameters and types. Unfortunately we
don't do that for the backup stack which is reused. This patch adds the
environment change.
Change-Id: I4dc5dd35e4aeee498dd8960a1000913e97b924d5
Closes-Bug: 1508096
(cherry picked from commit 88da460316e2c18b3ceb58f51dcf0bda717a18a3
and 13c68910704844719b2d3de353d2db276377bf11)
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit c5bb4d2ab83820f5ee2ac3fc6e8d9210e98b26ef.
Every part of this patch was wrong, except that it did (by accident)
start returning 500 errors instead of 400 errors in the case where a
template in the global environment was not found, which is actually the
operator's fault and not the user's. That's not really a serious enough
problem to justify changing it on a stable branch though, so this is a
straight revert. Luckily the patch hasn't made it into a release yet.
Change-Id: Ia3154c7c41bb69cfa2ee36eb6d48fcd339900d60
Closes-Bug: #1518458
Related-Bug: #1447194
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We previously only allowed a resource to update in-place when the 'type'
field in the old and new templates matched. In an age of environment type
mappings, this is incorrect. Instead, allow a resource to be updated
in-place when the old and new resource plugins are of the same class, since
this is actually what determines whether handle_update is capable of
correctly updating the resource in-place.
There is a special-case for TemplateResource as we currently subclass it
for each template type, but all TemplateResource subclasses are in fact
capable of converting between each other via a stack update.
Change-Id: Iba4abf5efd9737ca6a17d8c91d5c54ab6d3f12e0
Co-Authored-By: Zane Bitter <zbitter@redhat.com>
Closes-Bug: #1508115
(cherry picked from commit 98044dbd17c703e6062752f043e1cac6563e3589)
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure that any unexpected exceptions are handled by moving the stack to
the FAILED state.
Change-Id: Ic948c2fe5baf23c9c4ced33060f672ca9c278a19
Closes-Bug: #1492433
(cherry picked from commit 17b5f9ec84e8ad7f8c2b0f38b599456995d0aa75)
|
|/
|
|
|
|
|
|
|
|
| |
The kilo TestResource used in functional tests has limited features and
hidden bugs which are only apparent when other functional tests are
backported. This change backports the stable/liberty TestResource to
stable/kilo.
Change-Id: Ib3648e21440031b0b1231d81a7a2825414457f72
Related-Bug: #1508096
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
generate_template and resource_schema methods of service.py
raises wrong type of exceptions after catching them.
Also resource validation failure should not raise stack
validation exception.
Change-Id: I44b8d37db7d2687cee2a7b675dd062b3af3ee167
Closes-Bug: #1447194
(cherry-picked from 9a4d719ea1a6ca63f527b5c78308fd288058d42b)
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Exceptions in synchronous tasks get caught by the olso_messaging code but
for asynchronous tasks run in threads with nothing wait()ing for them,
there is no top level error handling, and hence no logging. (Tracebacks
would be written to stderr, so systemd users would see them only in the
journal rather than heat-engine.log, and other users would quite likely
lose them altogether.) This change ensures that any uncaught exceptions are
logged as errors.
Change-Id: I9410aa7ffd83391ea4db13c6e8cf49f26d3049fb
Closes-Bug: #1492427
(cherry picked from commit 03d9aebbc7d5fba048fa9f39813704e70dee9c5d)
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changes the behaviour of has_interface to not assume that
get_resource_info always returns a type. There are circumstances when it
won't, such as when the type is no longer in the new registry during a
stack update.
Change-Id: Idd9dade85d105dc6839ff0740e6c80aca6b7ad9f
Closes-Bug: #1509880
(cherry picked from commit af3355d34c8b8e4030f7a928a6c7cb9ad70e0795)
|