In cloud-compute-relation-changed: SystemError: E:Problem renaming the file /var/cache/apt/srcpkgcache.bin.QeVQku to /var/cache/apt/srcpkgcache.bin

Bug #1354471 reported by Björn Tillenius
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nova-compute (Juju Charms Collection)
High
Liam Young

Bug Description

I got the following error when deploying a cloud:

2014-08-08 14:06:28 INFO cloud-compute-relation-changed File "/var/lib/juju/agents/unit-nova-compute-2/charm/hooks/charmhelpers/contrib/openstack/context.py", line 353, in __call__
2014-08-08 14:06:28 INFO cloud-compute-relation-changed ensure_packages(['ceph-common'])
2014-08-08 14:06:28 INFO cloud-compute-relation-changed File "/var/lib/juju/agents/unit-nova-compute-2/charm/hooks/charmhelpers/contrib/openstack/context.py", line 54, in ensure_packages
2014-08-08 14:06:28 INFO cloud-compute-relation-changed required = filter_installed_packages(packages)
2014-08-08 14:06:28 INFO cloud-compute-relation-changed File "/var/lib/juju/agents/unit-nova-compute-2/charm/hooks/charmhelpers/fetch/__init__.py", line 117, in filter_installed_packages
2014-08-08 14:06:28 INFO cloud-compute-relation-changed cache = apt_pkg.Cache()
2014-08-08 14:06:28 INFO cloud-compute-relation-changed SystemError: E:Problem renaming the file /var/cache/apt/srcpkgcache.bin.QeVQku to /var/cache/apt/srcpkgcache.bin - rename (2: No such file or directory), E:The package lists or status file could not be parsed or opened.
2014-08-08 14:06:28 ERROR juju.worker.uniter uniter.go:486 hook failed: exit status 1

This is cs:trusty/nova-compute-3. Looking the fetch/__init__.py, it has code to build the
cache in memory, but it seems like it's not working as intended.

Related branches

tags: added: cloud-installer landscape
Liam Young (gnuoy)
Changed in nova-compute (Juju Charms Collection):
assignee: nobody → Liam Young (gnuoy)
Liam Young (gnuoy)
Changed in nova-compute (Juju Charms Collection):
importance: Undecided → High
Revision history for this message
Liam Young (gnuoy) wrote :

I wasn't able to reproduce it but I think the likely cause is that filter_installed_packages builds the package cache in memory but the src package cache on disk. I have a mp to charm helpers to fix this

Chris Glass (tribaal)
Changed in nova-compute (Juju Charms Collection):
status: New → In Progress
Revision history for this message
Liam Young (gnuoy) wrote :

As tribaal pointed out there were other functions in charmhelpers which suffered from this bug so I've updated charmhelpers and created mps which contain the latest update.

Revision history for this message
James Page (james-page) wrote :

All branches are now landed into stable.

Changed in nova-compute (Juju Charms Collection):
status: In Progress → Fix Released
Revision history for this message
Chad Smith (chad.smith) wrote :

It seems we also have an omission here. I just hit this issue with ceph-radosgw today. It still uses apt.Cache() directly instead of using charmhelpers for this.

Revision history for this message
Liam Young (gnuoy) wrote :

Agreed, ceph-radosgw was missed. I'll get that updated

David Britton (dpb)
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers