Instance.deploy fails if nova extension 'Attach_interfaces' is not present

Bug #1364446 reported by Steve McLellan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Steve McLellan

Bug Description

I don't know if this is a problem or an issue with our Openstack configuration, but our nova config does not load the 'Attach_interfaces' extension to nova (http://docs.openstack.org/developer/nova/api/nova.api.openstack.compute.contrib.attach_interfaces.html). This in turn means that the OS::Nova::Server.addresses attribute is not available through Heat, which in turn leads Instance.deploy to fail on line 119:
        - $.ipAddresses: $outputs.get(format('{0}-assigned-ip', $this.name)).values().flatten().addr.list()

Looking at `heat stack-show`, the associated output lists a 404 Not Found error as its value, and this causes the `values()` call not to be allowed. I don't know how integral this extension is, or if there's a reasonable expectation that it will be there. If that is the case, it seems ok to make that a requirement rather than change behavior. An alternative is to use { get_attr: [servername, networks, { get_attr: [<network>, name] }, 0] } which is what replaced the .firstAddress attribute.

The error I saw in the engine logs was:

2014-09-01 22:35:52.582 1528 ERROR murano.common.engine [-]
  yaql.exceptions.YaqlExecutionException: Unable to run values
  Traceback (most recent call last):
    File "/tmp/murano-packages-cache/4977bba6-b68d-46c5-9ddf-4ac81a50676c/io.murano/Classes/Environment.yaml", line 67:13 in method deploy of class io.murano.Environment
        $.applications.pselect($.deploy())
    File "/tmp/murano-packages-cache/4977bba6-b68d-46c5-9ddf-4ac81a50676c/my_package/Classes/MyPackage.yaml", line 55:9 in method deploy of class my_package.MyPackage
        $.primaryInstance.deploy()
    File "/tmp/murano-packages-cache/4977bba6-b68d-46c5-9ddf-4ac81a50676c/io.murano/Classes/resources/Instance.yaml", line 119:24 in method deploy of class io.murano.resources.Instance
        $outputs.get(format('{0}-assigned-ip', $this.name)).values().flatten().addr.list()
    File "/opt/stack/venvs/murano/local/lib/python2.7/site-packages/murano/dsl/helpers.py", line 66 in method evaluate
        return execute_instruction(value, func, context)
    File "/opt/stack/venvs/murano/local/lib/python2.7/site-packages/murano/dsl/helpers.py", line 52 in method execute_instruction
        result = action()
    File "/opt/stack/venvs/murano/local/lib/python2.7/site-packages/murano/dsl/helpers.py", line 62 in method <lambda>
        func = lambda: evaluate(value.evaluate(context), context, 1)
    File "/opt/stack/venvs/murano/local/lib/python2.7/site-packages/murano/dsl/yaql_expression.py", line 73 in method evaluate
        return self._parsed_expression.evaluate(context=context)
    File "/opt/stack/venvs/murano/local/lib/python2.7/site-packages/yaql/expressions.py", line 35 in method evaluate
        return f()
    File "/opt/stack/venvs/murano/local/lib/python2.7/site-packages/yaql/expressions.py", line 73 in method __call__
        this = self.obj_wrapper()
    File "/opt/stack/venvs/murano/local/lib/python2.7/site-packages/yaql/expressions.py", line 73 in method __call__
        this = self.obj_wrapper()
    File "/opt/stack/venvs/murano/local/lib/python2.7/site-packages/yaql/expressions.py", line 73 in method __call__
        this = self.obj_wrapper()
    File "/opt/stack/venvs/murano/local/lib/python2.7/site-packages/yaql/expressions.py", line 103 in method __call__
        'Unable to run ' + self.function_name)
2014-09-01 22:35:52.582 1528 ERROR murano.common.engine [-]
  yaql.exceptions.YaqlExecutionException: Unable to run values

Changed in murano:
importance: Undecided → High
Changed in murano:
milestone: none → juno-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

Fix proposed to branch: master
Review: https://review.openstack.org/119072

Changed in murano:
assignee: nobody → Steve McLellan (sjmc7)
status: New → In Progress
Changed in murano:
assignee: Steve McLellan (sjmc7) → Stan Lagun (slagun)
Changed in murano:
assignee: Stan Lagun (slagun) → Steve McLellan (sjmc7)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/119072
Committed: https://git.openstack.org/cgit/stackforge/murano/commit/?id=ab15f95c594a6e4583b2f36b5e33c344a33c70f5
Submitter: Jenkins
Branch: master

commit ab15f95c594a6e4583b2f36b5e33c344a33c70f5
Author: Steve McLellan <email address hidden>
Date: Thu Sep 4 09:13:06 2014 -0500

    Don't rely on OS::Nova::Server.addresses

    Server.addresses's implementation in Heat is dependent on a nova extension
    which is not guaranteed to be present. I'm not sure if this is something
    that should be fixed in Heat or not, but this is a workaround that
    results in the same information (instance.ipAddresses will be set to a
    list of all IP addresses across all networks the instance is assigned
    to).

    Change-Id: I5154f7e2a69ab8e64f9fbd1d8a26daf07f2482cd
    Closes-Bug: 1364446

Changed in murano:
status: In Progress → Fix Committed
Changed in murano:
status: Fix Committed → Fix Released
Changed in murano:
milestone: juno-rc1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.