6478 Commits

Author SHA1 Message Date
Jenkins
c43107522c Merge "Make sure that AutoScalingGroup depends on the launch config" 2014-10-23 13:46:12 +00:00
Jenkins
42be8e738d Merge "Fix add_dependencies for floating_ip resource" 2014-10-23 13:23:40 +00:00
OpenStack Proposal Bot
de8860cd8c Imported Translations from Transifex
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Ide1d11b076d74a15f7a7646db8af2395fb077539
2014-10-23 06:01:03 +00:00
Jenkins
ce6dac20fe Merge "Validate tenant_id part of TempURL in clients" 2014-10-22 15:11:52 +00:00
Jenkins
065de8289c Merge "Don't import HeatTestCase directly" 2014-10-22 14:50:41 +00:00
Jenkins
636f2420f0 Merge "Remove the deprecated heat/db/sync" 2014-10-22 11:08:02 +00:00
Sergey Kraynev
29dbe69751 Fix add_dependencies for floating_ip resource
The cause of problem is related with tricky method of Dependencies
class. So required_by method returns dictionary with resources which
have current resource in dependency. In the same time port resource
does not require floating ip, contrariwise floating ip require port.
As result required_by will not return depended port. There is one
way to solve issue: use dictionary of requires resources.

Also this patch fixes missed code error with incorrect using properties
attribute for value fixed_ip.

Notice that both these issues were not detected, because:
 - method port_on_subnet is not executed, because required_by was always
   empty dictionary.
 - current test has shadow mistake. Dependencies for router_interface
   always contain FloatingIP resource, because router gateway also was
   presented in using templates and during creation graph FloatingIp
   automatically was added to result dictionary.

Change-Id: Ida30e51d526a3f5d2a4d0a4102b1036f1c518302
Closes-Bug: #1384114
2014-10-22 05:42:18 -04:00
Jenkins
aeb8cf8ff0 Merge "Halt test_cinder_volume_create_backup_restore on error" 2014-10-22 09:24:44 +00:00
Zhenguo Niu
09ecdc55a0 Don't import HeatTestCase directly
Fix the HeatTestCase import issue as required by H302,
a following patch of https://review.openstack.org/#/c/129846/

Change-Id: Iab9a508682e9fe2932b7d00b191c8a4cdea4738b
2014-10-22 14:15:11 +08:00
Jenkins
5993971832 Merge "Add some imports to hacking import_exceptions" 2014-10-22 04:29:10 +00:00
Jenkins
52870d148c Merge "Tolerate null on Json db load" 2014-10-22 02:53:58 +00:00
Jenkins
020eddb9bf Merge "Make HARestarter do a proper lookup of the RefID" 2014-10-22 02:49:49 +00:00
Zhenguo Niu
092d400098 Add some imports to hacking import_exceptions
To avoid H302 check, add most common imports to import_exceptions.
from heat.common.i18n import _
from heat.common.i18n import _LE
from heat.common.i18n import _LI
from heat.common.i18n import _LW

Change-Id: I4e4d1462d4c351e08a09d935a5a177c1d8954e06
2014-10-22 09:38:07 +08:00
Jenkins
5622e02a60 Merge "ResourceGroup add remove_policies property" 2014-10-21 19:55:13 +00:00
Jenkins
466937da1f Merge "Fix DB2 column 'id' autoincrement issue" 2014-10-21 18:47:07 +00:00
Jenkins
33c2476460 Merge "Columns needs to be non-nullable for DB2" 2014-10-21 17:39:13 +00:00
Zane Bitter
c4dd7d70b5 Make HARestarter do a proper lookup of the RefID
HARestarter is a primitive prototype that is barely maintained.  Its
implementation still dates to the era when the resource name, physical
resource ID and RefId were regularly used interchangably.

This change substitutes Stack.resource_by_refid() for the previous
(incorrect) home-grown hack, so that at least the giant red flags will be
easy to grep for.

Change-Id: I9d81dfcd5d34282c8bd83bbd98350e75c1ec0eb2
Closes-Bug: #1381136
2014-10-21 13:04:52 -04:00
Zhenguo Niu
b54949219a Remove the deprecated heat/db/sync
CLI 'python -m heat.db.sync' doesn't work anymore.

