14182 Commits

Author SHA1 Message Date
rabi
01b5878129 Add REST api support for cancel without rollback
We already have REST api support for cancelling a
UPDATE_IN_PROGRESS stack with rollback. This adds a
new action 'cancel_without_rollback' to allow for
canceling a create/update in_progress stack without
rollback.

APIImpact

Change-Id: I6c6ffa0502ab8745cfb2f9c5ef263f1e02dfc4ca
Closes-Bug: #1709041
2017-11-08 17:08:43 +05:30
Zuul
b1339abcd1 Merge "Do deep redirects from old docs.openstack.org URLs" 2017-11-08 05:23:43 +00:00
Zuul
e978575b80 Merge "Replace pycrypto with cryptography" 2017-11-08 04:17:25 +00:00
Zuul
2ca8d4f456 Merge "Set stack.thread_group_mgr for cancel_update" 2017-11-07 16:26:56 +00:00
Zuul
ca8a316458 Merge "Retrigger new traversals after resource cancellation" 2017-11-07 05:51:34 +00:00
Zuul
365678131a Merge "Create replacement resource atomically" 2017-11-07 05:51:31 +00:00
OpenStack Proposal Bot
3078246364 Updated from global requirements
Change-Id: I05dce6e00bcb86b58c4e0b1a0b36adbbf8bb497b
2017-11-07 00:21:31 +00:00
rabi
3adca03db6 Set stack.thread_group_mgr for cancel_update
In change I84d2b34d65b3ce7d8d858de106dac531aff509b7, we changed to
call self._converge_create_or_update() in a sub-thread. However,
thread_group_mgr is not set for cancel_update (with rollback),
which in turn calls converge_stack.

This also enables test_cancel_update_server_with_port, as
bug #1607714 seems to be fixed now.

Change-Id: Ie674fd556418f6aa8e79654458cbe43648851db2
Closes-Bug: #1713952
2017-11-03 09:14:46 +05:30
Zane Bitter
4a30b2ff56 Retrigger new traversals after resource cancellation
If we force-cancel a resource check operation (i.e. by killing the thread)
then there was a short window where another traversal could have started
and been waiting on the not-yet-cancelled resource. That traversal would
then hang forever, as there was nothing to retrigger it. This change
ensures we retrigger the latest traversal on the resource after
cancellation.

Change-Id: Iae27c9cc5c0895b52aef2f2c72686dc48ec5983c
Closes-Bug: #1727007
2017-11-03 09:14:46 +05:30
Zane Bitter
c9792b96d2 Create replacement resource atomically
Use a single transaction to create the replacement resource and set it as
the replaced_by link in the old resource. Also, ensure that no other
traversal has taken a lock on the old resource before we modify it.

If we end up bailing out and not creating a replacement or sending an RPC
message to check it, make sure we retrigger any new traversal.

Change-Id: I23db4f06a4060f3d26a78f7b26700de426f355e3
Closes-Bug: #1727128
2017-11-03 09:14:46 +05:30
Zuul
86fcc11b80 Merge "Remove redundant null engine id check" 2017-11-03 03:04:31 +00:00
Zane Bitter
6c8697442e Do deep redirects from old docs.openstack.org URLs
The docs.openstack.org site was rearranged so that the old docs at
/developer/heat/ are now at /heat/latest/. The base .htaccess file in
openstack-manuals redirects everything in the old hierarchy to the root
of the new one unless there is a .htaccess file present (see
I0af0e32d9c646d61f4c72599cdc4613299aa5ec9).

Add a .htaccess file so that old links redirect to the equivalent page
in the new location.

Change-Id: I74de09f4e25c2eda050053d3b8646586c9f24c04
Closes-Bug: #1722820
2017-11-02 16:25:01 -04:00
Zuul
de01374f80 Merge "Allow configuring payload of noauth middleware" 2017-11-01 14:36:49 +00:00
Zuul
7f57074e98 Merge "Move FakeKeystoneClient to engine.clients" 2017-10-31 06:19:04 +00:00
OpenStack Proposal Bot
8e16c3c58e Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I4ac22fd5b4da9c42bd5ff5cfbbd8d208699eca2e
2017-10-29 06:23:42 +00:00
OpenStack Proposal Bot
abdefbf22f Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I2ddbf8fd432989a123eb19fd94ad0a74095e722f
2017-10-27 06:59:59 +00:00
Zuul
0ec8fa8e43 Merge "Defer exceptions in calculating node_data()" 2017-10-26 14:48:54 +00:00
rabi
7151b5c949 Skip AodhAlarmTest
It seems ceilometer api has been removed[1].

As part od zuulv3 transition we are moving jobs to project repo[2]
and change to enable gnocchi devstack plugin at the gate has to wait
till the movement is complete.

We probably have no other option but to disable the test for the
time being.

