image 'NoneType' object has no attribute 'replace'

Bug #1468031 reported by DWang on 2015-06-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Zoltan Arnold Nagy

Bug Description

I followed the installation guide to verify my heat installation, however, I can't create a stack. My template is exactly the same as "installation guide for Ubuntu 14.04 LTS":('=''s are only used to separate different sections)

heat_template_version: 2014-10-16
description: A simple server.

    type: string
    description: Image use to boot a server
    type: string
    description: Network ID for the server

    type: OS::Nova::Server
      image: { get_param: ImageID }
      flavor: m1.tiny
      - network: { get_param: NetID }

    description: IP address of the server in the private network
    value: { get_attr: [ server, first_address ] }

The command I used to create a stack is:
# NET_ID=$(nova net-list | awk '/ demo-net / { print $2 }')
# heat stack-create -f test-stack.yml -P "ImageID=cirros-0.3.3-x86_64;NetID=$NET_ID" testStack

This is the error I get:
2015-06-24 01:21:41.435 8092 DEBUG heat.common.serializers [req-7d0fee69-93ef-4ad9-857d-c99acdd81ba6 admin admin] JSON response : {"explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400, "error": {"message": "Property error : server: image 'NoneType' object has no attribute 'replace'",
"traceback": "Traceback (most recent call last):\n\n
File \"/usr/lib/python2.7/dist-packages/heat/common/\", line 300, in wrapped\n return func(self, ctx, *args, **kwargs)\n\n
File \"/usr/lib/python2.7/dist-packages/heat/engine/\", line 669, in create_stack\n parent_resource_name)\n\n
File \"/usr/lib/python2.7/dist-packages/heat/engine/\", line 577, in _parse_template_and_validate_stack\n stack.validate()\n\n
File \"/usr/lib/python2.7/dist-packages/osprofiler/\", line 105, in wrapper\n return f(*args, **kwargs)\n\n
File \"/usr/lib/python2.7/dist-packages/heat/engine/\", line 613, in validate\n raise ex\n\nStackValidationFailed: Property error : server: image 'NoneType' object has no attribute 'replace'\n", "type": "StackValidationFailed"}, "title": "Bad Request"} to_json /usr/lib/python2.7/dist-packages/heat/common/

DWang (darren-wang) on 2015-06-23
description: updated
DWang (darren-wang) on 2015-06-23
description: updated
Steve Baker (steve-stevebaker) wrote :

what version of heat-engine do you have installed?

Do you have a glance image named cirros-0.3.3-x86_64?

Changed in heat:
status: New → Incomplete
DWang (darren-wang) on 2015-06-24
tags: added: heat
DWang (darren-wang) wrote :

It seems I'm using the heat (2015.1.0), I do have a "cirros-0.3.3-x86_64":

# nova image-show cirros-0.3.3-x86_64
| Property | Value |
| OS-EXT-IMG-SIZE:size | 13200896 |
| created | 2015-01-17T08:00:18Z |
| id | e73d12b2-8b3a-4e58-a232-521146bf96ce |
| minDisk | 0 |
| minRam | 0 |
| name | cirros-0.3.3-x86_64 |
| progress | 100 |
| status | ACTIVE |
| updated | 2015-01-17T08:00:18Z |

Changed in heat:
assignee: nobody → Razumovsky Peter (prazumovsky)
Peter Razumovsky (prazumovsky) wrote :

OK, DWang, I can't reproduce your issue now, can you give me some additional information:
1. Do you have demo-net in nova net-list?
2. Do you use fresh stable heat version of 2015.1?

DWang (darren-wang) wrote :
Download full text (4.2 KiB)

