Failed to spawn an instance : AttributeError: 'str' object has no attribute 'fileno'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Soren Hansen |
Bug Description
Tested trunk on Revision no 790.
If I start a new instance, it fails to spawn.
DescribeInstance status - Failed to spawn
nova-compute.log
-------
2011-03-11 15:56:56,283 AUDIT nova.compute.
2011-03-11 15:56:56,399 DEBUG nova.rpc [-] Making asynchronous call... from (pid=17161) call /home/tpatil/
2011-03-11 15:56:56,399 DEBUG nova.rpc [-] MSG_ID is 5af3fe3eb20c47f
2011-03-11 15:56:56,683 DEBUG nova.rpc [-] Making asynchronous call... from (pid=17161) call /home/tpatil/
2011-03-11 15:56:56,684 DEBUG nova.rpc [-] MSG_ID is 5879905adc35407
2011-03-11 15:56:57,103 DEBUG nova.virt.
2011-03-11 15:56:57,224 DEBUG nova.virt.
2011-03-11 15:56:57,264 INFO nova [-] called setup_basic_
2011-03-11 15:56:57,264 INFO nova [-] ensuring static filters
2011-03-11 15:56:57,424 INFO nova [-] <nova.db.
2011-03-11 15:56:57,424 INFO nova [-] <nova.db.
2011-03-11 15:56:57,438 DEBUG nova.utils [-] Running cmd (subprocess): sudo iptables-save -t filter from (pid=17161) execute /home/tpatil/
2011-03-11 15:56:57,446 DEBUG nova.utils [-] Running cmd (subprocess): sudo iptables-restore from (pid=17161) execute /home/tpatil/
2011-03-11 15:56:57,454 DEBUG nova.utils [-] Running cmd (subprocess): sudo iptables-save -t nat from (pid=17161) execute /home/tpatil/
2011-03-11 15:56:57,460 DEBUG nova.utils [-] Running cmd (subprocess): sudo iptables-restore from (pid=17161) execute /home/tpatil/
2011-03-11 15:56:57,466 DEBUG nova.utils [-] Running cmd (subprocess): sudo ip6tables-save -t filter from (pid=17161) execute /home/tpatil/
2011-03-11 15:56:57,473 DEBUG nova.utils [-] Running cmd (subprocess): sudo ip6tables-restore from (pid=17161) execute /home/tpatil/
2011-03-11 15:56:57,479 DEBUG nova.utils [-] Result was 2 from (pid=17161) execute /home/tpatil/
2011-03-11 15:56:57,479 DEBUG nova.utils [-] ['sudo', 'ip6tables-
2011-03-11 15:56:58,085 DEBUG nova.utils [-] Running cmd (subprocess): sudo ip6tables-restore from (pid=17161) execute /home/tpatil/
2011-03-11 15:56:58,085 ERROR nova.exception [-] Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/home/
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File "/home/
(nova.exception): TRACE: self.firewall_
(nova.exception): TRACE: File "/home/
(nova.exception): TRACE: self.iptables.
(nova.exception): TRACE: File "/home/
(nova.exception): TRACE: return f(*args, **kwargs)
(nova.exception): TRACE: File "/home/
(nova.exception): TRACE: attempts=5)
(nova.exception): TRACE: File "/home/
(nova.exception): TRACE: stdout=stdout, stderr=stderr, env=env)
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: subprocess_
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: errread, errwrite) = self._get_
(nova.exception): TRACE: File "/usr/lib/
(nova.exception): TRACE: c2pwrite = stdout.fileno()
(nova.exception): TRACE: AttributeError: 'str' object has no attribute 'fileno'
(nova.exception): TRACE:
2011-03-11 15:56:58,087 ERROR nova.compute.
(nova.compute.
(nova.compute.
(nova.compute.
(nova.compute.
(nova.compute.
(nova.compute.
Related branches
- Rick Harris (community): Disapprove
- Soren Hansen (community): Disapprove
-
Diff: 19 lines (+3/-3)1 file modifiednova/network/linux_net.py (+3/-3)
- Rick Harris (community): Approve
- Paul Voccio (community): Approve
-
Diff: 143 lines (+93/-10)2 files modifiednova/tests/test_utils.py (+78/-0)
nova/utils.py (+15/-10)
- Rick Harris (community): Approve
- Devin Carlen (community): Approve
- Koji Iida (community): Approve
-
Diff: 12 lines (+2/-0)1 file modifiednova/virt/libvirt_conn.py (+2/-0)
Changed in nova: | |
assignee: | nobody → Eric Windisch (ewindisch) |
status: | New → In Progress |
Changed in nova: | |
assignee: | Eric Windisch (ewindisch) → Soren Hansen (soren) |
importance: | Undecided → High |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → 2011.2 |
status: | Fix Committed → Fix Released |
It seems that there are two problems.
1. retry logic of utils.execute has some problem.
2. ip6tables does not have sg-fallback rule.
Please review attached patch.