[1] https://review.openstack.org/#/c/512286/
[2] https://review.openstack.org/#/c/509098/

Change-Id: I547b26ea78ad70742ae6fcf9a0eae4cd4af60100
Related-Bug: #1727637
2017-10-26 13:28:47 +05:30
Dan Prince
14b0451fc9 Move FakeKeystoneClient to engine.clients
Add the ability to consume FakeKeystoneClient class as a client
module. This avoids extra dependencies on the Python mox/mox3
libraries at runtime and allows the end user to wire in the
custom class by simply making the following config setting:

  keystone_backend = heat.engine.clients.os.keystone.fake_keystoneclient.FakeKeystoneClient

This use case for this is the TripleO undercloud installer which
uses a heat-all process to transform heat templates into Ansible
playbooks. Previously we leveraged a "fake_keystone" service
as multiple applications and binaries required keystone dependencies.
(Both Heat, os-collect-config, and some openstackclients wanted
 a fully version of keystone running)

Now that we've streamlined these dependencies allowing heat to use
a fake KeystoneClient library shim instead of the full fake_keystone
process is much lighter and avoids the security concerns of the extra
socket. This patch allows us to do all of this without installing extra
test time dependencies on mox/mox3.

Change-Id: I03f1789957ba157871fd13164592116d7fcdabe4
Closes-bug: #1723639
2017-10-24 11:45:31 -04:00
Zuul
1f73478e32 Merge "Do not validate property network of sahara cluster" 2017-10-24 04:39:26 +00:00
Zuul
7bb3587be1 Merge "Unit tests: Remove deprecated oslo_db test case classes" 2017-10-23 15:10:49 +00:00
Zuul
33b5991b3b Merge "Unit tests: Don't leave RPC server running" 2017-10-23 15:10:48 +00:00
Zuul
e0cbb3abd3 Merge "Unit tests: ensure all threads complete" 2017-10-23 15:10:46 +00:00
Zuul
5e89b8a1a6 Merge "Don't attempt to update tmpl ID when resource in progress" 2017-10-23 15:10:44 +00:00
Jaewoo Park
1397100f9d Replace pycrypto with cryptography
Pycrypto is no longer maintained, and heat currently uses Pycrypto.
This patch rewrites functions using Pycrypto and replaces them with
cryptography functions.

See [1], [2] for reference.

[1] http://lists.openstack.org/pipermail/openstack-dev/2017-March/113568.html
[2] http://paste.openstack.org/show/617715/

Change-Id: I27e7208e19726c5325bad2874e43f5d841779008
Co-Authored-By: Omar Tleimat <otleimat@ucla.edu>
2017-10-23 10:08:52 -04:00
chestack
dcbaffe909 Do not validate property network of sahara cluster
enable to use network which is resource creating in template

Change-Id: I2f2014cd1c05bce5f248fe618eecbc4476914662
Closes-Bug: #1726334
2017-10-23 19:25:30 +08:00
Zuul
ec40f1301d Merge "Imported Translations from Zanata" 2017-10-23 07:29:08 +00:00
Zuul
7858ae0a85 Merge "Retrigger new traversals after resource timeout" 2017-10-23 07:08:34 +00:00
Zuul
337ab2b3ce Merge "Make scheduler.Timeout exception hashable" 2017-10-23 07:08:32 +00:00
Zuul
8619dfb6fa Merge "Add integration tests for simultaneous updates" 2017-10-23 07:08:31 +00:00
OpenStack Proposal Bot
8a1ae39d20 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Iacb2ec1ca9ce4177d0af24e1dd3efecf31e26c00
2017-10-23 06:42:51 +00:00
Zuul
b360e3fcaf Merge "Add attributes schema for OS::Keystone::Project" 2017-10-20 15:28:18 +00:00
Zuul
0670ed3429 Merge "Reoder barbican container import" 2017-10-20 12:01:37 +00:00
Zuul
48c9a928e3 Merge "Raise NotFound() when group member does not exist" 2017-10-20 10:27:09 +00:00
Zuul
5318e3d04a Merge "Replace SCREEN_LOGDIR with LOGDIR" 2017-10-20 05:28:00 +00:00
Zane Bitter
2382f46d4e Unit tests: Remove deprecated oslo_db test case classes
Migrate to the new, modern, fixtures-based test framework in oslo_db. This
eliminates about 35 deprecation messages when running the unit tests.

Change-Id: I502c8f9e0718558ae93ff5a568c1ef9ee17ca7f7
2017-10-19 18:03:59 -04:00
Zane Bitter
23c62e30fb Unit tests: Don't leave RPC server running
Several tests started an RPC server (sometimes unnecessarily) and left it
running after the test had concluded. This resulted in messy logs
("Exception in thread Thread-1 (most likely raised during interpreter
shutdown)" and so on) in the console when the test worker exited. Avoid
these by either not starting the RPC server or ensuring it is stopped
before the end of the test.