@Razumovsky Peter (prazumovsky) , the answer to question 1 is yes, as for the second question, when I run "$ pip show heat", I get this:
Metadata-Version: 1.1
Name: heat
Version: 2015.1.0
Summary: OpenStack Orchestration
Author: OpenStack
Author-email: <email address hidden>
License: UNKNOWN
Location: /usr/lib/python2.7/dist-packages
Requires: pbr, Babel, eventlet, greenlet, httplib2, iso8601, keystonemiddleware, kombu, lxml, netaddr, oslo.config, oslo.concurrency, oslo.context, oslo.db, oslo.i18n, oslo.log, oslo.messaging, oslo.serialization, oslo.utils, osprofiler, oslo.versionedobjects, PasteDeploy, posix-ipc, pycrypto, python-ceilometerclient, python-cinderclient, python-glanceclient, python-heatclient, python-keystoneclient, python-neutronclient, python-novaclient, python-saharaclient, python-swiftclient, python-troveclient, PyYAML, requests, Routes, six, SQLAlchemy, sqlalchemy-migrate, stevedore, WebOb
  AWSTemplateFormatVersion.2010-09-09 = heat.engine.cfn.template:CfnTemplate
  heat_template_version.2013-05-23 =
  heat_template_version.2015-04-30 =
  HeatTemplateFormatVersion.2012-12-12 = heat.engine.cfn.template:HeatTemplate
  heat_template_version.2014-10-16 =
  heat.engine.resources = heat.engine.resources:list_opts
  heat.common.config = heat.common.config:list_opts
  heat_integrationtests.common.config = heat_integrationtests.common.config:list_opts
  heat.common.crypt = heat.common.crypt:list_opts
  heat.common.heat_keystoneclient = heat.common.heat_keystoneclient:list_opts
  heat.openstack.common.policy = heat.openstack.common.policy:list_opts
  heat.api.middleware.ssl = heat.api.middleware.ssl:list_opts
  heat.common.wsgi = heat.common.wsgi:list_opts =
  heat.openstack.common.eventlet_backdoor = heat.openstack.common.eventlet_backdoor:list_opts
  heat.engine.notification = heat.engine.notification:list_opts
  heat.engine.clients = heat.engine.clients:list_opts
  sahara.image = heat.engine.clients.os.sahara:ImageConstraint
  nova.flavor = heat.engine.clients.os.nova:FlavorConstraint
  nova.keypair = heat.engine.clients.os.nova:KeypairConstraint
  cinder.volume = heat.engine.clients.os.cinder:VolumeConstraint
  nova.server = heat.engine.clients.os.nova:ServerConstraint
  iso_8601 = heat.engine.iso_8601:ISO8601Constraint
  trove.flavor = heat.engine.clients.os.trove:FlavorConstraint = heat.engine.clients.os.neutron:NetworkConstraint
  neutron.port = heat.engine.clients.os.neutron:PortConstraint
  neutron.router = heat.engine.clients.os.neutron:RouterConstraint
  cinder.vtype = heat.engine.clients.os.cinder:VolumeTypeConstraint
  neutron.subnet = heat.engine.clients.os.neutron:SubnetConstraint
  glance.image = heat.engine.clients.os.glance:ImageConstraint
  cinder.snapshot = heat.engine.clients.os.cinder:VolumeSnapshotConstraint


Steve Baker (steve-stevebaker) wrote :

Can you confirm that your heat.conf [keystone_authtoken] auth_uri is set to your keystone/identity endpoint?

If not, then set that value and restart heat-engine and heat-api

DWang (darren-wang) wrote :

@Steve Baker (steve-stevebaker)
You are absolutely right that the problem is between authtoken and keystone.

I checked configurations realted to keystone in my heat.conf, here it is:





auth_uri = http://PUBLIC_KEYSTONE:5000 # I replaced the public URL of our keystone
auth_url = http://controller1:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = heat
password = PASSWORD


I used username and password of user heat to login through openstackclient + v3_auth_api_version and it succeeded.

Can you find any clue or some other more information?

DWang (darren-wang) wrote :

oh, dose this configuraion matter:


It seems I'm using the custombackend pipeline.

Changed in heat:
assignee: Peter Razumovsky (prazumovsky) → nobody
Zoltan Arnold Nagy (zoltan) wrote :

I've run into the same issue on 14.04

Changed in heat:
status: Incomplete → Confirmed
Zoltan Arnold Nagy (zoltan) wrote :

so I've tracked down the culprit. You need to have auth_uri configured in your keystone authtoken configuration else you'll get this. I'll submit a patch to make it more nice and/or handle the behavior more nicely.

Changed in heat:
assignee: nobody → Zoltan Arnold Nagy (zoltan)
DWang (darren-wang) wrote :

@Zoltan Arnold Nagy (zoltan) , Hi, but I have auth_uri configured, you can see it in the configuration I gave.

Zoltan Arnold Nagy (zoltan) wrote :

You're absolutely right, I missed that.

Can you try setting your [keystone_authtoken] as shown below report back? Thanks!

identity_uri = http://internal adminend point:35357
auth_uri = http://external public endpoint:5000/v2.0
auth_protocol = http
admin_tenant_name = admin tenant's name
admin_user = admin user's name
admin_password = admin user's password

Thomas Herve (therve) on 2017-02-24
Changed in heat:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers