Failed to attach interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Liyingjun |
Bug Description
when i try to attach a existing port to an instance using command: nova interface-attach --port-id <port-id> <instance-id>, i get an error: Failed to attach interface
Step to reproduce:
stacker@stack:~$ neutron port-create 2cac259a-
Created a new port:
+------
| Field | Value |
+------
| admin_state_up | True |
| allowed_
| binding:host_id | |
| binding:profile | {} |
| binding:vif_details | {} |
| binding:vif_type | unbound |
| binding:vnic_type | normal |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "991d821c-
| id | 620c1351-
| mac_address | fa:16:3e:4f:83:59 |
| name | |
| network_id | 2cac259a-
| security_groups | 06aaa36c-
| status | DOWN |
| tenant_id | 270850a2c3cd46d
+------
stacker@stack:~$ nova list --all-tenants
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| af87c1b2-
| d63f5376-
+------
stacker@stack:~$ nova interface-attach --port-id 620c1351-
ERROR (ClientException): Failed to attach interface (HTTP 500) (Request-ID: req-3d04c5c6-
Here is part of trace log from nova-api:
2015-01-12 15:47:34.943 TRACE nova.api.
2015-01-12 15:47:34.943 TRACE nova.api.
2015-01-12 15:47:34.943 TRACE nova.api.
2015-01-12 15:47:34.943 TRACE nova.api.
2015-01-12 15:47:34.943 TRACE nova.api.
2015-01-12 15:47:34.943 TRACE nova.api.
2015-01-12 15:47:34.943 TRACE nova.api.
2015-01-12 15:47:34.943 TRACE nova.api.
2015-01-12 15:47:34.943 TRACE nova.api.
2015-01-12 15:47:34.943 TRACE nova.api.
2015-01-12 15:47:34.943 TRACE nova.api.
2015-01-12 15:47:34.943 TRACE nova.api.
2015-01-12 15:47:34.943 TRACE nova.api.
Changed in nova: | |
assignee: | nobody → Liyingjun (liyingjun) |
Changed in nova: | |
importance: | Undecided → Low |
Changed in nova: | |
milestone: | none → kilo-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | kilo-3 → 2015.1.0 |
Found the problem! I used admin to create the port, and tried to attach the port to an instance belong to another tenant. But i think we should deny the interface attaching when the port is not belong to the tenant instead of raising an InterfaceAttach Failed exception.