agent plugin fails to detect correct file injection capability

Bug #810657 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Prince

Bug Description

Using nova bzr 1269 with Xenserver. I'm creating instances using a Squeeze image with nova-agent 0.0.1.28 installed.

When I create a new instance and try to inject a file I get the following error in /var/log/nova/nova-agent.log:

---
2011-07-14 13:24:22,552 [INFO] Received command 'file_inject' with argument: '{'b64_file': 'c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFERWdWTlgrWFBQVFFuTTgvaG5CM1ptajJad3I4QmU4TXpXL0libWxXaERWN3IzU0pMLzRVNVlueWdFb2lLQ2IzTGJHRmdOMkgxdTNRcS9VWjAvZ1AwK0p1Mk5nTVpkdWRqVWo3d3VsNU1QUXFNV1IvV0xlbkJWY2NYREFMcWxUYjFacGxPRDI2QWNwNUR0SlNmdk1EaVdscTVZM2RxbVd4OE91aDRoZTZjN3BTbGtKamZFOFQzRVJaNFZIRzRJRkk0bEtyVVVDVGVBQlE0ZDdvMjlkYUFUMStGR2ZFVDl1Y3ZNRzdhYmUrUTlrMWc5NTJZZ1lWWVhXekt6NkpvUTFOdjIxRW15RG40NmNDNWpQcWVwYlVpUkFidTF6T0huYlNBeXpYTVlWNzU5aEw2SiszSVZ5a3J5anVnbTUxZXRCMUpjeXp2cTVramVZYndqbU5uTE0wVGIgcm9vdEBub3ZhMQo=', 'b64_path': 'L3Jvb3QvLnNzaC9hdXRob3JpemVkX2tleXM='}'
2011-07-14 13:24:22,553 [WARNING] No such agent command 'file_inject'
---

In nova-compute.log I see the following:

2011-07-14 13:24:17,063 DEBUG nova.virt.xenapi.vmops [-] Injecting file path: '/root/.ssh/authorized_keys' from (pid=6569) _inject_files /usr/lib/pymodules/python2.6/nova/virt/xenapi/vmops.py:320
2011-07-14 13:24:20,243 INFO nova.virt.xenapi [-] Task [Async.host.call_plugin] OpaqueRef:fc1a875e-f609-97a4-42fb-e664df556d37 status: success <value>&quot;{\&quot;message\&quot;: \&quot;No such agent command 'file_inject'\&quot;, \&quot;returncode\&quot;: \&quot;404\&quot;}&quot;</value>
2011-07-14 13:24:20,250 WARNING nova.virt.xenapi.vmops [-] string indices must be integers
2011-07-14 13:24:20,251 ERROR nova.virt.xenapi.vmops [-] Instance instance-00000017: failed to boot
(nova.virt.xenapi.vmops): TRACE: Traceback (most recent call last):
(nova.virt.xenapi.vmops): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vmops.py", line 341, in _wait_for_boot
(nova.virt.xenapi.vmops): TRACE: _inject_files()
(nova.virt.xenapi.vmops): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vmops.py", line 321, in _inject_files
(nova.virt.xenapi.vmops): TRACE: self.inject_file(instance, path, contents)
(nova.virt.xenapi.vmops): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vmops.py", line 706, in inject_file
(nova.virt.xenapi.vmops): TRACE: if resp_dict['returncode'] != '0':
(nova.virt.xenapi.vmops): TRACE: TypeError: string indices must be integers
(nova.virt.xenapi.vmops): TRACE:

---

I looks like the Xenserver agent plugin isn't detecting the correct file injection method for instances.

Related branches

Dan Prince (dan-prince)
Changed in nova:
assignee: nobody → Dan Prince (dan-prince)
status: New → In Progress
Dan Prince (dan-prince)
Changed in nova:
assignee: Dan Prince (dan-prince) → Chris Behrens (cbehrens)
Dan Prince (dan-prince)
Changed in nova:
assignee: Chris Behrens (cbehrens) → Dan Prince (dan-prince)
Dan Prince (dan-prince)
Changed in nova:
importance: Undecided → Medium
Dan Prince (dan-prince)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-3
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-3 → 2011.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.