pre-series-upgrade fails with 'swift-account didn't stop cleanly'

Bug #1898286 reported by Andrea Ieri
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Swift Storage Charm
New
Undecided
Unassigned

Bug Description

I am upgrading a trusty machine to xenial, the swift storage charm is 20.05.

The upgrade-series prepare step hangs forever.

The charm logs show:

2020-10-02 19:20:23 DEBUG pre-series-upgrade stop: Unknown instance:
2020-10-02 19:20:23 DEBUG pre-series-upgrade Traceback (most recent call last):
2020-10-02 19:20:23 DEBUG pre-series-upgrade File "/var/lib/juju/agents/unit-swift-storage-z1-1/charm/hooks/pre-series-upgrade", line 503, in <module>
2020-10-02 19:20:23 DEBUG pre-series-upgrade main()
2020-10-02 19:20:23 DEBUG pre-series-upgrade File "/var/lib/juju/agents/unit-swift-storage-z1-1/charm/hooks/pre-series-upgrade", line 488, in main
2020-10-02 19:20:23 DEBUG pre-series-upgrade hooks.execute(sys.argv)
2020-10-02 19:20:23 DEBUG pre-series-upgrade File "/var/lib/juju/agents/unit-swift-storage-z1-1/charm/charmhelpers/core/hookenv.py", line 945, in execute
2020-10-02 19:20:23 DEBUG pre-series-upgrade self._hooks[hook_name]()
2020-10-02 19:20:23 DEBUG pre-series-upgrade File "/var/lib/juju/agents/unit-swift-storage-z1-1/charm/hooks/pre-series-upgrade", line 469, in pre_series_upgrade
2020-10-02 19:20:23 DEBUG pre-series-upgrade raise Exception("{} didn't stop cleanly.".format(service))
2020-10-02 19:20:23 DEBUG pre-series-upgrade Exception: swift-account didn't stop cleanly.
2020-10-02 19:20:23 ERROR juju.worker.uniter.operation runhook.go:132 hook "pre-series-upgrade" failed: exit status 1

I suspect this happens because swift-account is stopped more than once. In fact if I try to manually stop an upstart service that is already stopped I get the following:

# stop swift-account; echo $?
stop: Unknown instance:
1

Workaround: comment out the if not stopped / raise in swift_storage_hooks.py, lines 468 and 469

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.