Change-Id: Id3b0376a3f5f93330117d45fc5f68c719a849a19
2014-10-21 23:29:13 +08:00
Jenkins
78c9e0f67a Merge "Inherit roles for create_trust_context()" 2014-10-21 14:14:22 +00:00
Jenkins
717e755874 Merge "stack delete fails when instance is soft deleted" 2014-10-21 10:31:40 +00:00
Jenkins
4173deb57f Merge "Don't stop update immediately on error" 2014-10-21 10:31:31 +00:00
Jenkins
d21c8357de Merge "Functional test UpdateStackTest" 2014-10-21 10:27:48 +00:00
Angus Salkeld
bbe47783b5 Make sure that AutoScalingGroup depends on the launch config
It seems to be common error to do the following:
  LaunchConfigurationName: my_config
and not include a depends_on.

Largely because of the unfortunate property name.
So this patch tries to make sure the user has the
correct dependency in place.

Change-Id: I4f7d282d0af8681dc2c8cd265e16a27fe23a3bdb
Closes-bug: #1375777
2014-10-21 10:48:28 +10:00
Steve Baker
9b792fb6a3 Tolerate null on Json db load
A icehouse->juno migration issue has surfaced where
resource.properties_data is null for existing resource records.

This change fixes the Json db type to treat None the same as
the serialized JSON 'null'.

Change-Id: Ia0b9a23a7798c95fbbcba439ffb8203b50367e7c
Closes-Bug: #1383505
2014-10-21 11:49:10 +13:00
Jenkins
53834a0195 Merge "Fix support status for OS::Heat::SoftwareComponent" 2014-10-20 22:31:16 +00:00
Steve Baker
d16a32886b Halt test_cinder_volume_create_backup_restore on error
test_cinder_volume_create_backup_restore fails frequently due to issues
outside heat. Instead of failing, this change halts the test when the
error condition is triggered. This will allow some of the test to run
while making the check job voting.

Once logging is configured in heat_integrationtests an elastic-recheck
search can monitor for the frequency of this error to aid
nova/cinder/swift developers to fix it.

Change-Id: I09722ad725a8d23fb2028c17b0dd9fcab3957649
Related-Bug: #1382300
2014-10-21 11:08:50 +13:00
Steven Hardy
c209a9644d ResourceGroup add remove_policies property
To cater for the requirement of TripleO (and others) to specify a
victim for removal from a Resource group ("eliding" in merge.py speak)
add a new property, which enables specific indexes to be passed on
update, which will force removal of those specific resources.

In future it may be that we add additional ways to specify the removal
policy, so this interface is a list of policies, with each policy being
a map taking an optional list of arguments.

'resource_list' policy added now, which takes one of the following:

