assigning port to instance gives 401 from nova
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I'm trying to create an instance with a floating IP, and heat fails.
My template is as follows:
---
heat_template_
description: Illustration to create a single instance with a floating ip.
resources:
instance_1_port:
type: OS::Neutron::Port
properties:
network: wts-net-01
security_
- default
instance_1:
type: OS::Nova::Server
properties:
image: "Ubuntu 14.04"
flavor: m1.small
key_name: harm-at-manbearpig
networks:
# - port: { get_resource: instance_1_port }
- network: wts-net-01
floating_ip:
type: OS::Neutron:
properties:
floating_
floating_
type: OS::Neutron:
properties:
floatingi
port_id: { get_resource: instance_1_port }
outputs:
instance_1_name:
description: Name of instance
value: { get_attr: [instance_1, name] }
instance_ip:
description: External floating IP
value: { get_attr: [floating_ip, floating_
---
Now when using it as the above, all goes well and everything is created just fine (though without floatingip mapping). When I replace the instance_1 networks: part to use the specified port I receive an error from nova, which originates from Neutron:
2015-03-12 20:04:30.838 30609 INFO heat.engine.stack [-] Stack CREATE FAILED (test-setup): Resource CREATE failed: ClientException: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-b138a707-
2015-03-12 20:04:30.845 30609 INFO heat.engine.service [-] Stack create failed, status FAILED
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack rv = f(*args, **kwargs)
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack check_server_
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack max_count)
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack pci_request_info, requested_networks)
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack context, neutron, request_
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack fields=
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack ret = obj(*args, **kwargs)
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack ret = self.function(
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack return self.get(
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack ret = obj(*args, **kwargs)
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack headers=headers, params=params)
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack ret = obj(*args, **kwargs)
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack headers=headers, params=params)
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack ret = obj(*args, **kwargs)
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack self.httpclient
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack self.authenticate()
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack self._authentic
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack allow_redirects
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack File "/usr/lib/
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack raise exceptions.
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack Unauthorized: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
2015-03-12 20:04:29.666 1993 TRACE nova.api.openstack
I can't reproduce this bug in master.
What's version of your?