fail to create stack: TypeError: create() takes at least 4 arguments (4 given)

Asked by futangw

If use below template to create a stack, it will be failed with errors, but when i removed "user_data_format: SOFTWARE_CONFIG" from the template, then it works. Is it a bug of heat? Another interesting thing was that the template (with 'user_data_format: SOFTWARE_CONFIG' inside) worked fine several days ago. Cann't figure out what's changed.

2016-12-16 04:33:58.970 22011 INFO heat.engine.resource [req-71c7fafb-10f9-44b0-890b-878f6b1a81a9 0338c68cf5254c6dadb128ee5607303a 54ad5f573f2346a1bfb8383489er "VDU1" Stack "demo-vnf" [e1741245-377a-4a02-b046-ffaa5d0a6d59]
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource Traceback (most recent call last):
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 753, in _action_recorder
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource yield
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 855, in _do_action
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource yield self.action_handler_task(action, args=handler_args)
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/scheduler.py", line 336, in wrapper
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource step = next(subtask)
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 800, in action_handler_task
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource handler_data = handler(*args)
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/openstack/nova/server.py", line 842,
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource self._create_transport_credentials(self.properties)
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/openstack/nova/server.py", line 769, ntials
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource self._create_keypair()
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/resources/stack_user.py", line 133, in _create_
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource user_id=user_id, project_id=self.stack.stack_user_project_id)
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/heat/engine/clients/os/keystone/heat_keystoneclient.py", limain_user_keypair
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource project=project_id)
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource return wrapped(*args, **kwargs)
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource TypeError: create() takes at least 4 arguments (4 given)
2016-12-16 04:33:58.970 22011 ERROR heat.engine.resource
2016-12-16 04:33:59.006 22011 INFO heat.engine.stack [req-71c7fafb-10f9-44b0-890b-878f6b1a81a9 0338c68cf5254c6dadb128ee5607303a 54ad5f573f2346a1bfb83834895e1ILED (demo-vnf): Resource CREATE failed: TypeError: resources.VDU1: create() takes at least 4 arguments (4 given)

The heat template:
1 heat_template_version: '2013-05-23'
      2 description: test
      3 outputs:
      4 mgmt_ip-VDU1:
      5 value:
      6 get_attr: [CP1, fixed_ips, 0, ip_address]
      7 parameters: {}
     10
     11 resources:
     12 CP1:
     13 properties: {network: demo-net, port_security_enabled: false}
     14 type: OS::Neutron::Port
     15 VDU1:
     16 properties:
     17 availability_zone: nova
     18 config_drive: false
     19 flavor: {get_resource: VDU1_flavor}
     20 image: cirros-0.3.0
     21 networks:
     22 - port: {get_resource: CP1}
     23 user_data_format: SOFTWARE_CONFIG
     24 type: OS::Nova::Server
     25 VDU1_flavor:
     26 properties: {disk: 1, ram: 512, vcpus: 1}
     27 type: OS::Nova::Flavor

Other info:
i'm using Newton with heat version 1.5.0.
heat --version
1.5.0

would anyone kind help on this?

thansk,
steve

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu heat Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
futangw (futangw) said :
#1

another workaround is to change 'user_data_format: RAW' (from SOFTWARE_CONFIG), the template also works.

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
wanghuagong (whgfirst) said :
#3

I have the same problem, any help?