1. Resource name (as specified in the nested stack, obtainable e.g via
heat resource-list --nested-depth $n <parent stack>, or by doing
resource-list directly using the nested stack ID obtainable via
physical_resource_id of the ResourceGroup resource.

2. The nested resource refid - this is typically (but not always,
particularly for AWS resources) the resource physical_resource_id,
and is obtainable via either get_resource or the "refs" attribute
of the ResourceGroup.

Note that once removed, the resource name is never reused, so the
%index%, where used, will always increment on replacement.

Change-Id: Icbc76b54bae3eb39efdaa704b036b1bbb94db206
blueprint: resourcegroup-force-remove
2014-10-20 22:51:28 +01:00
Jenkins
a6e9a94c6c Merge "Don't shadow local variables "resource"" 2014-10-20 17:37:30 +00:00
Jenkins
614da6ba87 Merge "Add support_status to SoftwareDeployments" 2014-10-20 17:18:40 +00:00
Jenkins
1cfd190648 Merge "Catch correct exception for Cinder api version detection" 2014-10-20 17:17:52 +00:00
Angus Salkeld
a2a2bb407b Don't shadow local variables "resource"
We could rename the local variables, but it's just as easy to not
use the resource module. Since the functions are not used, remove them.

Change-Id: I356fbe0042f24aba78fba5deebe7fa645a035d96
2014-10-20 22:23:56 +10:00
Thomas Spatzier
a19d514cac Fix support status for OS::Heat::SoftwareComponent
Since SoftwareComponent is derived from SoftwareConfig, the support
status 2014.1 inherited from SoftwareConfig was incorrectly shown for
the SoftwareComponent resource.
This patch fixes the problem by correctly setting support_status in
the SoftwareComponent resource.

Change-Id: I973755f11e21ccb4f8bbc532da4de964e07c65f1
2014-10-20 13:58:31 +02:00
Jenkins
89f82480c9 Merge "Do not match subnets if no networks defined" 2014-10-20 11:39:56 +00:00
Jenkins
235b8f6fcb Merge "Imported Translations from Transifex" 2014-10-20 11:32:40 +00:00
Jenkins
af9b66ed51 Merge "Put a cap on our cyclomatic complexity" 2014-10-20 10:27:44 +00:00
OpenStack Proposal Bot
d50620916c Imported Translations from Transifex
Change-Id: I528b305a970abfa75d2a44c7a8787d09ac5602a5
2014-10-20 06:02:17 +00:00
Steve Baker
8f50ef5b75 Functional test UpdateStackTest
This is a port of tempest.api.orchestration.stacks.stack_update
in an effort to reproduce the postgres race described in
bug #1370865.

Subsequent changes will create an experimental postgres check job and
a change to the test which runs test_stack_update_add_remove enough
times to triger the race.

Change-Id: I8aee26e29f242b11a5d3c8d56a859ae770be86c2
Related-Bug: #1370865
2014-10-20 16:31:09 +13:00
huangtianhua
ddd6fc16d7 Don't stop update immediately on error
When an error occurs during a stack update operation,
don't immediately stop the operation. Instead,
wait up to 4 minutes for resources already in progress
to complete before forcibly cancelling them.

Change-Id: Ib089dbc675c519668a44d1b0e3214feca5079978
Closes-bug: #1381984
2014-10-20 10:55:20 +08:00
huangtianhua
aab01c00ff Inherit roles for create_trust_context()
This change the default value of the option
'trusts_delegated_roles' to []. And delegate all of
the trustor roles when create the trust unless
user set the option to subset roles.

Change-Id: I3f1b70b78b91bfac9af5fadb71140679b208c999
Closes-bug: #1376562
2014-10-20 02:49:59 +00:00
Steve Baker
a1037cb19c Add support_status to SoftwareDeployments
Change-Id: Icb468b4e3033ae28aa47045fdc18fdcd83f264dc
Closes-Bug: #1383064
2014-10-20 13:27:24 +13:00
Randall Burt
59085e2d66 Catch correct exception for Cinder api version detection
Catch the EndpointNotFound exception raised by Keystone rather
than the one thrown by Cinder since keystoneclient raises keystone
exceptions and not cinder exceptions. Also update the fake
keystone client to mirror this behavior.

Change-Id: I9f4579cf55fc697470dd8803553d7968e22a6bec
Closes-Bug: #1382659
2014-10-17 14:39:25 -05:00
Jenkins
6b9a2b54c7 Merge "Add unicode support for resource name" 2014-10-17 08:10:37 +00:00
Jenkins
5683185f2a Merge "ResourceGroup update refactor" 2014-10-17 06:54:53 +00:00
Jenkins
5d48414711 Merge "Support Cinder scheduler hints" 2014-10-17 06:40:59 +00:00
Angus Salkeld
ed65470992 Put a cap on our cyclomatic complexity
flake8 has support for cyclomatic complexity (Mccabe) currently our
worst offender has a complexity of 28 (25 is considered very bad). So
set our max-complexity to 29 so we at least don't make things any worse.

This is the first step in bringing this number down to 20 or so.

https://github.com/flintwork/mccabe

Change-Id: Ic90093ab80d9d3e27c257ea1a5cc393e09ebc7ee
2014-10-17 14:20:09 +10:00
Jenkins
98ccd9a3b6 Merge "Ensure all Neutron LoadBalancer members are deleted" 2014-10-16 19:14:57 +00:00
Adrien Vergé
94f80c092d Support Cinder scheduler hints
Add a 'scheduler_hints' option for OS::Cinder::Volume objects, as is
it already done for OS::Nova::Server.

Implements: blueprint cinder-scheduler-hints
Change-Id: I090359c212df1d17b10e374d2e80e22344017aee
2014-10-16 20:50:01 +02:00
Jenkins
d400d0a94f Merge "Remove vim headers" 2014-10-16 18:31:14 +00:00
Jenkins
b155b11ffb Merge "Update api docstrings to match guidelines" 2014-10-16 18:21:42 +00:00
Oleksii Chuprykov
29dfc78d04 Remove vim headers
No need to set tabstop tons of times, this can be set in your vimrc
file instead.

Closes-Bug: #1229324

Change-Id: Ib859c0af8a29437540a0586dc0af77bb544ece23
2014-10-16 17:54:42 +03:00