Ask Your Question
0

Not able to create stack in heat, error Property error : psmf: image 'NoneType' object has no attribute '__getitem

asked 2016-02-29 03:50:00 -0500

RuchikaChugh gravatar image

updated 2016-03-01 05:40:17 -0500

Openstack version : Juno 2-node setup, controller on one node, compute on another, Centos server Nova networking Trying to create a server using the yaml template but even before launching the stack, it fails. Template file The same image can be used to launch other instances using nova in teh same setup. The same yaml file is used on other openstack setup and it worked.

h

eat_template_version: 2013-05-23

description: Heat Stack with for StepIN with userdata.

parameters:
  Psmf_Image:
    type: string
    description: Image use to boot PSMF Machine.
    default: OSP52_PSMF
  Psmf_Flavor:
    type: string
    description: Flavor for PSMF Machine.
  Ext_Net:
    type: string
    description: External Network ID for the setup.
  Psmf_Name:
    type: string
    description: Host Name for PSMF machine.
    default: OSP53P

resources:
  psmf:
    type: OS::Nova::Server
    properties:
      name: { get_param: Psmf_Name }
      flavor: { get_param: Psmf_Flavor }
      image: { get_param: Psmf_Image }
      networks:
      - network: { get_param: Ext_Net }
      user_data:
        str_replace:
          template: |
            #!/bin/bash
            echo "Changing HostName"
            hostname $HOST_NAME
            OLD_HOSTNAME=`cat /etc/sysconfig/network | grep -i "HOSTNAME" | awk -F"=" '{print $2}'`
            COMMAND="sed -i 's/$OLD_HOSTNAME/$HOST_NAME/' /etc/sysconfig/network"
            eval $COMMAND
          params:
            $HOST_NAME: { get_param: Psmf_Name }

outputs:
  PSMF_Name:
    description: PSMF Host Name.
    value: { get_param: Psmf_Name }
  PSMF_Networks:
    description: IP Addresses of PSMF Machine.
    value: { get_attr: [ psmf, networks ] }

Logs: heat-api.log READ[3f21440]: '\x0b\x01\x00\x16\x00\x01\x00\x00\x00\x00\x00\x00\x04\x01\x01\x00\x07\x00\x010\x01\x00\x03\x02\x00\x95\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00K\x04\x03\x10\x01\x08amqp/map\x00\x00\x00:\x00\x00\x00\x01\x0cqpid.subject\x95\x00&reply_8c208c8154344c2d8d273bcde11ab13e\x00\x00\x006\x04\x01\x00\x03\namq.direct&reply_8c208c8154344c2d8d273bcde11ab13e\x07\x03\x04\x98\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x04\x88\x00\x00\x00\x02\x0coslo.message\x95\x04a{"_unique_id": "a3dc14dfa15541f18da4934a9ffdda3c", "failure": "{\"args\": [], \"module\": \"heat.common.exception\", \"kwargs\": {\"message\": \"Property error : psmf: image \'NoneType\' object has no attribute \'__getitem__\'\"}, \"message\": \"Property error : psmf: image \'NoneType\' object has no attribute \'__getitem__\'\", \"tb\": [\"Traceback (most recent call last):\\n\", \" File \\\"/usr/lib/python2.7/site-packages/heat/engine/service.py\\\", line 69, in wrapped\\n return func(self, ctx, args, *kwargs)\\n\", \" File \\\"/usr/lib/python2.7/site-packages/heat/engine/service.py\\\", line 645, in create_stack\\n owner_id)\\n\", \" File \\\"/usr/lib/python2.7/site-packages/heat/engine/service.py\\\", line 568, in _parse_template_and_validate_stack\\n stack.validate()\\n\", \" File \\\"/usr/lib/python2.7/site-packages/heat/engine/stack.py\\\", line 461, in validate\\n raise ex\\n\", \"StackValidationFailed: Property error : psmf: image \'NoneType\' object has no attribute \'__getitem__\'\\n\"], \"class\": \"StackValidationFailed\"}", "result": null, "_msg_id": "51d356fa99f341e88a6f913834b0cd07"}\x0coslo.version\x95\x00\x032.0' readable /usr/lib/python2.7/site-packages/qpid/messaging/driver.py:449

Heat-engine.log

2016-02-29 14:47:09.817 26419 INFO heat.engine.resource [req-07c974d8-0bf2-43f2-a89f-1cb4e53342dd None] Validating Server "psmf" 2016-02-29 14:47:09.818 26419 WARNING heat.common.keystoneclient [req-07c974d8-0bf2-43f2-a89f-1cb4e53342dd None] stack_user_domain_id or stack_user_domain_name not set in heat.conf falling back to using default 2016-02-29 14:47:09.818 26419 DEBUG heat.common.keystoneclient [req-07c974d8-0bf2-43f2-a89f-1cb4e53342dd None] Using stack domain None __init__ /usr/lib/python2.7/site-packages/heat ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-03-02 04:58:58 -0500

RuchikaChugh gravatar image

updated 2016-03-02 05:00:26 -0500

Logs showed that the creation was not even triggering below compute service. So, heat-engine was trying to authenticate itself from keystone. the keystone service-list was duplicate somehow.

keystone service-list +----------------------------------+----------+----------------+------------------------------+ | id | name | type | description |

+----------------------------------+----------+----------------+------------------------------+
| f0b2248d6ca94e8ba3e456b2ecdc6a43 |  glance  |     image      |   OpenStack Image Service    |
| 237ce8142431492cb497ebdde70c7dbb |   heat   | orchestration  |        Orchestration         |
| 1209060bd3ef479dbceee67618896ffe | heat-cfn | cloudformation | Orchestration CloudFormation |
| 952c379cb6744d129effd69a0708ff8c | keystone |    identity    |      OpenStack Identity      |
| bbff085af45341d98d6d23086386bd76 | keystone |    identity    |      OpenStack Identity      |
| dace62a3521443279eb0bb9f430d35f8 | keystone |    identity    |      OpenStack Identity      |
| c97d37dd3b1d4b2dbd4abe66314b1b27 |   nova   |    compute     |      OpenStack Compute       |

+----------------------------------+----------+----------------+------------------------------+

Checked which one has endpoint,

keystone endpoint-list

+----------------------------------+-----------+-----------------------------------------+-----------------------------------------+-----------------------------------------+----------------------------------+
|                id                |   region  |                publicurl                |               internalurl               |                 adminurl                |            service_id            |
+----------------------------------+-----------+-----------------------------------------+-----------------------------------------+-----------------------------------------+----------------------------------+
| 828fa0d43ff144c390aba9bddab56a7c | regionOne |        http://controller:8000/v1        |        http://controller:8000/v1        |        http://controller:8000/v1        | 1209060bd3ef479dbceee67618896ffe |
| d474bbd87737404eb02e27cfc5625c45 | regionOne |          http://controller:9292         |          http://controller:9292         |          http://controller:9292         | f0b2248d6ca94e8ba3e456b2ecdc6a43 |
| d689fe08c5f849d88f9c7ecf9f377c63 | regionOne | http://controller:8774/v2/%(tenant_id)s | http://controller:8774/v2/%(tenant_id)s | http://controller:8774/v2/%(tenant_id)s | c97d37dd3b1d4b2dbd4abe66314b1b27 |
| e91cfaa81cde44148d1276c1ce2c2099 | regionOne |       http://controller:5000/v2.0       |       http://controller:5000/v2.0       |       http://controller:35357/v2.0      | ***bbff085af45341d98d6d23086386bd76*** |
| f5553abef17b4eb59fd4eb11e849a5cc | regionOne | http://controller:8004/v1/%(tenant_id)s | http://controller:8004/v1/%(tenant_id)s | http://controller:8004/v1/%(tenant_id)s | 237ce8142431492cb497ebdde70c7dbb |
+----------------------------------+-----------+--------

Deleted the others and the stack creation started.

k

eystone service-list
+----------------------------------+----------+----------------+------------------------------+
|                id                |   name   |      type      |         description          |
+----------------------------------+----------+----------------+------------------------------+
| f0b2248d6ca94e8ba3e456b2ecdc6a43 |  glance  |     image      |   OpenStack Image Service    |
| 237ce8142431492cb497ebdde70c7dbb |   heat   | orchestration  |        Orchestration         |
| 1209060bd3ef479dbceee67618896ffe | heat-cfn | cloudformation | Orchestration CloudFormation |
| bbff085af45341d98d6d23086386bd76 | keystone |    identity    |      OpenStack Identity      |
| c97d37dd3b1d4b2dbd4abe66314b1b27 |   nova   |    compute     |      OpenStack Compute       |
+----------------------------------+----------+----------------+------------------------------+
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-02-29 03:45:44 -0500

Seen: 795 times

Last updated: Mar 02 '16