Instance creation results in ERROR status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
New
|
Undecided
|
Miguel Lavalle |
Bug Description
I am working in DevStack deployed on a KVM VM. I am using Quantum for networking. When creating an instance with:
nova boot --image $I --flavor 1 --nic net-id=$N1 vm1
the new instance is left in the following state:
+------
| ID | Name | Status | Networks |
+------
| 1dfeef1f-
+------
Reviewing the log file from nova manager, I found the following lines:
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
965, in _spawn
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
ine 1059, in spawn
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
ine 1978, in _create_
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
, network_info)
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
line 234, in setup_basic_
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
7, in refresh_
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
e 358, in apply
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
.py", line 221, in inner
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
e 388, in _apply
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
e 1044, in _execute
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
ecute
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
ommand.
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
ables-restore -c
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
2013-01-23 13:46:16.357 2616 TRACE nova.compute.
-4133-9bf6-
The ProcessExecutio
Looking at the git history of module nova.network.
run iptables save and restore on all tables at once.". This patch introduced a bug, though, and function _apply is not resetting correctly the ip_tables anymore. It tries to find all the tables with command "iptables-save -c" and then attempts to reset them with command "iptables-restore -c". The tables found with "iptables-save -c" are:
# Generated by iptables-save v1.4.12 on Wed Jan 23 13:46:12 2013
*nat
:PREROUTING ACCEPT [4:308]
:INPUT ACCEPT [4:308]
:OUTPUT ACCEPT [1371:86222]
:POSTROUTING ACCEPT [1371:86222]
COMMIT
# Completed on Wed Jan 23 13:46:12 2013
# Generated by iptables-save v1.4.12 on Wed Jan 23 13:46:12 2013
*filter
:INPUT ACCEPT [238405:293260324]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [179580:87206783]
[0:0] -A INPUT -p gre -j ACCEPT
COMMIT
The workaround that I tested is going back to the previous version of nova.network.
# Generated by iptables-save v1.4.12 on Wed Jan 23 14:15:45 2013
*filter
:INPUT ACCEPT [255912:298029044]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [195853:92117797]
[0:0] -A INPUT -p gre -j ACCEPT
COMMIT
# Completed on Wed Jan 23 14:15:45 2013
# Generated by iptables-save v1.4.12 on Wed Jan 23 14:15:46 2013
*mangle
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed on Wed Jan 23 14:15:46 2013
# Generated by iptables-save v1.4.12 on Wed Jan 23 14:15:46 2013
*nat
:PREROUTING ACCEPT [4:308]
:INPUT ACCEPT [4:308]
:OUTPUT ACCEPT [1774:110778]
:POSTROUTING ACCEPT [1774:110778]
COMMIT
# Completed on Wed Jan 23 14:15:46 2013
# Generated by iptables-save v1.4.12 on Wed Jan 23 14:15:46 2013
*filter
:INPUT ACCEPT [256027:298050719]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [195967:92139388]
:nova-api-FORWARD - [0:0]
:nova-api-INPUT - [0:0]
:nova-api-OUTPUT - [0:0]
:nova-api-local - [0:0]
:nova-compute-
:nova-compute-INPUT - [0:0]
:nova-compute-
:nova-compute-local - [0:0]
:nova-compute-
:nova-compute-
:nova-filter-top - [0:0]
[93:11090] -A INPUT -j nova-api-INPUT
[115:21675] -A INPUT -j nova-compute-INPUT
[0:0] -A INPUT -p gre -j ACCEPT
[0:0] -A FORWARD -j nova-filter-top
[0:0] -A FORWARD -j nova-api-FORWARD
[0:0] -A FORWARD -j nova-compute-
[114:21591] -A OUTPUT -j nova-filter-top
[92:11038] -A OUTPUT -j nova-api-OUTPUT
[114:21591] -A OUTPUT -j nova-compute-OUTPUT
[0:0] -A nova-api-INPUT -d 172.16.0.2/32 -p tcp -m tcp --dport 8775 -j ACCEPT
[0:0] -A nova-compute-
[92:11038] -A nova-filter-top -j nova-api-local
[114:21591] -A nova-filter-top -j nova-compute-local
COMMIT
# Completed on Wed Jan 23 14:15:46 2013
# Generated by iptables-save v1.4.12 on Wed Jan 23 14:15:47 2013
*mangle
:PREROUTING ACCEPT [114:21581]
:INPUT ACCEPT [114:21581]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [113:21529]
:POSTROUTING ACCEPT [113:21529]
:nova-api-
:nova-compute-
[92:11038] -A POSTROUTING -j nova-api-
[113:21529] -A POSTROUTING -j nova-compute-
COMMIT
# Completed on Wed Jan 23 14:15:47 2013
# Generated by iptables-save v1.4.12 on Wed Jan 23 14:15:47 2013
*nat
:PREROUTING ACCEPT [4:308]
:INPUT ACCEPT [4:308]
:OUTPUT ACCEPT [1774:110778]
:POSTROUTING ACCEPT [1774:110778]
:nova-api-OUTPUT - [0:0]
:nova-api-
:nova-api-
:nova-api-
:nova-api-snat - [0:0]
:nova-compute-
:nova-compute-
:nova-compute-
:nova-compute-
:nova-compute-snat - [0:0]
:nova-postrouti
[0:0] -A PREROUTING -j nova-api-PREROUTING
[0:0] -A PREROUTING -j nova-compute-
[0:0] -A OUTPUT -j nova-api-OUTPUT
[0:0] -A OUTPUT -j nova-compute-OUTPUT
[0:0] -A POSTROUTING -j nova-api-
[0:0] -A POSTROUTING -j nova-compute-
[0:0] -A POSTROUTING -j nova-postroutin
[0:0] -A nova-api-snat -j nova-api-float-snat
[0:0] -A nova-compute-snat -j nova-compute-
[0:0] -A nova-postroutin
[0:0] -A nova-postroutin
COMMIT
# Completed on Wed Jan 23 14:15:47 2013
# Generated by iptables-save v1.4.12 on Wed Jan 23 14:15:47 2013
*filter
:INPUT ACCEPT [256027:298050719]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [195967:92139388]
:nova-api-FORWARD - [0:0]
:nova-api-INPUT - [0:0]
:nova-api-OUTPUT - [0:0]
:nova-api-local - [0:0]
:nova-compute-
:nova-compute-INPUT - [0:0]
:nova-compute-
:nova-compute-
:nova-compute-local - [0:0]
:nova-compute-
:nova-compute-
:nova-filter-top - [0:0]
[0:0] -A INPUT -j nova-compute-INPUT
[93:11090] -A INPUT -j nova-api-INPUT
[0:0] -A INPUT -p gre -j ACCEPT
[0:0] -A FORWARD -j nova-filter-top
[0:0] -A FORWARD -j nova-compute-
[0:0] -A FORWARD -j nova-api-FORWARD
[114:21591] -A OUTPUT -j nova-filter-top
[0:0] -A OUTPUT -j nova-compute-OUTPUT
[92:11038] -A OUTPUT -j nova-api-OUTPUT
[0:0] -A nova-api-INPUT -d 172.16.0.2/32 -p tcp -m tcp --dport 8775 -j ACCEPT
[0:0] -A nova-compute-inst-4 -m state --state INVALID -j DROP
[0:0] -A nova-compute-inst-4 -m state --state RELATED,ESTABLISHED -j ACCEPT
[0:0] -A nova-compute-inst-4 -j nova-compute-
[0:0] -A nova-compute-inst-4 -s 10.0.0.2/32 -p udp -m udp --sport 67 --dport 68
-j ACCEPT
[0:0] -A nova-compute-inst-4 -s 10.0.0.0/24 -j ACCEPT
[0:0] -A nova-compute-inst-4 -j nova-compute-
[0:0] -A nova-compute-local -d 10.0.0.3/32 -j nova-compute-inst-4
[0:0] -A nova-compute-
[0:0] -A nova-filter-top -j nova-compute-local
[92:11038] -A nova-filter-top -j nova-api-local
COMMIT
# Completed on Wed Jan 23 14:15:47 2013
# Generated by iptables-save v1.4.12 on Wed Jan 23 14:15:47 2013
*mangle
:PREROUTING ACCEPT [116:21733]
:INPUT ACCEPT [116:21733]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [114:21629]
:POSTROUTING ACCEPT [114:21629]
:nova-api-
:nova-compute-
[1:100] -A POSTROUTING -j nova-compute-
[93:11138] -A POSTROUTING -j nova-api-
COMMIT
# Completed on Wed Jan 23 14:15:47 2013
# Generated by iptables-save v1.4.12 on Wed Jan 23 14:15:47 2013
*nat
:PREROUTING ACCEPT [4:308]
:INPUT ACCEPT [4:308]
:OUTPUT ACCEPT [1774:110778]
:POSTROUTING ACCEPT [1774:110778]
:nova-api-OUTPUT - [0:0]
:nova-api-
:nova-api-
:nova-api-
:nova-api-snat - [0:0]
:nova-compute-
:nova-compute-
:nova-compute-
:nova-compute-
:nova-compute-snat - [0:0]
:nova-postrouti
[0:0] -A PREROUTING -j nova-compute-
[0:0] -A PREROUTING -j nova-api-PREROUTING
[0:0] -A OUTPUT -j nova-compute-OUTPUT
[0:0] -A OUTPUT -j nova-api-OUTPUT
[0:0] -A POSTROUTING -j nova-compute-
[0:0] -A POSTROUTING -j nova-api-
[0:0] -A POSTROUTING -j nova-postroutin
[0:0] -A nova-api-snat -j nova-api-float-snat
[0:0] -A nova-compute-snat -j nova-compute-
[0:0] -A nova-postroutin
[0:0] -A nova-postroutin
COMMIT
# Completed on Wed Jan 23 14:15:47 2013
Changed in nova: | |
assignee: | nobody → Miguel Lavalle (minsel) |
This bug was also reported here:
https:/ /bugs.launchpad .net/nova/ +bug/1103766