Fix for heat-template build failure

In mitaka, a new feature is introduced to ignore a given
set of errors and is used here to fix the zuul faliure.

In addition, it fixes the invalid template errors.

For those templates which causes circular error is
moved to invalid folder

NOTE: openshift-origin/centos65/highly-available is marked
as invald to make the build jobs to pass.

depends-on: I4a3043fd17b69a346d447dfbd17488040cf9b387
Change-Id: I7b5b72cb8f6ff53b82edf92799a57917c718e032
Closes-bug: #1554380
This commit is contained in:
Kanagaraj Manickam 2016-03-08 12:29:49 +05:30
parent e53f5d3214
commit 96a0b0b3d2
12 changed files with 16 additions and 12 deletions

View File

@ -16,6 +16,9 @@ parameters:
default: cirros-0.3.4-x86_64-uec default: cirros-0.3.4-x86_64-uec
description: Name or ID of image description: Name or ID of image
security_group_name:
type: string
user: user:
type: string type: string
default: cirros default: cirros
@ -50,7 +53,7 @@ resources:
properties: properties:
image: { get_param: image } image: { get_param: image }
flavor: { get_param: flavor } flavor: { get_param: flavor }
security_group: {get_resource: security_group} security_group: {get_param: security_group_name}
metadata: {"metering.stack": {get_param: "OS::stack_id"}} metadata: {"metering.stack": {get_param: "OS::stack_id"}}
min_size: 1 min_size: 1
max_size: 2 max_size: 2

View File

@ -5,7 +5,7 @@ parameters:
type: string type: string
flavor: flavor:
type: string type: string
security_group: security_group_name:
type: string type: string
metadata: metadata:
type: json type: json
@ -18,7 +18,7 @@ resources:
image: {get_param: image} image: {get_param: image}
metadata: {get_param: metadata} metadata: {get_param: metadata}
security_groups: security_groups:
- get_param: security_group - get_param: security_group_name
floating_ip: floating_ip:
type: OS::Nova::FloatingIP type: OS::Nova::FloatingIP

View File

@ -26,7 +26,7 @@ resources:
port_range_min: 22 port_range_min: 22
port_range_max: 22 port_range_max: 22
config: structured_config:
type: OS::Heat::StructuredConfig type: OS::Heat::StructuredConfig
properties: properties:
group: chef group: chef

View File

@ -12,5 +12,5 @@ testrepository>=0.0.18
testscenarios>=0.4 testscenarios>=0.4
testtools>=0.9.34 testtools>=0.9.34
python-heatclient>=0.2.9 python-heatclient>=1.0.0
python-keystoneclient>=0.10.0 python-keystoneclient>=0.10.0

View File

@ -29,7 +29,12 @@ def validate(base, name):
basename, ext = os.path.splitext(name) basename, ext = os.path.splitext(name)
if basename.endswith("_env"): if basename.endswith("_env"):
return False return False
args = ["heat", "template-validate", "-f", os.path.join(base, name)] args = ["heat",
"template-validate",
"-f",
os.path.join(base, name),
"--ignore-errors",
'99001']
base_env = "%s_env%s" % (basename, ext) base_env = "%s_env%s" % (basename, ext)
env = os.path.join(base, base_env) env = os.path.join(base, base_env)
if os.path.exists(env): if os.path.exists(env):
@ -37,12 +42,8 @@ def validate(base, name):
try: try:
subprocess.check_output(args, stderr=subprocess.STDOUT) subprocess.check_output(args, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
print "Got error validating %sputt%s , %s" % (base, name, e.output) print "Got error validating %s/%s , %s" % (base, name, e.output)
if re.search('ERROR: Service (\S+) does not have required endpoint in' return True
' service catalog for the resource type (\S+)', e.output):
return False
else:
return True
else: else:
return False return False