Change-Id: I8a506c6b83801cc90ad2268875f848b6d73fdea6
2017-10-19 18:03:59 -04:00
Zane Bitter
3545caac56 Unit tests: ensure all threads complete
A number of tests used to leave greenthreads that they had spawned running
beyond the end of the test. This fixes those tests to not start unnecessary
threads and/or to wait for all threads to complete before they finish.

Change-Id: Ic0465dc25235ea3b6ec56646df1cb57878faf748
2017-10-19 17:44:33 -04:00
Zane Bitter
79cc0cc7b9 Don't attempt to update tmpl ID when resource in progress
If we attempt to do a convergence update on a resource and find it already
locked by another traversal, don't try to update the resource's current
template ID or requirements data. Doing so will usually fail with the same
exception, but it is unnecessary and leaves ERROR-level messages in the
log. However, there is a race which could result in the call succeeding
(i.e. if the other task releases the lock just after we fail to get it),
and that could result in the resource not being updated at all.

Change-Id: I6bde1f9359cd52c99cca092e8abc660bac8b3065
Closes-Bug: #1722371
2017-10-18 16:47:53 -04:00
Zane Bitter
bb330ae1a6 Retrigger new traversals after resource timeout
If a resource times out, we still need to check whether there is a new
traversal underway that we need to retrigger, otherwise the new traversal
will never complete.

Change-Id: I4ac7ac88797b7fb14046b5668649b2277ee55517
Closes-Bug: #1721654
2017-10-18 16:47:53 -04:00
Zane Bitter
6a9672a264 Make scheduler.Timeout exception hashable
The python standard library in Python 3.6.3 and earlier has a bug with
handling unhashable exceptions: https://bugs.python.org/issue28603

Although oslo_log will catch the error, make scheduler.Timeout hashable so
that all exceptions will be printable.

Prior to 640abe0c12e63c207fcf67592838f112a29f5b43 we just used __cmp__(),
but that isn't used in Python 3. Defining __eq__(), which is required for
the total_ordering decorator, makes the class unhashable in Python 3.

Change-Id: Idde65b2d41490ab8318b5a8b95ea74e9b96b4e5c
Related-Bug: #1724366
Related-Bug: #1721654
2017-10-18 16:46:39 -04:00
Zane Bitter
fe45b745e5 Add integration tests for simultaneous updates
Convergence allows us to start a stack update while a previous update (or
create) is still in progress. If a resource is found to be locked by a
previous graph traversal when the new traversal comes to update it, the
earlier traversal is responsible for retriggering the resource after it
completes.

This patch adds functional tests to confirm that this works when the
long-running resource update ends in success or failure (as opposed to
timing out or being cancelled).

Change-Id: I5cb0cfd6bb05a94cd32709b5cda8454df6e81a61
2017-10-18 16:46:39 -04:00
Thomas Herve
800e0f3830 Allow configuring payload of noauth middleware
This adds the ability to return a catalog in the noauth middleware
response.

Change-Id: I5413ae4eadd5affdd1ae01678b61eafbe50b7919
Related-Bug: #1724263
2017-10-18 13:57:54 +02:00
huangtianhua
c0f249d05b Hidden OS::Designate::Record and OS::Designate::Domain
We deprecated the resources OS::Designate::Record and
OS::Designate::Domain in ocata, so hidden them now.

Change-Id: I8f0529602f8d2ca50508c4f5ec00d255d078b8a9
2017-10-18 01:27:34 +00:00
huangtianhua
a532535b61 Correct the filter attribute of db model 'ResourcePropertiesData'
Make sure to delete the ResourcePropertiesData row
if the resource 'attr_data_id' has been set already.

Change-Id: I2df5dfc72d051b6619c769c1260ff24b016bc294
Closes-Bug: #1708378
2017-10-16 01:37:10 +00:00
OpenStack Proposal Bot
c5593161d9 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ib058e69f51da0e600e98a7e52b777ca41c86b82a
2017-10-14 10:58:33 +00:00
Jenkins
0a9fcd9136 Merge "Eager load resource_properties_data in resource" 2017-10-13 18:25:36 +00:00
Jenkins
26679638f7 Merge "Fix regex for updated_time in PATCH update api test" 2017-10-13 09:24:01 +00:00
rabi
48fcaf3fb2 Raise NotFound() when group member does not exist
Raise NotFound() exception with proper message when fetching
atrribitutes for a member, that is not in the nested stack.

Change-Id: I8969893781439ef5e87ea9f815d7f22e23be3e78
Closes-Bug: #1723315
2017-10-13 12:19:15 +05:30
Jenkins
728e588028 Merge "Refactor FloatingIP add_dependencies() method" 2017-10-13 04:52:09 +00:00