server rebuild UnboundLocalError: local variable 'network_name'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
New
|
Undecided
|
Unassigned | ||
neutron |
New
|
Undecided
|
Unassigned |
Bug Description
Failed to rebuild a server with neutron and floating_ip.
n-cpu error:
Setting instance vm_state to ERROR
Traceback (most recent call last):
File "/opt/stack/
yield
File "/opt/stack/
network_info = self._get_
File "/opt/stack/
instance)
File "/opt/stack/
res = f(self, context, *args, **kwargs)
File "/opt/stack/
result = self._get_
File "/opt/stack/
nw_info = self._build_
File "/opt/stack/
subnets)
File "/opt/stack/
label=
UnboundLocalError: local variable 'network_name' referenced before assignment
$ neutron port-create private
+------
| Field | Value |
+------
| admin_state_up | True |
| allowed_
| binding:
| binding:host_id | |
| binding:vif_type | unbound |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "5360935f-
| id | d34865bc-
| mac_address | fa:16:3e:1d:b8:81 |
| name | |
| network_id | 03657a24-
| security_groups | a9aa6eda-
| status | DOWN |
| tenant_id | a026cc3108044c6
+------
$ neutron floatingip-create public
Created a new floatingip:
+------
| Field | Value |
+------
| fixed_ip_address | |
| floating_ip_address | 172.24.4.21 |
| floating_network_id | c1a7d836-
| id | 405e7839-
| port_id | |
| router_id | |
| tenant_id | a026cc3108044c6
+------
$ neutron floatingip-
Associated floatingip 405e7839-
$ nova boot server --image cirros-
+------
| Property | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | building |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| adminPass | uWrM2gRLXNm2 |
| config_drive | |
| created | 2013-12-
| flavor | m1.nano |
| hostId | |
| id | 9031bf8a-
| image | cirros-
| key_name | None |
| metadata | {} |
| name | server |
| os-extended-
| progress | 0 |
| security_groups | [{u'name': u'default'}] |
| status | BUILD |
| tenant_id | a026cc3108044c6
| updated | 2013-12-
| user_id | 492847cb43d34ee
+------
$ nova rebuild 9031bf8a-
+------
| Property | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | active |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2013-12-
| flavor | m1.nano (42) |
| hostId | 34895965273061f
| id | 9031bf8a-
| image | cirros-
| key_name | None |
| metadata | {} |
| name | server |
| os-extended-
| private network | 10.1.0.4, 172.24.4.21 |
| progress | 0 |
| security_groups | default |
| status | REBUILD |
| tenant_id | a026cc3108044c6
| updated | 2013-12-
| user_id | 492847cb43d34ee
+------
$ nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 9031bf8a-
+------
Server in error state
description: | updated |
May be important fact, the above operations are done as admin, but the public network belongs to the 'demo' user.
As demo user the above series are working.
If this is permission issue, maybe one of the operations needs to be denied even before the first boot,
if it ok in permission view point the rebuild needs to be successful as well.