status check does not tolerate ENOENT if ringlefile not yet created

Bug #1510865 reported by Edward Hope-Morley
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
swift-proxy (Juju Charms Collection)
Fix Released
Critical
Edward Hope-Morley

Bug Description

Recently added assess_status() causes this by calling has_minimum_zones() which errors if rings do not exist yet. Should be easy enough to fix.

2015-10-28 10:00:45 INFO swift-storage-relation-joined Traceback (most recent call last):
2015-10-28 10:00:45 INFO swift-storage-relation-joined File "/var/lib/juju/agents/unit-swift-proxy-1/charm/hooks/swift-storage-relation-joined", line 537, in <module>
2015-10-28 10:00:45 INFO swift-storage-relation-joined main()
2015-10-28 10:00:45 INFO swift-storage-relation-joined File "/var/lib/juju/agents/unit-swift-proxy-1/charm/hooks/swift-storage-relation-joined", line 533, in main
2015-10-28 10:00:45 INFO swift-storage-relation-joined assess_status(CONFIGS)
2015-10-28 10:00:45 INFO swift-storage-relation-joined File "/var/lib/juju/agents/unit-swift-proxy-1/charm/hooks/lib/swift_utils.py", line 1054, in assess_status
2015-10-28 10:00:45 INFO swift-storage-relation-joined if not has_minimum_zones(rings):
2015-10-28 10:00:45 INFO swift-storage-relation-joined File "/var/lib/juju/agents/unit-swift-proxy-1/charm/hooks/lib/swift_utils.py", line 1020, in has_minimum_zones
2015-10-28 10:00:45 INFO swift-storage-relation-joined builder = _load_builder(ring).to_dict()
2015-10-28 10:00:45 INFO swift-storage-relation-joined File "/var/lib/juju/agents/unit-swift-proxy-1/charm/hooks/lib/swift_utils.py", line 377, in _load_builder
2015-10-28 10:00:45 INFO swift-storage-relation-joined builder = pickle.load(open(path, 'rb'))
2015-10-28 10:00:45 INFO swift-storage-relation-joined IOError: [Errno 2] No such file or directory: '/etc/swift/account.builder'
2015-10-28 10:00:45 ERROR juju.worker.uniter.operation runhook.go:103 hook "swift-storage-relation-joined" failed: exit status 1

Changed in swift-proxy (Juju Charms Collection):
milestone: none → 16.01
assignee: nobody → Edward Hope-Morley (hopem)
importance: Undecided → Critical
status: New → In Progress
tags: added: backport-potential openstack sts
Revision history for this message
Edward Hope-Morley (hopem) wrote :

Seems this has already been fixed in /next - http://bazaar.launchpad.net/~openstack-charmers/charms/trusty/swift-proxy/next/revision/121. I'll proceed with backporting it.

Changed in swift-proxy (Juju Charms Collection):
status: In Progress → Fix Committed
tags: added: kanban-cross-team
Changed in swift-proxy (Juju Charms Collection):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The ingestion of the fixed charm into the charm store is blocked on https://bugs.launchpad.net/launchpad/+bug/1510993

Revision history for this message
Adam Collard (adam-collard) wrote :

The Landscape configuration where this failed looked like this:

config={"replicas": "3",
               "zone-assignment": "auto",
               "openstack-origin": "trusty-kilo"}

Juju version was 1.24.6, deploying charm version swift-proxy-24

Revision history for this message
Ryan Beisner (1chb1n) wrote :

FWIW, the charm's functional tests use the default/recommended zone-assignment value of 'manual.' The other full deploy and mojo-driven tests also exercise only manual zone-assignment. A new mojo spec test could be defined to specifically exercise the auto zone-assignment scenario.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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